commit 524acbd1a6b3a2b717d7defabe42053cf89a7b0a
Author: shafi54 <108669266+shafi-aviz@users.noreply.github.com>
Date: Sat Jan 24 00:13:15 2026 +0530
enh
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d7e612e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,133 @@
+# ---> Node
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+.pnpm-debug.log*
+
+# Diagnostic reports (https://nodejs.org/api/report.html)
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+*.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# Snowpack dependency directory (https://snowpack.dev/)
+web_modules/
+
+# TypeScript cache
+*.tsbuildinfo
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional stylelint cache
+.stylelintcache
+
+# Microbundle cache
+.rpt2_cache/
+.rts2_cache_cjs/
+.rts2_cache_es/
+.rts2_cache_umd/
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variable files
+# .env
+# .env.development.local
+# .env.test.local
+# .env.production.local
+# .env.local
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+.parcel-cache
+
+# Next.js build output
+.next
+out
+
+# Nuxt.js build / generate output
+.nuxt
+dist
+
+# Gatsby files
+.cache/
+# Comment in the public line in if your project uses Gatsby and not Next.js
+# https://nextjs.org/blog/next-9-1#public-directory-support
+# public
+
+# vuepress build output
+.vuepress/dist
+
+# vuepress v2.x temp and cache directory
+.temp
+.cache
+
+# Docusaurus cache and generated files
+.docusaurus
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
+
+# TernJS port file
+.tern-port
+
+# Stores VSCode versions used for testing VSCode extensions
+.vscode-test
+
+# yarn v2
+.yarn/cache
+.yarn/unplugged
+.yarn/build-state.yml
+.yarn/install-state.gz
+.pnp.*
+
+
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..db916fa
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,52 @@
+# Agent Instructions for Meat Farmer Monorepo
+
+## Important instructions
+- Don't try to build the code or run or compile it. Just make changes and leave the rest for the user.
+- Don't run any drizzle migrations. User will handle it.
+
+## Code Style Guidelines
+
+### TypeScript & React Native
+- **Strict TypeScript**: `strict: true` enabled in tsconfig
+- **Path aliases**: Use `@/*` for local imports, `common-ui` for shared UI package
+- **Component naming**: PascalCase (e.g., `MyButton`, `ImageCarousel`)
+- **Function naming**: camelCase (e.g., `handleSubmit`, `getCurrentUserId`)
+- **Interface naming**: PascalCase with `Props` suffix (e.g., `ButtonProps`)
+
+don't import Text,TextInput,TouchableOpacity and other such primitive components directly from
+react-native. They are available in the common-ui as MyText, MyTextInput, MyTouchableOpacity etc.
+
+### Imports
+- React imports first
+- Third-party libraries second
+- Local imports last
+- Use absolute imports with path aliases when possible
+- imports from /packages/ui are aliased as `common-ui` in apps/user-ui and apps/admin-ui
+
+### Error Handling
+- API errors handled via axios interceptors
+- Use `DeviceEventEmitter` for cross-component communication
+- Throw custom errors with descriptive messages
+- Avoid try-catch blocks unless necessary
+
+### Formatting & Linting
+- ESLint with Expo config
+- No Prettier configured - follow consistent indentation (2 spaces)
+- No semicolons at end of statements
+- Single quotes for strings
+
+### Testing
+- No test framework currently configured
+- When adding tests, use Jest + React Native Testing Library
+- Test files: `*.test.tsx` or `*.spec.tsx`
+
+### Architecture
+- Monorepo with Turbo
+- Shared UI components in `packages/ui`
+- Apps: `user-ui`, `admin-ui`, `inspiration-ui`, `inspiration-backend`
+- Database: Drizzle ORM with PostgreSQL
+
+## Important Notes
+- **Do not run build, compile, or migration commands** - These should be handled manually by developers
+- Avoid running `npm run build`, `tsc`, `drizzle-kit generate`, or similar compilation/migration commands
+- Don't do anything with git. Don't do git add or git commit. That will be managed entirely by the user
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..6fe5cf1
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,45 @@
+# Optimized Dockerfile for backend and fallback-ui services (project root)
+
+# 1. ---- Base Node image
+FROM node:20-slim AS base
+WORKDIR /app
+
+# 2. ---- Pruner ----
+FROM base AS pruner
+WORKDIR /app
+# Copy config files first for better caching
+COPY package.json package-lock.json turbo.json ./
+COPY apps/backend/package.json ./apps/backend/
+COPY apps/fallback-ui/package.json ./apps/fallback-ui/
+COPY packages/ui/package.json ./packages/ui/
+RUN npm install -g turbo
+COPY . .
+RUN turbo prune --scope=backend --scope=fallback-ui --scope=common-ui --docker
+
+# 3. ---- Builder ----
+FROM base AS builder
+WORKDIR /app
+# Copy package files first to cache npm install
+COPY --from=pruner /app/out/json/ .
+COPY --from=pruner /app/out/package-lock.json ./package-lock.json
+COPY --from=pruner /app/turbo.json .
+RUN npm ci
+# Copy source code after dependencies are installed
+COPY --from=pruner /app/out/full/ .
+RUN npx turbo run build --filter=fallback-ui... --filter=backend...
+
+# 4. ---- Runner ----
+FROM base AS runner
+WORKDIR /app
+ENV NODE_ENV=production
+# Copy package files and install production deps
+COPY --from=pruner /app/out/json/ .
+COPY --from=pruner /app/out/package-lock.json ./package-lock.json
+RUN npm ci --production --omit=dev
+# Copy built applications
+COPY --from=builder /app/apps/backend/dist ./apps/backend/dist
+COPY --from=builder /app/apps/fallback-ui/dist ./apps/fallback-ui/dist
+EXPOSE 4000
+RUN npm i -g bun
+CMD ["bun", "apps/backend/dist/index.js"]
+# CMD ["node", "apps/backend/dist/index.js"]
\ No newline at end of file
diff --git a/Dockerfile.txt b/Dockerfile.txt
new file mode 100644
index 0000000..4c1c879
--- /dev/null
+++ b/Dockerfile.txt
@@ -0,0 +1,34 @@
+# Dockerfile for backend service (project root)
+
+# 1. ---- Base Node image
+FROM node:20-slim AS base
+WORKDIR /app
+
+# 2. ---- Pruner ----
+FROM base AS pruner
+WORKDIR /app
+RUN npm install -g turbo
+COPY . .
+RUN turbo prune --scope=backend --scope=fallback-ui --scope=common-ui --docker
+
+# 3. ---- Builder ----
+FROM base AS builder
+WORKDIR /app
+COPY --from=pruner /app/out/full/ .
+COPY --from=pruner /app/out/json/ .
+COPY --from=pruner /app/out/package-lock.json ./package-lock.json
+COPY --from=pruner /app/turbo.json .
+RUN npm install
+RUN npx turbo run build --filter=fallback-ui... --filter=backend...
+
+# 4. ---- Runner ----
+FROM base AS runner
+WORKDIR /app
+ENV NODE_ENV=production
+COPY --from=pruner /app/out/json/ .
+COPY --from=pruner /app/out/package-lock.json ./package-lock.json
+RUN npm ci --production
+COPY --from=builder /app/apps/backend/dist ./apps/backend/dist
+COPY --from=builder /app/apps/fallback-ui/dist ./apps/fallback-ui/dist
+EXPOSE 4000
+CMD ["node", "apps/backend/dist/index.js"]
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b9c3bba
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) 2025 shafi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100755
index 0000000..6909884
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+.env file structure
+DATABASE_URL=****
+PHONE_PE_BASE_URL=https://api-preprod.phonepe.com/
+PHONE_PE_CLIENT_ID=****
+PHONE_PE_CLIENT_VERSION=1
+PHONE_PE_CLIENT_SECRET=****
+PHONE_PE_MERCHANT_ID=****
+S3_REGION=****
+S3_ACCESS_KEY_ID=****
+S3_SECRET_ACCESS_KEY=****
+S3_URL=****
+S3_BUCKET_NAME=****
+EXPO_ACCESS_TOKEN=****
+
+
+also add google-services.json and firebase sdk files to ui folder to run notif functionality
diff --git a/app.json b/app.json
new file mode 100644
index 0000000..c9e8c8a
--- /dev/null
+++ b/app.json
@@ -0,0 +1,3 @@
+{
+ "expo": {}
+}
\ No newline at end of file
diff --git a/apps/admin-ui/.expo/README.md b/apps/admin-ui/.expo/README.md
new file mode 100644
index 0000000..f7eb5fe
--- /dev/null
+++ b/apps/admin-ui/.expo/README.md
@@ -0,0 +1,8 @@
+> Why do I have a folder named ".expo" in my project?
+The ".expo" folder is created when an Expo project is started using "expo start" command.
+> What do the files contain?
+- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
+- "settings.json": contains the server configuration that is used to serve the application manifest.
+> Should I commit the ".expo" folder?
+No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
+Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
diff --git a/apps/admin-ui/.expo/cache/eslint/.cache_1wqyakh b/apps/admin-ui/.expo/cache/eslint/.cache_1wqyakh
new file mode 100644
index 0000000..1379236
--- /dev/null
+++ b/apps/admin-ui/.expo/cache/eslint/.cache_1wqyakh
@@ -0,0 +1 @@
+[{"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/api-hooks/product.api.ts":"1","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/api-hooks/tag.api.ts":"2","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/components/CouponForm.tsx":"3","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/components/ProductForm.tsx":"4","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/components/TagForm.tsx":"5","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/components/TagMenu.tsx":"6","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/trpc-client.ts":"7","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/_layout.tsx":"8","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-product/_layout.tsx":"9","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-product/index.tsx":"10","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-slot/_layout.tsx":"11","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-slot/index.tsx":"12","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-store/_layout.tsx":"13","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-store/index.tsx":"14","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-tag/_layout.tsx":"15","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-tag/index.tsx":"16","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/address-management/index.tsx":"17","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/complaints/_layout.tsx":"18","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/complaints/index.tsx":"19","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/coupons/_layout.tsx":"20","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/coupons/index.tsx":"21","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/create-coupon/_layout.tsx":"22","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/create-coupon/index.tsx":"23","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard/_layout.tsx":"24","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard/index.tsx":"25","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/delivery-sequences/_layout.tsx":"26","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/delivery-sequences/index.tsx":"27","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-coupon/[id]/index.tsx":"28","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-product/_layout.tsx":"29","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-product/index.tsx":"30","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-slot/[id]/index.tsx":"31","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-slot/_layout.tsx":"32","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-store/_layout.tsx":"33","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-store/index.tsx":"34","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-tag/_layout.tsx":"35","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-tag/index.tsx":"36","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/manage-orders/_layout.tsx":"37","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/manage-orders/index.tsx":"38","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/order-details/[id].tsx":"39","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/order-details/_layout.tsx":"40","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/orders/_layout.tsx":"41","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/orders/index.tsx":"42","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-detail/[id].tsx":"43","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-detail/_layout.tsx":"44","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-tags/_layout.tsx":"45","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-tags/index.tsx":"46","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/products/_layout.tsx":"47","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/products/index.tsx":"48","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/slots/_layout.tsx":"49","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/slots/index.tsx":"50","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/stores/_layout.tsx":"51","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/stores/index.tsx":"52","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/user-details/[id]/index.tsx":"53","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/users/index.tsx":"54","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/vendor-snippets/_layout.tsx":"55","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/vendor-snippets/index.tsx":"56","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/_layout.tsx":"57","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/index.tsx":"58","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/login.tsx":"59","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/AddressPlaceForm.tsx":"60","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/AddressZoneForm.tsx":"61","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/FullOrderView.tsx":"62","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/HorizontalImageScroller.tsx":"63","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/OrderNotesForm.tsx":"64","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/SlotForm.tsx":"65","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/SnippetMenu.tsx":"66","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/SnippetOrdersView.tsx":"67","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/StoreForm.tsx":"68","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/TabNavigation.tsx":"69","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/VendorSnippetForm.tsx":"70","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/app-container.tsx":"71","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/context/auth-context.tsx":"72","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/context/roles-context.tsx":"73","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/context/staff-auth-context.tsx":"74","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/dashboard-header.tsx":"75","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/date-time-picker.tsx":"76","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/day-account-view.tsx":"77","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ui/IconSymbol.ios.tsx":"78","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ui/IconSymbol.tsx":"79","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ui/TabBarBackground.ios.tsx":"80","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ui/TabBarBackground.tsx":"81","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/create-product-group.tsx":"82","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-product-group/[id].tsx":"83","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-groupings/_layout.tsx":"84","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-groupings/index.tsx":"85","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/slots/slot-details.tsx":"86","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ProductGroupForm.tsx":"87","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/api-hooks/banner.api.ts":"88","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/_layout.tsx":"89","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/_layout.tsx":"90","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/index.tsx":"91","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/index.tsx":"92","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/[id].tsx":"93","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/_layout.tsx":"94","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/BannerForm.tsx":"95","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/prices-overview/_layout.tsx":"96","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/prices-overview/index.tsx":"97","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/rebalance-orders/_layout.tsx":"98","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/rebalance-orders/index.tsx":"99","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/coupons/reserved-coupons/index.tsx":"100","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/customize-app/_layout.tsx":"101","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/customize-app/index.tsx":"102","/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/customize-app/popular-items.tsx":"103"},{"size":2498,"mtime":1768400165146,"results":"104","hashOfConfig":"105"},{"size":2703,"mtime":1763796305041,"results":"106","hashOfConfig":"105"},{"size":15378,"mtime":1768478021727,"results":"107","hashOfConfig":"105"},{"size":14468,"mtime":1768477648553,"results":"108","hashOfConfig":"105"},{"size":4623,"mtime":1766317749748,"results":"109","hashOfConfig":"105"},{"size":3110,"mtime":1763795789564,"results":"110","hashOfConfig":"105"},{"size":1337,"mtime":1762599434312,"results":"111","hashOfConfig":"105"},{"size":8796,"mtime":1767634707805,"results":"112","hashOfConfig":"105"},{"size":257,"mtime":1762599434197,"results":"113","hashOfConfig":"105"},{"size":2615,"mtime":1768477691699,"results":"114","hashOfConfig":"105"},{"size":222,"mtime":1764190176636,"results":"115","hashOfConfig":"105"},{"size":554,"mtime":1764189907122,"results":"116","hashOfConfig":"105"},{"size":223,"mtime":1763059388593,"results":"117","hashOfConfig":"105"},{"size":1209,"mtime":1766289701319,"results":"118","hashOfConfig":"105"},{"size":253,"mtime":1763797137184,"results":"119","hashOfConfig":"105"},{"size":2021,"mtime":1763797248106,"results":"120","hashOfConfig":"105"},{"size":3945,"mtime":1767174865620,"results":"121","hashOfConfig":"105"},{"size":224,"mtime":1762599434200,"results":"122","hashOfConfig":"105"},{"size":5507,"mtime":1764438946177,"results":"123","hashOfConfig":"105"},{"size":253,"mtime":1767802221050,"results":"124","hashOfConfig":"105"},{"size":18870,"mtime":1767807975320,"results":"125","hashOfConfig":"105"},{"size":208,"mtime":1763924530767,"results":"126","hashOfConfig":"105"},{"size":1692,"mtime":1767791079484,"results":"127","hashOfConfig":"105"},{"size":255,"mtime":1762599434205,"results":"128","hashOfConfig":"105"},{"size":7781,"mtime":1768452505130,"results":"129","hashOfConfig":"105"},{"size":232,"mtime":1762599434206,"results":"130","hashOfConfig":"105"},{"size":32518,"mtime":1767426716492,"results":"131","hashOfConfig":"105"},{"size":2862,"mtime":1767791455131,"results":"132","hashOfConfig":"105"},{"size":258,"mtime":1762599434210,"results":"133","hashOfConfig":"105"},{"size":5195,"mtime":1768477730302,"results":"134","hashOfConfig":"105"},{"size":1507,"mtime":1764189564896,"results":"135","hashOfConfig":"105"},{"size":222,"mtime":1764190176942,"results":"136","hashOfConfig":"105"},{"size":224,"mtime":1763060554500,"results":"137","hashOfConfig":"105"},{"size":2143,"mtime":1766289690360,"results":"138","hashOfConfig":"105"},{"size":254,"mtime":1763797142709,"results":"139","hashOfConfig":"105"},{"size":3016,"mtime":1763798631329,"results":"140","hashOfConfig":"105"},{"size":227,"mtime":1762599434212,"results":"141","hashOfConfig":"105"},{"size":2908,"mtime":1768287610431,"results":"142","hashOfConfig":"105"},{"size":34634,"mtime":1768287610431,"results":"143","hashOfConfig":"105"},{"size":258,"mtime":1764241729339,"results":"144","hashOfConfig":"105"},{"size":220,"mtime":1764307866014,"results":"145","hashOfConfig":"105"},{"size":30720,"mtime":1768287610432,"results":"146","hashOfConfig":"105"},{"size":24820,"mtime":1767151476546,"results":"147","hashOfConfig":"105"},{"size":227,"mtime":1762599434217,"results":"148","hashOfConfig":"105"},{"size":258,"mtime":1763798895678,"results":"149","hashOfConfig":"105"},{"size":4519,"mtime":1768502509021,"results":"150","hashOfConfig":"105"},{"size":222,"mtime":1762599434225,"results":"151","hashOfConfig":"105"},{"size":10823,"mtime":1768415636310,"results":"152","hashOfConfig":"105"},{"size":298,"mtime":1766897186521,"results":"153","hashOfConfig":"105"},{"size":7495,"mtime":1768452623441,"results":"154","hashOfConfig":"105"},{"size":220,"mtime":1763059003587,"results":"155","hashOfConfig":"105"},{"size":8720,"mtime":1768502477149,"results":"156","hashOfConfig":"105"},{"size":5957,"mtime":1764361113959,"results":"157","hashOfConfig":"105"},{"size":2740,"mtime":1768502547435,"results":"158","hashOfConfig":"105"},{"size":229,"mtime":1762599434236,"results":"159","hashOfConfig":"105"},{"size":10743,"mtime":1766897689489,"results":"160","hashOfConfig":"105"},{"size":972,"mtime":1764172066361,"results":"161","hashOfConfig":"105"},{"size":703,"mtime":1766301995213,"results":"162","hashOfConfig":"105"},{"size":2439,"mtime":1766003080925,"results":"163","hashOfConfig":"105"},{"size":2286,"mtime":1765396821826,"results":"164","hashOfConfig":"105"},{"size":1666,"mtime":1765394256580,"results":"165","hashOfConfig":"105"},{"size":8575,"mtime":1766317751973,"results":"166","hashOfConfig":"105"},{"size":1037,"mtime":1762599434261,"results":"167","hashOfConfig":"105"},{"size":2103,"mtime":1762599434263,"results":"168","hashOfConfig":"105"},{"size":11049,"mtime":1766895371468,"results":"169","hashOfConfig":"105"},{"size":3592,"mtime":1762599434264,"results":"170","hashOfConfig":"105"},{"size":5420,"mtime":1766318553117,"results":"171","hashOfConfig":"105"},{"size":8193,"mtime":1766290045998,"results":"172","hashOfConfig":"105"},{"size":1020,"mtime":1762599434265,"results":"173","hashOfConfig":"105"},{"size":7463,"mtime":1762680829626,"results":"174","hashOfConfig":"105"},{"size":71,"mtime":1762599434267,"results":"175","hashOfConfig":"105"},{"size":7568,"mtime":1762599434268,"results":"176","hashOfConfig":"105"},{"size":1281,"mtime":1762599434269,"results":"177","hashOfConfig":"105"},{"size":3087,"mtime":1762681291123,"results":"178","hashOfConfig":"105"},{"size":3637,"mtime":1762599434272,"results":"179","hashOfConfig":"105"},{"size":7496,"mtime":1762599434272,"results":"180","hashOfConfig":"105"},{"size":2633,"mtime":1762599434273,"results":"181","hashOfConfig":"105"},{"size":598,"mtime":1762599434274,"results":"182","hashOfConfig":"105"},{"size":1422,"mtime":1762599434274,"results":"183","hashOfConfig":"105"},{"size":547,"mtime":1762599434275,"results":"184","hashOfConfig":"105"},{"size":159,"mtime":1762599434276,"results":"185","hashOfConfig":"105"},{"size":459,"mtime":1766889746933,"results":"186","hashOfConfig":"105"},{"size":1280,"mtime":1766889754475,"results":"187","hashOfConfig":"105"},{"size":231,"mtime":1766889670975,"results":"188","hashOfConfig":"105"},{"size":7403,"mtime":1767239712753,"results":"189","hashOfConfig":"105"},{"size":10642,"mtime":1767240859155,"results":"190","hashOfConfig":"105"},{"size":4840,"mtime":1766890421736,"results":"191","hashOfConfig":"105"},{"size":512,"mtime":1767163680847,"results":"192","hashOfConfig":"105"},{"size":389,"mtime":1767163849126,"results":"193","hashOfConfig":"105"},{"size":227,"mtime":1767163711679,"results":"194","hashOfConfig":"105"},{"size":2463,"mtime":1767178533223,"results":"195","hashOfConfig":"105"},{"size":17644,"mtime":1767178172673,"results":"196","hashOfConfig":"105"},{"size":4703,"mtime":1767179689237,"results":"197","hashOfConfig":"105"},{"size":224,"mtime":1767163855093,"results":"198","hashOfConfig":"105"},{"size":9157,"mtime":1767179690187,"results":"199","hashOfConfig":"105"},{"size":275,"mtime":1767633238728,"results":"200","hashOfConfig":"105"},{"size":14940,"mtime":1768477917852,"results":"201","hashOfConfig":"105"},{"size":277,"mtime":1767634693670,"results":"202","hashOfConfig":"105"},{"size":8964,"mtime":1768452581215,"results":"203","hashOfConfig":"105"},{"size":9844,"mtime":1767791293123,"results":"204","hashOfConfig":"105"},{"size":411,"mtime":1768412786804,"results":"205","hashOfConfig":"105"},{"size":6531,"mtime":1768452417476,"results":"206","hashOfConfig":"105"},{"size":14537,"mtime":1768413392903,"results":"207","hashOfConfig":"105"},{"filePath":"208","messages":"209","suppressedMessages":"210","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1vn1flh",{"filePath":"211","messages":"212","suppressedMessages":"213","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","suppressedMessages":"216","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"217","messages":"218","suppressedMessages":"219","errorCount":3,"fatalErrorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"220","messages":"221","suppressedMessages":"222","errorCount":2,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"223","messages":"224","suppressedMessages":"225","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"226","messages":"227","suppressedMessages":"228","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"229","messages":"230","suppressedMessages":"231","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"232","messages":"233","suppressedMessages":"234","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"235","messages":"236","suppressedMessages":"237","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"238","messages":"239","suppressedMessages":"240","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"241","messages":"242","suppressedMessages":"243","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"244","messages":"245","suppressedMessages":"246","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"247","messages":"248","suppressedMessages":"249","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"250","messages":"251","suppressedMessages":"252","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"253","messages":"254","suppressedMessages":"255","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"256","messages":"257","suppressedMessages":"258","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"259","messages":"260","suppressedMessages":"261","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"262","messages":"263","suppressedMessages":"264","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"265","messages":"266","suppressedMessages":"267","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"268","messages":"269","suppressedMessages":"270","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"271","messages":"272","suppressedMessages":"273","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"274","messages":"275","suppressedMessages":"276","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"277","messages":"278","suppressedMessages":"279","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"280","messages":"281","suppressedMessages":"282","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"283","messages":"284","suppressedMessages":"285","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"286","messages":"287","suppressedMessages":"288","errorCount":0,"fatalErrorCount":0,"warningCount":7,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"289","messages":"290","suppressedMessages":"291","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"292","messages":"293","suppressedMessages":"294","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"295","messages":"296","suppressedMessages":"297","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"298","messages":"299","suppressedMessages":"300","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"301","messages":"302","suppressedMessages":"303","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"304","messages":"305","suppressedMessages":"306","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"307","messages":"308","suppressedMessages":"309","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"310","messages":"311","suppressedMessages":"312","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"313","messages":"314","suppressedMessages":"315","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"316","messages":"317","suppressedMessages":"318","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"319","messages":"320","suppressedMessages":"321","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"322","messages":"323","suppressedMessages":"324","errorCount":0,"fatalErrorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"325","messages":"326","suppressedMessages":"327","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"328","messages":"329","suppressedMessages":"330","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"331","messages":"332","suppressedMessages":"333","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"334","messages":"335","suppressedMessages":"336","errorCount":0,"fatalErrorCount":0,"warningCount":8,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"337","messages":"338","suppressedMessages":"339","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"340","messages":"341","suppressedMessages":"342","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"343","messages":"344","suppressedMessages":"345","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"346","messages":"347","suppressedMessages":"348","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"349","messages":"350","suppressedMessages":"351","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"352","messages":"353","suppressedMessages":"354","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"355","messages":"356","suppressedMessages":"357","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"358","messages":"359","suppressedMessages":"360","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"361","messages":"362","suppressedMessages":"363","errorCount":1,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"364","messages":"365","suppressedMessages":"366","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"367","messages":"368","suppressedMessages":"369","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"370","messages":"371","suppressedMessages":"372","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"373","messages":"374","suppressedMessages":"375","errorCount":0,"fatalErrorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"376","messages":"377","suppressedMessages":"378","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"379","messages":"380","suppressedMessages":"381","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"382","messages":"383","suppressedMessages":"384","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"385","messages":"386","suppressedMessages":"387","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"388","messages":"389","suppressedMessages":"390","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"391","messages":"392","suppressedMessages":"393","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"394","messages":"395","suppressedMessages":"396","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"397","messages":"398","suppressedMessages":"399","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"400","messages":"401","suppressedMessages":"402","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"403","messages":"404","suppressedMessages":"405","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"406","messages":"407","suppressedMessages":"408","errorCount":5,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"409","messages":"410","suppressedMessages":"411","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"412","messages":"413","suppressedMessages":"414","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"415","messages":"416","suppressedMessages":"417","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"418","messages":"419","suppressedMessages":"420","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"421","messages":"422","suppressedMessages":"423","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"424","messages":"425","suppressedMessages":"426","errorCount":0,"fatalErrorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"427","messages":"428","suppressedMessages":"429","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"430","messages":"431","suppressedMessages":"432","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"433","messages":"434","suppressedMessages":"435","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"436","messages":"437","suppressedMessages":"438","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"439","messages":"440","suppressedMessages":"441","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"442","messages":"443","suppressedMessages":"444","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"445","messages":"446","suppressedMessages":"447","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"448","messages":"449","suppressedMessages":"450","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"451","messages":"452","suppressedMessages":"453","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"454","messages":"455","suppressedMessages":"456","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"457","messages":"458","suppressedMessages":"459","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"460","messages":"461","suppressedMessages":"462","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"463","messages":"464","suppressedMessages":"465","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"466","messages":"467","suppressedMessages":"468","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"469","messages":"470","suppressedMessages":"471","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"472","messages":"473","suppressedMessages":"474","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"475","messages":"476","suppressedMessages":"477","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"478","messages":"479","suppressedMessages":"480","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"481","messages":"482","suppressedMessages":"483","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"484","messages":"485","suppressedMessages":"486","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"487","messages":"488","suppressedMessages":"489","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"490","messages":"491","suppressedMessages":"492","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"493","messages":"494","suppressedMessages":"495","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"496","messages":"497","suppressedMessages":"498","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"499","messages":"500","suppressedMessages":"501","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"502","messages":"503","suppressedMessages":"504","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"505","messages":"506","suppressedMessages":"507","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"508","messages":"509","suppressedMessages":"510","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"511","messages":"512","suppressedMessages":"513","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"514","messages":"515","suppressedMessages":"516","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/api-hooks/product.api.ts",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/api-hooks/tag.api.ts",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/components/CouponForm.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/components/ProductForm.tsx",["517","518","519","520","521","522","523","524","525"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/components/TagForm.tsx",["526","527","528","529","530"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/components/TagMenu.tsx",["531"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/trpc-client.ts",["532"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/_layout.tsx",["533","534"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-product/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-product/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-slot/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-slot/index.tsx",["535"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-store/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-store/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-tag/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/add-tag/index.tsx",["536"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/address-management/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/complaints/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/complaints/index.tsx",["537"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/coupons/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/coupons/index.tsx",["538","539"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/create-coupon/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/create-coupon/index.tsx",["540","541"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard/index.tsx",["542"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/delivery-sequences/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/delivery-sequences/index.tsx",["543","544","545","546","547","548","549"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-coupon/[id]/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-product/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-product/index.tsx",["550"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-slot/[id]/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-slot/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-store/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-store/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-tag/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-tag/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/manage-orders/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/manage-orders/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/order-details/[id].tsx",["551","552","553","554","555"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/order-details/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/orders/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/orders/index.tsx",["556","557","558"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-detail/[id].tsx",["559","560","561","562","563","564","565","566"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-detail/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-tags/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-tags/index.tsx",["567"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/products/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/products/index.tsx",["568","569"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/slots/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/slots/index.tsx",["570"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/stores/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/stores/index.tsx",["571","572","573"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/user-details/[id]/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/users/index.tsx",["574"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/vendor-snippets/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/vendor-snippets/index.tsx",["575","576","577","578","579","580"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/login.tsx",["581","582"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/AddressPlaceForm.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/AddressZoneForm.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/FullOrderView.tsx",["583","584"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/HorizontalImageScroller.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/OrderNotesForm.tsx",["585","586"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/SlotForm.tsx",["587","588","589"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/SnippetMenu.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/SnippetOrdersView.tsx",["590","591","592","593","594"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/StoreForm.tsx",["595"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/TabNavigation.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/VendorSnippetForm.tsx",["596","597"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/app-container.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/context/auth-context.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/context/roles-context.tsx",["598","599","600","601","602"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/context/staff-auth-context.tsx",["603","604"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/dashboard-header.tsx",["605"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/date-time-picker.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/day-account-view.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ui/IconSymbol.ios.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ui/IconSymbol.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ui/TabBarBackground.ios.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ui/TabBarBackground.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/create-product-group.tsx",["606"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/edit-product-group/[id].tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-groupings/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/product-groupings/index.tsx",["607","608"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/slots/slot-details.tsx",["609"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/ProductGroupForm.tsx",["610"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/src/api-hooks/banner.api.ts",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/index.tsx",["611","612"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/index.tsx",["613","614","615","616"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/[id].tsx",["617","618","619","620"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/components/BannerForm.tsx",["621","622","623"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/prices-overview/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/prices-overview/index.tsx",["624","625","626","627"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/rebalance-orders/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/rebalance-orders/index.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/coupons/reserved-coupons/index.tsx",["628","629","630"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/customize-app/_layout.tsx",[],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/customize-app/index.tsx",["631"],[],"/Users/mohammedshafiuddin/WebDev/freshyo/apps/admin-ui/app/(drawer)/customize-app/popular-items.tsx",["632","633"],[],{"ruleId":"634","severity":1,"message":"635","line":3,"column":10,"nodeType":null,"messageId":"636","endLine":3,"endColumn":15},{"ruleId":"634","severity":1,"message":"637","line":4,"column":18,"nodeType":null,"messageId":"636","endLine":4,"endColumn":28},{"ruleId":"634","severity":1,"message":"638","line":5,"column":13,"nodeType":null,"messageId":"636","endLine":5,"endColumn":16},{"ruleId":"634","severity":1,"message":"639","line":6,"column":96,"nodeType":null,"messageId":"636","endLine":6,"endColumn":106},{"ruleId":"634","severity":1,"message":"640","line":8,"column":8,"nodeType":null,"messageId":"636","endLine":8,"endColumn":21},{"ruleId":"634","severity":1,"message":"641","line":62,"column":11,"nodeType":null,"messageId":"636","endLine":62,"endColumn":16},{"ruleId":"642","severity":2,"message":"643","line":101,"column":27,"nodeType":"644","endLine":101,"endColumn":38},{"ruleId":"642","severity":2,"message":"645","line":107,"column":9,"nodeType":"644","endLine":107,"endColumn":25},{"ruleId":"642","severity":2,"message":"646","line":110,"column":9,"nodeType":"644","endLine":110,"endColumn":28},{"ruleId":"634","severity":1,"message":"635","line":3,"column":10,"nodeType":null,"messageId":"636","endLine":3,"endColumn":15},{"ruleId":"634","severity":1,"message":"640","line":8,"column":8,"nodeType":null,"messageId":"636","endLine":8,"endColumn":21},{"ruleId":"647","severity":1,"message":"648","line":38,"column":6,"nodeType":"649","endLine":38,"endColumn":36,"suggestions":"650"},{"ruleId":"642","severity":2,"message":"643","line":67,"column":27,"nodeType":"644","endLine":67,"endColumn":38},{"ruleId":"642","severity":2,"message":"645","line":74,"column":9,"nodeType":"644","endLine":74,"endColumn":25},{"ruleId":"634","severity":1,"message":"651","line":25,"column":41,"nodeType":null,"messageId":"636","endLine":25,"endColumn":51},{"ruleId":"634","severity":1,"message":"652","line":1,"column":48,"nodeType":null,"messageId":"636","endLine":1,"endColumn":63},{"ruleId":"634","severity":1,"message":"653","line":4,"column":10,"nodeType":null,"messageId":"636","endLine":4,"endColumn":23},{"ruleId":"634","severity":1,"message":"654","line":4,"column":25,"nodeType":null,"messageId":"636","endLine":4,"endColumn":38},{"ruleId":"634","severity":1,"message":"655","line":2,"column":10,"nodeType":null,"messageId":"636","endLine":2,"endColumn":14},{"ruleId":"634","severity":1,"message":"656","line":4,"column":24,"nodeType":null,"messageId":"636","endLine":4,"endColumn":30},{"ruleId":"634","severity":1,"message":"657","line":2,"column":16,"nodeType":null,"messageId":"636","endLine":2,"endColumn":20},{"ruleId":"634","severity":1,"message":"658","line":199,"column":9,"nodeType":null,"messageId":"636","endLine":199,"endColumn":15},{"ruleId":"634","severity":1,"message":"658","line":346,"column":9,"nodeType":null,"messageId":"636","endLine":346,"endColumn":15},{"ruleId":"634","severity":1,"message":"655","line":2,"column":10,"nodeType":null,"messageId":"636","endLine":2,"endColumn":14},{"ruleId":"634","severity":1,"message":"659","line":3,"column":10,"nodeType":null,"messageId":"636","endLine":3,"endColumn":12},{"ruleId":"634","severity":1,"message":"660","line":6,"column":10,"nodeType":null,"messageId":"636","endLine":6,"endColumn":24},{"ruleId":"634","severity":1,"message":"661","line":10,"column":3,"nodeType":null,"messageId":"636","endLine":10,"endColumn":19},{"ruleId":"634","severity":1,"message":"662","line":14,"column":3,"nodeType":null,"messageId":"636","endLine":14,"endColumn":15},{"ruleId":"634","severity":1,"message":"663","line":23,"column":10,"nodeType":null,"messageId":"636","endLine":23,"endColumn":24},{"ruleId":"647","severity":1,"message":"664","line":371,"column":6,"nodeType":"649","endLine":371,"endColumn":48,"suggestions":"665"},{"ruleId":"634","severity":1,"message":"666","line":720,"column":24,"nodeType":null,"messageId":"636","endLine":720,"endColumn":29},{"ruleId":"634","severity":1,"message":"666","line":765,"column":24,"nodeType":null,"messageId":"636","endLine":765,"endColumn":29},{"ruleId":"634","severity":1,"message":"666","line":825,"column":24,"nodeType":null,"messageId":"636","endLine":825,"endColumn":29},{"ruleId":"634","severity":1,"message":"657","line":2,"column":16,"nodeType":null,"messageId":"636","endLine":2,"endColumn":20},{"ruleId":"634","severity":1,"message":"667","line":4,"column":3,"nodeType":null,"messageId":"636","endLine":4,"endColumn":13},{"ruleId":"634","severity":1,"message":"668","line":186,"column":9,"nodeType":null,"messageId":"636","endLine":186,"endColumn":26},{"ruleId":"634","severity":1,"message":"669","line":188,"column":9,"nodeType":null,"messageId":"636","endLine":188,"endColumn":26},{"ruleId":"634","severity":1,"message":"670","line":195,"column":9,"nodeType":null,"messageId":"636","endLine":195,"endColumn":27},{"ruleId":"634","severity":1,"message":"671","line":202,"column":9,"nodeType":null,"messageId":"636","endLine":202,"endColumn":28},{"ruleId":"634","severity":1,"message":"672","line":92,"column":9,"nodeType":null,"messageId":"636","endLine":92,"endColumn":11},{"ruleId":"634","severity":1,"message":"673","line":145,"column":9,"nodeType":null,"messageId":"636","endLine":145,"endColumn":23},{"ruleId":"634","severity":1,"message":"658","line":438,"column":9,"nodeType":null,"messageId":"636","endLine":438,"endColumn":15},{"ruleId":"634","severity":1,"message":"674","line":1,"column":27,"nodeType":null,"messageId":"636","endLine":1,"endColumn":36},{"ruleId":"634","severity":1,"message":"662","line":5,"column":14,"nodeType":null,"messageId":"636","endLine":5,"endColumn":26},{"ruleId":"634","severity":1,"message":"675","line":6,"column":25,"nodeType":null,"messageId":"636","endLine":6,"endColumn":37},{"ruleId":"634","severity":1,"message":"676","line":12,"column":42,"nodeType":null,"messageId":"636","endLine":12,"endColumn":58},{"ruleId":"634","severity":1,"message":"677","line":12,"column":60,"nodeType":null,"messageId":"636","endLine":12,"endColumn":74},{"ruleId":"634","severity":1,"message":"678","line":12,"column":76,"nodeType":null,"messageId":"636","endLine":12,"endColumn":86},{"ruleId":"634","severity":1,"message":"679","line":23,"column":10,"nodeType":null,"messageId":"636","endLine":23,"endColumn":23},{"ruleId":"634","severity":1,"message":"680","line":26,"column":10,"nodeType":null,"messageId":"636","endLine":26,"endColumn":20},{"ruleId":"634","severity":1,"message":"681","line":2,"column":34,"nodeType":null,"messageId":"636","endLine":2,"endColumn":39},{"ruleId":"634","severity":1,"message":"682","line":6,"column":64,"nodeType":null,"messageId":"636","endLine":6,"endColumn":75},{"ruleId":"647","severity":1,"message":"683","line":29,"column":9,"nodeType":"684","endLine":29,"endColumn":48},{"ruleId":"634","severity":1,"message":"662","line":4,"column":10,"nodeType":null,"messageId":"636","endLine":4,"endColumn":22},{"ruleId":"634","severity":1,"message":"685","line":100,"column":19,"nodeType":null,"messageId":"636","endLine":100,"endColumn":30},{"ruleId":"634","severity":1,"message":"686","line":136,"column":9,"nodeType":null,"messageId":"636","endLine":136,"endColumn":18},{"ruleId":"687","severity":2,"message":"688","line":156,"column":69,"nodeType":"689","messageId":"690","suggestions":"691"},{"ruleId":"634","severity":1,"message":"692","line":43,"column":5,"nodeType":null,"messageId":"636","endLine":43,"endColumn":14},{"ruleId":"634","severity":1,"message":"693","line":2,"column":28,"nodeType":null,"messageId":"636","endLine":2,"endColumn":44},{"ruleId":"634","severity":1,"message":"694","line":2,"column":53,"nodeType":null,"messageId":"636","endLine":2,"endColumn":63},{"ruleId":"634","severity":1,"message":"666","line":52,"column":14,"nodeType":null,"messageId":"636","endLine":52,"endColumn":19},{"ruleId":"634","severity":1,"message":"695","line":147,"column":9,"nodeType":null,"messageId":"636","endLine":147,"endColumn":22},{"ruleId":"634","severity":1,"message":"696","line":148,"column":9,"nodeType":null,"messageId":"636","endLine":148,"endColumn":22},{"ruleId":"634","severity":1,"message":"658","line":154,"column":9,"nodeType":null,"messageId":"636","endLine":154,"endColumn":15},{"ruleId":"634","severity":1,"message":"658","line":14,"column":9,"nodeType":null,"messageId":"636","endLine":14,"endColumn":15},{"ruleId":"634","severity":1,"message":"666","line":24,"column":14,"nodeType":null,"messageId":"636","endLine":24,"endColumn":19},{"ruleId":"634","severity":1,"message":"635","line":3,"column":10,"nodeType":null,"messageId":"636","endLine":3,"endColumn":15},{"ruleId":"634","severity":1,"message":"697","line":30,"column":9,"nodeType":null,"messageId":"636","endLine":30,"endColumn":20},{"ruleId":"634","severity":1,"message":"693","line":2,"column":27,"nodeType":null,"messageId":"636","endLine":2,"endColumn":43},{"ruleId":"634","severity":1,"message":"666","line":35,"column":14,"nodeType":null,"messageId":"636","endLine":35,"endColumn":19},{"ruleId":"634","severity":1,"message":"698","line":1,"column":17,"nodeType":null,"messageId":"636","endLine":1,"endColumn":25},{"ruleId":"634","severity":1,"message":"674","line":1,"column":27,"nodeType":null,"messageId":"636","endLine":1,"endColumn":36},{"ruleId":"634","severity":1,"message":"699","line":1,"column":38,"nodeType":null,"messageId":"636","endLine":1,"endColumn":45},{"ruleId":"687","severity":2,"message":"700","line":94,"column":74,"nodeType":"689","messageId":"690","suggestions":"701"},{"ruleId":"687","severity":2,"message":"700","line":94,"column":94,"nodeType":"689","messageId":"690","suggestions":"702"},{"ruleId":"687","severity":2,"message":"700","line":116,"column":78,"nodeType":"689","messageId":"690","suggestions":"703"},{"ruleId":"687","severity":2,"message":"700","line":116,"column":92,"nodeType":"689","messageId":"690","suggestions":"704"},{"ruleId":"687","severity":2,"message":"688","line":137,"column":56,"nodeType":"689","messageId":"690","suggestions":"705"},{"ruleId":"706","severity":1,"message":"707","line":17,"column":18,"nodeType":"644","messageId":"708","endLine":17,"endColumn":30,"suggestions":"709"},{"ruleId":"634","severity":1,"message":"698","line":1,"column":17,"nodeType":null,"messageId":"636","endLine":1,"endColumn":25},{"ruleId":"647","severity":1,"message":"710","line":98,"column":6,"nodeType":"649","endLine":98,"endColumn":17,"suggestions":"711"},{"ruleId":"634","severity":1,"message":"712","line":1,"column":8,"nodeType":null,"messageId":"636","endLine":1,"endColumn":13},{"ruleId":"634","severity":1,"message":"713","line":1,"column":17,"nodeType":null,"messageId":"636","endLine":1,"endColumn":30},{"ruleId":"634","severity":1,"message":"674","line":1,"column":44,"nodeType":null,"messageId":"636","endLine":1,"endColumn":53},{"ruleId":"634","severity":1,"message":"698","line":1,"column":55,"nodeType":null,"messageId":"636","endLine":1,"endColumn":63},{"ruleId":"634","severity":1,"message":"714","line":1,"column":65,"nodeType":null,"messageId":"636","endLine":1,"endColumn":74},{"ruleId":"647","severity":1,"message":"715","line":53,"column":6,"nodeType":"649","endLine":53,"endColumn":8,"suggestions":"716"},{"ruleId":"647","severity":1,"message":"717","line":91,"column":6,"nodeType":"649","endLine":91,"endColumn":8,"suggestions":"718"},{"ruleId":"647","severity":1,"message":"719","line":53,"column":6,"nodeType":"649","endLine":53,"endColumn":18,"suggestions":"720"},{"ruleId":"634","severity":1,"message":"655","line":2,"column":10,"nodeType":null,"messageId":"636","endLine":2,"endColumn":14},{"ruleId":"634","severity":1,"message":"721","line":11,"column":3,"nodeType":null,"messageId":"636","endLine":11,"endColumn":15},{"ruleId":"634","severity":1,"message":"722","line":138,"column":10,"nodeType":null,"messageId":"636","endLine":138,"endColumn":22},{"ruleId":"634","severity":1,"message":"666","line":134,"column":40,"nodeType":null,"messageId":"636","endLine":134,"endColumn":45},{"ruleId":"634","severity":1,"message":"723","line":4,"column":55,"nodeType":null,"messageId":"636","endLine":4,"endColumn":60},{"ruleId":"634","severity":1,"message":"724","line":6,"column":10,"nodeType":null,"messageId":"636","endLine":6,"endColumn":23},{"ruleId":"634","severity":1,"message":"666","line":48,"column":14,"nodeType":null,"messageId":"636","endLine":48,"endColumn":19},{"ruleId":"647","severity":1,"message":"725","line":51,"column":6,"nodeType":"649","endLine":51,"endColumn":19,"suggestions":"726"},{"ruleId":"634","severity":1,"message":"666","line":129,"column":14,"nodeType":null,"messageId":"636","endLine":129,"endColumn":19},{"ruleId":"634","severity":1,"message":"666","line":170,"column":14,"nodeType":null,"messageId":"636","endLine":170,"endColumn":19},{"ruleId":"634","severity":1,"message":"666","line":200,"column":22,"nodeType":null,"messageId":"636","endLine":200,"endColumn":27},{"ruleId":"634","severity":1,"message":"724","line":6,"column":10,"nodeType":null,"messageId":"636","endLine":6,"endColumn":23},{"ruleId":"634","severity":1,"message":"727","line":10,"column":11,"nodeType":null,"messageId":"636","endLine":10,"endColumn":17},{"ruleId":"647","severity":1,"message":"728","line":68,"column":6,"nodeType":"649","endLine":68,"endColumn":28,"suggestions":"729"},{"ruleId":"634","severity":1,"message":"666","line":109,"column":14,"nodeType":null,"messageId":"636","endLine":109,"endColumn":19},{"ruleId":"634","severity":1,"message":"693","line":2,"column":28,"nodeType":null,"messageId":"636","endLine":2,"endColumn":44},{"ruleId":"634","severity":1,"message":"724","line":3,"column":18,"nodeType":null,"messageId":"636","endLine":3,"endColumn":31},{"ruleId":"634","severity":1,"message":"640","line":9,"column":8,"nodeType":null,"messageId":"636","endLine":9,"endColumn":21},{"ruleId":"634","severity":1,"message":"662","line":13,"column":3,"nodeType":null,"messageId":"636","endLine":13,"endColumn":15},{"ruleId":"647","severity":1,"message":"730","line":169,"column":9,"nodeType":"684","endLine":169,"endColumn":42},{"ruleId":"647","severity":1,"message":"731","line":169,"column":9,"nodeType":"684","endLine":169,"endColumn":42},{"ruleId":"647","severity":1,"message":"732","line":170,"column":9,"nodeType":"684","endLine":170,"endColumn":51},{"ruleId":"634","severity":1,"message":"681","line":2,"column":34,"nodeType":null,"messageId":"636","endLine":2,"endColumn":39},{"ruleId":"634","severity":1,"message":"733","line":9,"column":10,"nodeType":null,"messageId":"636","endLine":9,"endColumn":26},{"ruleId":"647","severity":1,"message":"734","line":118,"column":9,"nodeType":"684","endLine":118,"endColumn":66},{"ruleId":"634","severity":1,"message":"667","line":2,"column":16,"nodeType":null,"messageId":"636","endLine":2,"endColumn":26},{"ruleId":"634","severity":1,"message":"699","line":1,"column":38,"nodeType":null,"messageId":"636","endLine":1,"endColumn":45},{"ruleId":"634","severity":1,"message":"661","line":10,"column":3,"nodeType":null,"messageId":"636","endLine":10,"endColumn":19},"@typescript-eslint/no-unused-vars","'Image' is defined but never used.","unusedVar","'FieldArray' is defined but never used.","'Yup' is defined but never used.","'DatePicker' is defined but never used.","'MaterialIcons' is defined but never used.","'theme' is assigned a value but never used.","react-hooks/rules-of-hooks","React Hook \"useCallback\" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function.","Identifier","React Hook \"useFocusCallback\" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function.","React Hook \"useImperativeHandle\" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'existingImageUrl'. Either include it or remove the dependency array. If 'setImage' needs the current value of 'existingImageUrl', you can also switch to useReducer instead of useState and read 'existingImageUrl' in the reducer.","ArrayExpression",["735"],"'isDeleting' is assigned a value but never used.","'TRPCClientError' is defined but never used.","'useNavigation' is defined but never used.","'DrawerActions' is defined but never used.","'View' is defined but never used.","'MyText' is defined but never used.","'Text' is defined but never used.","'router' is assigned a value but never used.","'tw' is defined but never used.","'LinearGradient' is defined but never used.","'RenderItemParams' is defined but never used.","'AppContainer' is defined but never used.","'useQueryClient' is defined but never used.","React Hook useMemo has missing dependencies: 'deliverySequence' and 'orders'. Either include them or remove the dependency array.",["736"],"'error' is defined but never used.","'ScrollView' is defined but never used.","'showRefundOptions' is assigned a value but never used.","'getRefundDotColor' is assigned a value but never used.","'getRefundTextColor' is assigned a value but never used.","'getRefundStatusText' is assigned a value but never used.","'id' is assigned a value but never used.","'getStatusColor' is assigned a value but never used.","'useEffect' is defined but never used.","'FontAwesome5' is defined but never used.","'useAnimatedStyle' is defined but never used.","'useSharedValue' is defined but never used.","'withSpring' is defined but never used.","'adminResponse' is assigned a value but never used.","'uploadUrls' is assigned a value but never used.","'Alert' is defined but never used.","'MyTextInput' is defined but never used.","The 'products' logical expression could make the dependencies of useMemo Hook (at line 48) change on every render. To fix this, wrap the initialization of 'products' in its own useMemo() Hook.","VariableDeclarator","'deleteStore' is assigned a value but never used.","'cardWidth' is assigned a value but never used.","react/no-unescaped-entities","`'` can be escaped with `'`, `‘`, `'`, `’`.","JSXText","unescapedEntityAlts",["737","738","739","740"],"'isLoading' is assigned a value but never used.","'TouchableOpacity' is defined but never used.","'Dimensions' is defined but never used.","'createSnippet' is assigned a value but never used.","'updateSnippet' is assigned a value but never used.","'totalAmount' is assigned a value but never used.","'useState' is defined but never used.","'useMemo' is defined but never used.","`\"` can be escaped with `"`, `“`, `"`, `”`.",["741","742","743","744"],["745","746","747","748"],["749","750","751","752"],["753","754","755","756"],["757","758","759","760"],"@typescript-eslint/no-empty-object-type","An empty interface declaration allows any non-nullish value, including literals like `0` and `\"\"`.\n- If that's what you want, disable this lint rule with an inline comment or configure the 'allowInterfaces' rule option.\n- If you want a type meaning \"any object\", you probably want `object` instead.\n- If you want a type meaning \"any value\", you probably want `unknown` instead.","noEmptyInterface",["761","762"],"React Hook useEffect has a missing dependency: 'formik'. Either include it or remove the dependency array.",["763"],"'React' is defined but never used.","'createContext' is defined but never used.","'ReactNode' is defined but never used.","React Hook useEffect has missing dependencies: 'pathname' and 'router'. Either include them or remove the dependency array.",["764"],"React Hook useEffect has a missing dependency: 'logout'. Either include it or remove the dependency array.",["765"],"React Hook React.useEffect has a missing dependency: 'spinAnim'. Either include it or remove the dependency array.",["766"],"'BottomDialog' is defined but never used.","'viewProducts' is assigned a value but never used.","'theme' is defined but never used.","'FormikHelpers' is defined but never used.","React Hook React.useEffect has a missing dependency: 'banners'. Either include it or remove the dependency array.",["767"],"'Banner' is defined but never used.","React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array.",["768"],"The 'stores' logical expression could make the dependencies of useMemo Hook (at line 175) change on every render. To fix this, wrap the initialization of 'stores' in its own useMemo() Hook.","The 'stores' logical expression could make the dependencies of useEffect Hook (at line 192) change on every render. To fix this, wrap the initialization of 'stores' in its own useMemo() Hook.","The 'allProducts' logical expression could make the dependencies of useMemo Hook (at line 200) change on every render. Move it inside the useMemo callback. Alternatively, wrap the initialization of 'allProducts' in its own useMemo() Hook.","'useInfiniteQuery' is defined but never used.","The 'coupons' logical expression could make the dependencies of useMemo Hook (at line 135) change on every render. Move it inside the useMemo callback. Alternatively, wrap the initialization of 'coupons' in its own useMemo() Hook.",{"desc":"769","fix":"770"},{"desc":"771","fix":"772"},{"messageId":"773","data":"774","fix":"775","desc":"776"},{"messageId":"773","data":"777","fix":"778","desc":"779"},{"messageId":"773","data":"780","fix":"781","desc":"782"},{"messageId":"773","data":"783","fix":"784","desc":"785"},{"messageId":"773","data":"786","fix":"787","desc":"788"},{"messageId":"773","data":"789","fix":"790","desc":"791"},{"messageId":"773","data":"792","fix":"793","desc":"794"},{"messageId":"773","data":"795","fix":"796","desc":"797"},{"messageId":"773","data":"798","fix":"799","desc":"788"},{"messageId":"773","data":"800","fix":"801","desc":"791"},{"messageId":"773","data":"802","fix":"803","desc":"794"},{"messageId":"773","data":"804","fix":"805","desc":"797"},{"messageId":"773","data":"806","fix":"807","desc":"788"},{"messageId":"773","data":"808","fix":"809","desc":"791"},{"messageId":"773","data":"810","fix":"811","desc":"794"},{"messageId":"773","data":"812","fix":"813","desc":"797"},{"messageId":"773","data":"814","fix":"815","desc":"788"},{"messageId":"773","data":"816","fix":"817","desc":"791"},{"messageId":"773","data":"818","fix":"819","desc":"794"},{"messageId":"773","data":"820","fix":"821","desc":"797"},{"messageId":"773","data":"822","fix":"823","desc":"776"},{"messageId":"773","data":"824","fix":"825","desc":"779"},{"messageId":"773","data":"826","fix":"827","desc":"782"},{"messageId":"773","data":"828","fix":"829","desc":"785"},{"messageId":"830","data":"831","fix":"832","desc":"833"},{"messageId":"830","data":"834","fix":"835","desc":"836"},{"desc":"837","fix":"838"},{"desc":"839","fix":"840"},{"desc":"841","fix":"842"},{"desc":"843","fix":"844"},{"desc":"845","fix":"846"},{"desc":"847","fix":"848"},"Update the dependencies array to be: [existingImageUrl, initialValues.isDashboardTag]",{"range":"849","text":"850"},"Update the dependencies array to be: [orders, selectedUserId, deliverySequence]",{"range":"851","text":"852"},"replaceWithAlt",{"alt":"853"},{"range":"854","text":"855"},"Replace with `'`.",{"alt":"856"},{"range":"857","text":"858"},"Replace with `‘`.",{"alt":"859"},{"range":"860","text":"861"},"Replace with `'`.",{"alt":"862"},{"range":"863","text":"864"},"Replace with `’`.",{"alt":"865"},{"range":"866","text":"867"},"Replace with `"`.",{"alt":"868"},{"range":"869","text":"870"},"Replace with `“`.",{"alt":"871"},{"range":"872","text":"873"},"Replace with `"`.",{"alt":"874"},{"range":"875","text":"876"},"Replace with `”`.",{"alt":"865"},{"range":"877","text":"878"},{"alt":"868"},{"range":"879","text":"880"},{"alt":"871"},{"range":"881","text":"882"},{"alt":"874"},{"range":"883","text":"884"},{"alt":"865"},{"range":"885","text":"886"},{"alt":"868"},{"range":"887","text":"888"},{"alt":"871"},{"range":"889","text":"890"},{"alt":"874"},{"range":"891","text":"892"},{"alt":"865"},{"range":"893","text":"865"},{"alt":"868"},{"range":"894","text":"868"},{"alt":"871"},{"range":"895","text":"871"},{"alt":"874"},{"range":"896","text":"874"},{"alt":"853"},{"range":"897","text":"898"},{"alt":"856"},{"range":"899","text":"900"},{"alt":"859"},{"range":"901","text":"902"},{"alt":"862"},{"range":"903","text":"904"},"replaceEmptyInterface",{"replacement":"905"},{"range":"906","text":"907"},"Replace empty interface with `object`.",{"replacement":"908"},{"range":"909","text":"910"},"Replace empty interface with `unknown`.","Update the dependencies array to be: [formik, isEditing]",{"range":"911","text":"912"},"Update the dependencies array to be: [pathname, router]",{"range":"913","text":"914"},"Update the dependencies array to be: [logout]",{"range":"915","text":"916"},"Update the dependencies array to be: [refreshing, spinAnim]",{"range":"917","text":"918"},"Update the dependencies array to be: [banners, bannersData]",{"range":"919","text":"920"},"Update the dependencies array to be: [bannerId, bannerData, router]",{"range":"921","text":"922"},[1284,1314],"[existingImageUrl, initialValues.isDashboardTag]",[11758,11800],"[orders, selectedUserId, deliverySequence]","'",[5672,5718],"We couldn't load the stores. Please try again.","‘",[5672,5718],"We couldn‘t load the stores. Please try again.","'",[5672,5718],"We couldn't load the stores. Please try again.","’",[5672,5718],"We couldn’t load the stores. Please try again.",""",[3153,3179]," product(s) from snippet "","“",[3153,3179]," product(s) from snippet “",""",[3153,3179]," product(s) from snippet "","”",[3153,3179]," product(s) from snippet ”",[3198,3208],""\n ",[3198,3208],"“\n ",[3198,3208],""\n ",[3198,3208],"”\n ",[3830,3842],"Orders for "",[3830,3842],"Orders for “",[3830,3842],"Orders for "",[3830,3842],"Orders for ”",[3855,3856],[3855,3856],[3855,3856],[3855,3856],[4770,4852],"\n No orders found that match this snippet's criteria\n ",[4770,4852],"\n No orders found that match this snippet‘s criteria\n ",[4770,4852],"\n No orders found that match this snippet's criteria\n ",[4770,4852],"\n No orders found that match this snippet’s criteria\n ","object",[534,587],"type StoreFormRef = object","unknown",[534,587],"type StoreFormRef = unknown",[2998,3009],"[formik, isEditing]",[1709,1711],"[pathname, router]",[2596,2598],"[logout]",[1465,1477],"[refreshing, spinAnim]",[1979,1992],"[banners, bannersData]",[2002,2024],"[bannerId, bannerData, router]"]
\ No newline at end of file
diff --git a/apps/admin-ui/.expo/devices.json b/apps/admin-ui/.expo/devices.json
new file mode 100644
index 0000000..5efff6c
--- /dev/null
+++ b/apps/admin-ui/.expo/devices.json
@@ -0,0 +1,3 @@
+{
+ "devices": []
+}
diff --git a/apps/admin-ui/.expo/prebuild/cached-packages.json b/apps/admin-ui/.expo/prebuild/cached-packages.json
new file mode 100644
index 0000000..7e9df5c
--- /dev/null
+++ b/apps/admin-ui/.expo/prebuild/cached-packages.json
@@ -0,0 +1,4 @@
+{
+ "dependencies": "091948e86692e0cce7744b6b0543448538c3125a",
+ "devDependencies": "b3b38265f32b99a8299270a292f38ca26288d53d"
+}
diff --git a/apps/admin-ui/.expo/types/router.d.ts b/apps/admin-ui/.expo/types/router.d.ts
new file mode 100644
index 0000000..6b43803
--- /dev/null
+++ b/apps/admin-ui/.expo/types/router.d.ts
@@ -0,0 +1,14 @@
+/* eslint-disable */
+import * as Router from 'expo-router';
+
+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)'}/create-product-group` | `/create-product-group`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/add-product` | `/add-product`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/add-slot` | `/add-slot`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/add-store` | `/add-store`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/add-tag` | `/add-tag`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/address-management` | `/address-management`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/create-coupon` | `/create-coupon`; 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` | `/dashboard-banners`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create-banner` | `/dashboard-banners/create-banner`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/delivery-sequences` | `/delivery-sequences`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/edit-product` | `/edit-product`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/edit-store` | `/edit-store`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/edit-tag` | `/edit-tag`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/orders` | `/orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/edit-banner/[id]` | `/dashboard-banners/edit-banner/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/edit-coupon/[id]` | `/edit-coupon/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/edit-product-group/[id]` | `/edit-product-group/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/edit-slot/[id]` | `/edit-slot/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/order-details/[id]` | `/order-details/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/product-detail/[id]` | `/product-detail/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/user-details/[id]` | `/user-details/[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)'}/create-product-group` | `/create-product-group`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/add-product` | `/add-product`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/add-slot` | `/add-slot`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/add-store` | `/add-store`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/add-tag` | `/add-tag`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/address-management` | `/address-management`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/create-coupon` | `/create-coupon`; 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` | `/dashboard-banners`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create-banner` | `/dashboard-banners/create-banner`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/delivery-sequences` | `/delivery-sequences`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/edit-product` | `/edit-product`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/edit-store` | `/edit-store`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/edit-tag` | `/edit-tag`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/orders` | `/orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/edit-banner/[id]` | `/dashboard-banners/edit-banner/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/edit-coupon/[id]` | `/edit-coupon/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/edit-product-group/[id]` | `/edit-product-group/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/edit-slot/[id]` | `/edit-slot/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/order-details/[id]` | `/order-details/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/product-detail/[id]` | `/product-detail/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/user-details/[id]` | `/user-details/[id]`, params: Router.UnknownOutputParams & { id: string; } };
+ href: Router.RelativePathString | Router.ExternalPathString | `/${`?${string}` | `#${string}` | ''}` | `/login${`?${string}` | `#${string}` | ''}` | `/_sitemap${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/create-product-group${`?${string}` | `#${string}` | ''}` | `/create-product-group${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/add-product${`?${string}` | `#${string}` | ''}` | `/add-product${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/add-slot${`?${string}` | `#${string}` | ''}` | `/add-slot${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/add-store${`?${string}` | `#${string}` | ''}` | `/add-store${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/add-tag${`?${string}` | `#${string}` | ''}` | `/add-tag${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/address-management${`?${string}` | `#${string}` | ''}` | `/address-management${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/complaints${`?${string}` | `#${string}` | ''}` | `/complaints${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/coupons${`?${string}` | `#${string}` | ''}` | `/coupons${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/coupons/reserved-coupons${`?${string}` | `#${string}` | ''}` | `/coupons/reserved-coupons${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/create-coupon${`?${string}` | `#${string}` | ''}` | `/create-coupon${`?${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${`?${string}` | `#${string}` | ''}` | `/dashboard-banners${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard-banners/create-banner${`?${string}` | `#${string}` | ''}` | `/dashboard-banners/create-banner${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/delivery-sequences${`?${string}` | `#${string}` | ''}` | `/delivery-sequences${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/edit-product${`?${string}` | `#${string}` | ''}` | `/edit-product${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/edit-store${`?${string}` | `#${string}` | ''}` | `/edit-store${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/edit-tag${`?${string}` | `#${string}` | ''}` | `/edit-tag${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders${`?${string}` | `#${string}` | ''}` | `/manage-orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/orders${`?${string}` | `#${string}` | ''}` | `/orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/prices-overview${`?${string}` | `#${string}` | ''}` | `/prices-overview${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-groupings${`?${string}` | `#${string}` | ''}` | `/product-groupings${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-tags${`?${string}` | `#${string}` | ''}` | `/product-tags${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products${`?${string}` | `#${string}` | ''}` | `/products${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/rebalance-orders${`?${string}` | `#${string}` | ''}` | `/rebalance-orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots${`?${string}` | `#${string}` | ''}` | `/slots${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots/slot-details${`?${string}` | `#${string}` | ''}` | `/slots/slot-details${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/stores${`?${string}` | `#${string}` | ''}` | `/stores${`?${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)'}/create-product-group` | `/create-product-group`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/add-product` | `/add-product`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/add-slot` | `/add-slot`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/add-store` | `/add-store`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/add-tag` | `/add-tag`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/address-management` | `/address-management`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/create-coupon` | `/create-coupon`; 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` | `/dashboard-banners`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create-banner` | `/dashboard-banners/create-banner`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/delivery-sequences` | `/delivery-sequences`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/edit-product` | `/edit-product`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/edit-store` | `/edit-store`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/edit-tag` | `/edit-tag`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/orders` | `/orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownInputParams; } | `${'/(drawer)'}/dashboard-banners/edit-banner/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/dashboard-banners/edit-banner/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/edit-coupon/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/edit-coupon/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/edit-product-group/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/edit-product-group/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/edit-slot/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/edit-slot/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/order-details/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/order-details/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-detail/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/product-detail/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/user-details/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/user-details/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | { pathname: `${'/(drawer)'}/dashboard-banners/edit-banner/[id]` | `/dashboard-banners/edit-banner/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/edit-coupon/[id]` | `/edit-coupon/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/edit-product-group/[id]` | `/edit-product-group/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/edit-slot/[id]` | `/edit-slot/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/order-details/[id]` | `/order-details/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/product-detail/[id]` | `/product-detail/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/user-details/[id]` | `/user-details/[id]`, params: Router.UnknownInputParams & { id: string | number; } };
+ }
+ }
+}
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_108.png b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_108.png
new file mode 100644
index 0000000..0f6e273
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_108.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_162.png b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_162.png
new file mode 100644
index 0000000..3be8da9
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_162.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_216.png b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_216.png
new file mode 100644
index 0000000..54fc6e9
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_216.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_324.png b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_324.png
new file mode 100644
index 0000000..e248f83
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_324.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_432.png b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_432.png
new file mode 100644
index 0000000..fbb272c
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-adaptive-foreground/android-adaptive-foreground-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-transparent/icon_432.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_144.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_144.png
new file mode 100644
index 0000000..fa56768
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_144.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_192.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_192.png
new file mode 100644
index 0000000..e704616
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_192.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_48.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_48.png
new file mode 100644
index 0000000..4cc3153
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_48.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_72.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_72.png
new file mode 100644
index 0000000..61233cc
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_72.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_96.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_96.png
new file mode 100644
index 0000000..dfb81e4
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-circle/android-standard-circle-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_96.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_144.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_144.png
new file mode 100644
index 0000000..0413650
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_144.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_192.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_192.png
new file mode 100644
index 0000000..8cfea23
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_192.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_48.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_48.png
new file mode 100644
index 0000000..f75244d
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_48.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_72.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_72.png
new file mode 100644
index 0000000..b5b67c8
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_72.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_96.png b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_96.png
new file mode 100644
index 0000000..98d390a
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/android-standard-square/android-standard-square-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#fff0f6/icon_96.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/iconsuniversal-icon/iconsuniversal-icon-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#ffffff/App-Icon-1024x1024@1x.png b/apps/admin-ui/.expo/web/cache/production/images/iconsuniversal-icon/iconsuniversal-icon-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#ffffff/App-Icon-1024x1024@1x.png
new file mode 100644
index 0000000..3ee4406
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/iconsuniversal-icon/iconsuniversal-icon-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-cover-#ffffff/App-Icon-1024x1024@1x.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_200.png b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_200.png
new file mode 100644
index 0000000..ce070bf
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_200.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_300.png b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_300.png
new file mode 100644
index 0000000..6ac7e85
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_300.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_400.png b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_400.png
new file mode 100644
index 0000000..d0c150c
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_400.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_600.png b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_600.png
new file mode 100644
index 0000000..d48100c
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_600.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_800.png b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_800.png
new file mode 100644
index 0000000..750fe21
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/splash-android/splash-android-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_800.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_200.png b/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_200.png
new file mode 100644
index 0000000..ce070bf
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_200.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_400.png b/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_400.png
new file mode 100644
index 0000000..d0c150c
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_400.png differ
diff --git a/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_600.png b/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_600.png
new file mode 100644
index 0000000..d48100c
Binary files /dev/null and b/apps/admin-ui/.expo/web/cache/production/images/splash-ios/splash-ios-3a02c603f3580be3c731fe6fe225bd822968f9a49abc196da934f1abf264d906-contain/icon_600.png differ
diff --git a/apps/admin-ui/.gitignore b/apps/admin-ui/.gitignore
new file mode 100755
index 0000000..5873d9a
--- /dev/null
+++ b/apps/admin-ui/.gitignore
@@ -0,0 +1,6 @@
+
+# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
+# The following patterns were generated by expo-cli
+
+expo-env.d.ts
+# @end expo-cli
\ No newline at end of file
diff --git a/apps/admin-ui/README.md b/apps/admin-ui/README.md
new file mode 100755
index 0000000..48dd63f
--- /dev/null
+++ b/apps/admin-ui/README.md
@@ -0,0 +1,50 @@
+# Welcome to your Expo app 👋
+
+This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
+
+## Get started
+
+1. Install dependencies
+
+ ```bash
+ npm install
+ ```
+
+2. Start the app
+
+ ```bash
+ npx expo start
+ ```
+
+In the output, you'll find options to open the app in a
+
+- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
+- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
+- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
+- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
+
+You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
+
+## Get a fresh project
+
+When you're ready, run:
+
+```bash
+npm run reset-project
+```
+
+This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
+
+## Learn more
+
+To learn more about developing your project with Expo, look at the following resources:
+
+- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
+- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
+
+## Join the community
+
+Join our community of developers creating universal apps.
+
+- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
+- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
diff --git a/apps/admin-ui/app.json b/apps/admin-ui/app.json
new file mode 100644
index 0000000..74cfd1b
--- /dev/null
+++ b/apps/admin-ui/app.json
@@ -0,0 +1,81 @@
+{
+ "expo": {
+ "name": "Symbuyote Admin",
+ "slug": "freshyoadmin",
+ "version": "1.0.0",
+ "orientation": "portrait",
+ "icon": "./assets/images/symbuyoteadmin.png",
+ "scheme": "freshyoadmin",
+ "userInterfaceStyle": "automatic",
+ "newArchEnabled": true,
+ "ios": {
+ "supportsTablet": true,
+ "bundleIdentifier": "in.freshyo.adminui",
+ "infoPlist": {
+ "LSApplicationQueriesSchemes": [
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay"
+ ]
+ }
+ },
+ "android": {
+ "adaptiveIcon": {
+ "foregroundImage": "./assets/images/symbuyoteadmin.png",
+ "backgroundColor": "#fff0f6"
+ },
+ "edgeToEdgeEnabled": true,
+ "package": "in.freshyo.adminui"
+ },
+ "web": {
+ "bundler": "metro",
+ "output": "static",
+ "favicon": "./assets/images/favicon.png"
+ },
+ "plugins": [
+ "expo-router",
+ [
+ "expo-splash-screen",
+ {
+ "image": "./assets/images/symbuyoteadmin.png",
+ "imageWidth": 200,
+ "resizeMode": "contain",
+ "backgroundColor": "#ffffff"
+ }
+ ],
+ "expo-secure-store"
+ ],
+ "experiments": {
+ "typedRoutes": true
+ },
+ "extra": {
+ "router": {},
+ "eas": {
+ "projectId": "55e2f200-eb9d-4880-a193-70f59320e054"
+ }
+ },
+ "runtimeVersion": {
+ "policy": "appVersion"
+ },
+ "updates": {
+ "url": "https://u.expo.dev/55e2f200-eb9d-4880-a193-70f59320e054"
+ }
+ }
+}
diff --git a/apps/admin-ui/app/(drawer)/_layout.tsx b/apps/admin-ui/app/(drawer)/_layout.tsx
new file mode 100644
index 0000000..fe09f61
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/_layout.tsx
@@ -0,0 +1,232 @@
+import { Drawer } from "expo-router/drawer";
+import { DrawerContentScrollView, DrawerItem } from "@react-navigation/drawer";
+import { useRouter, Redirect } from "expo-router";
+import { useNavigation, DrawerActions } from "@react-navigation/native";
+import {
+ TouchableOpacity,
+ DeviceEventEmitter,
+ View,
+ ActivityIndicator,
+} from "react-native";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { REFRESH_EVENT } from "common-ui/src/lib/const-strs";
+import { useStaffAuth } from "@/components/context/staff-auth-context";
+import { tw, MyText, theme } from "common-ui";
+
+function CustomDrawerContent() {
+ const router = useRouter();
+ const { logout, staff } = useStaffAuth();
+
+ return (
+
+ {staff && (
+
+
+
+
+ {staff.name}
+
+ Staff Member
+
+
+ )}
+ router.push("/(drawer)/dashboard" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ {/* router.push("/(drawer)/add-product" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ /> */}
+ router.push("/(drawer)/products" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ router.push("/(drawer)/prices-overview" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ router.push("/(drawer)/product-groupings" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ router.push("/(drawer)/dashboard-banners" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ router.push("/(drawer)/slots" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ {/* router.push("/(drawer)/edit-product" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ /> */}
+ router.push("/(drawer)/complaints" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ router.push("/(drawer)/manage-orders" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ router.push("coupons" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ router.push("vendor-snippets" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ router.push("/(drawer)/stores" as any)}
+ icon={({ color, size }) => (
+
+ )}
+ />
+ logout()}
+ icon={({ color, size }) => (
+
+ )}
+ />
+
+ );
+}
+
+export default function Layout() {
+ const { isLoggedIn, isLoading } = useStaffAuth();
+
+ if (isLoading) {
+ return (
+
+
+
+ );
+ }
+
+ if (!isLoggedIn) {
+ return ;
+ }
+
+ return (
+ ({
+ headerShown: true,
+ headerStyle: {
+ backgroundColor: theme.colors.gray1,
+ shadowOpacity: 0,
+ shadowRadius: 0,
+ shadowOffset: { height: 0, width: 0 },
+ elevation: 0,
+ },
+ headerTitleAlign: "center",
+ headerLeft: () => (
+ (navigation as any).openDrawer()}
+ style={{
+ marginLeft: 15,
+ width: 40,
+ height: 40,
+ borderRadius: 20,
+ backgroundColor: "#f2f2f2",
+ justifyContent: "center",
+ alignItems: "center",
+ }}
+ >
+
+
+ ),
+ headerRight: () => (
+ {
+ DeviceEventEmitter.emit(REFRESH_EVENT);
+ }}
+ >
+
+
+ ),
+ })}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/admin-ui/app/(drawer)/add-product/_layout.tsx b/apps/admin-ui/app/(drawer)/add-product/_layout.tsx
new file mode 100644
index 0000000..0bb91f7
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/add-product/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/add-product/index.tsx b/apps/admin-ui/app/(drawer)/add-product/index.tsx
new file mode 100644
index 0000000..67aa694
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/add-product/index.tsx
@@ -0,0 +1,89 @@
+import React from 'react';
+import { Alert } from 'react-native';
+import { AppContainer } from 'common-ui';
+import ProductForm from '../../../src/components/ProductForm';
+import { useCreateProduct, CreateProductPayload } from '../../../src/api-hooks/product.api';
+
+export default function AddProduct() {
+ const { mutate: createProduct, isPending: isCreating } = useCreateProduct();
+
+ const handleSubmit = (values: any, images?: { uri?: string, mimeType?: string }[]) => {
+ const payload: CreateProductPayload = {
+ name: values.name,
+ shortDescription: values.shortDescription,
+ longDescription: values.longDescription,
+ unitId: parseInt(values.unitId),
+ storeId: parseInt(values.storeId),
+ price: parseFloat(values.price),
+ marketPrice: values.marketPrice ? parseFloat(values.marketPrice) : undefined,
+ incrementStep: 1,
+ productQuantity: values.productQuantity || 1,
+ };
+
+ const formData = new FormData();
+ Object.entries(payload).forEach(([key, value]) => {
+ if (value !== undefined && value !== null) {
+ formData.append(key, value as string);
+ }
+ });
+
+ // Append tag IDs
+ if (values.tagIds && values.tagIds.length > 0) {
+ values.tagIds.forEach((tagId: number) => {
+ formData.append('tagIds', tagId.toString());
+ });
+ }
+
+ // Append images
+ if (images) {
+ images.forEach((image, index) => {
+ if (image.uri) {
+ formData.append('images', {
+ uri: image.uri,
+ name: `image-${index}.jpg`,
+ // type: 'image/jpeg',
+ type: image.mimeType as any,
+ } as any);
+ }
+ });
+ }
+
+ createProduct(formData, {
+ onSuccess: (data) => {
+ Alert.alert('Success', 'Product created successfully!');
+ // Reset form or navigate
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to create product');
+ },
+ });
+ };
+
+ const initialValues = {
+ name: '',
+ shortDescription: '',
+ longDescription: '',
+ unitId: 0,
+ price: '',
+ storeId: 1,
+ marketPrice: '',
+ deals: [{ quantity: '', price: '', validTill: new Date() }],
+ tagIds: [],
+ isSuspended: false,
+ isFlashAvailable: false,
+ flashPrice: '',
+ productQuantity: 1,
+ };
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/add-slot/_layout.tsx b/apps/admin-ui/app/(drawer)/add-slot/_layout.tsx
new file mode 100644
index 0000000..6ce19b7
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/add-slot/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/add-slot/index.tsx b/apps/admin-ui/app/(drawer)/add-slot/index.tsx
new file mode 100644
index 0000000..5ee2002
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/add-slot/index.tsx
@@ -0,0 +1,22 @@
+import React from 'react';
+import { View } from 'react-native';
+import { AppContainer } from 'common-ui';
+import SlotForm from '../../../components/SlotForm';
+import { useRouter } from 'expo-router';
+import { trpc } from '../../../src/trpc-client';
+
+export default function AddSlot() {
+ const router = useRouter();
+ const { refetch } = trpc.admin.slots.getAll.useQuery();
+
+ const handleSlotAdded = () => {
+ refetch();
+ router.back();
+ };
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/add-store/_layout.tsx b/apps/admin-ui/app/(drawer)/add-store/_layout.tsx
new file mode 100644
index 0000000..1b2194e
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/add-store/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/add-store/index.tsx b/apps/admin-ui/app/(drawer)/add-store/index.tsx
new file mode 100644
index 0000000..0313cb6
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/add-store/index.tsx
@@ -0,0 +1,38 @@
+import React from 'react';
+import { View, Alert } from 'react-native';
+import { useRouter } from 'expo-router';
+import { AppContainer, MyText, tw } from 'common-ui';
+import StoreForm, { StoreFormData } from '@/components/StoreForm';
+import { trpc } from '@/src/trpc-client';
+
+export default function AddStore() {
+ const router = useRouter();
+
+ const createStoreMutation = trpc.admin.store.createStore.useMutation();
+
+ const handleSubmit = (values: StoreFormData) => {
+ createStoreMutation.mutate(values, {
+ onSuccess: (data) => {
+ Alert.alert('Success', data.message);
+ router.push('/(drawer)/stores' as any); // Navigate back to stores list
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to create store');
+ },
+ });
+ };
+
+ return (
+
+
+ Add New Store
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/add-tag/_layout.tsx b/apps/admin-ui/app/(drawer)/add-tag/_layout.tsx
new file mode 100644
index 0000000..c1c246f
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/add-tag/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/add-tag/index.tsx b/apps/admin-ui/app/(drawer)/add-tag/index.tsx
new file mode 100644
index 0000000..1d83c32
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/add-tag/index.tsx
@@ -0,0 +1,77 @@
+import React from 'react';
+import { View, Alert } from 'react-native';
+import { useRouter } from 'expo-router';
+import { AppContainer, MyText, tw } from 'common-ui';
+import TagForm from '@/src/components/TagForm';
+import { useCreateTag } from '@/src/api-hooks/tag.api';
+
+interface TagFormData {
+ tagName: string;
+ tagDescription: string;
+ isDashboardTag: boolean;
+}
+
+export default function AddTag() {
+ const router = useRouter();
+ const { mutate: createTag, isPending: isCreating } = useCreateTag();
+
+ const handleSubmit = (values: TagFormData, image?: { uri?: string }) => {
+ const formData = new FormData();
+
+ // Add text fields
+ formData.append('tagName', values.tagName);
+ if (values.tagDescription) {
+ formData.append('tagDescription', values.tagDescription);
+ }
+ formData.append('isDashboardTag', values.isDashboardTag.toString());
+
+ // Add image if uploaded
+ if (image?.uri) {
+ const filename = image.uri.split('/').pop() || 'image.jpg';
+ const match = /\.(\w+)$/.exec(filename);
+ const type = match ? `image/${match[1]}` : 'image/jpeg';
+
+ formData.append('image', {
+ uri: image.uri,
+ name: filename,
+ type,
+ } as any);
+ }
+
+ createTag(formData, {
+ onSuccess: (data) => {
+ Alert.alert('Success', 'Tag created successfully', [
+ {
+ text: 'OK',
+ onPress: () => router.back(),
+ },
+ ]);
+ },
+ onError: (error: any) => {
+ const errorMessage = error.message || 'Failed to create tag';
+ Alert.alert('Error', errorMessage);
+ },
+ });
+ };
+
+ const initialValues: TagFormData = {
+ tagName: '',
+ tagDescription: '',
+ isDashboardTag: false,
+ };
+
+ return (
+
+
+
+ {/* Form */}
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/address-management/index.tsx b/apps/admin-ui/app/(drawer)/address-management/index.tsx
new file mode 100644
index 0000000..69745b8
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/address-management/index.tsx
@@ -0,0 +1,108 @@
+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)/complaints/_layout.tsx b/apps/admin-ui/app/(drawer)/complaints/_layout.tsx
new file mode 100644
index 0000000..32d78fa
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/complaints/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/complaints/index.tsx b/apps/admin-ui/app/(drawer)/complaints/index.tsx
new file mode 100644
index 0000000..cc1e38f
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/complaints/index.tsx
@@ -0,0 +1,158 @@
+import React, { useState } from "react";
+import { View, Text, TouchableOpacity, Alert } from "react-native";
+import { tw, ConfirmationDialog, MyText, MyFlatList, useMarkDataFetchers, usePagination, ImageViewerURI } from "common-ui";
+import { trpc } from "@/src/trpc-client";
+
+export default function Complaints() {
+ const { currentPage, pageSize, PaginationComponent } = usePagination(5); // 5 complaints per page for testing
+ const { data, isLoading, error, refetch } = trpc.admin.complaint.getAll.useQuery({
+ page: currentPage,
+ limit: pageSize,
+ });
+ const resolveComplaint = trpc.admin.complaint.resolve.useMutation();
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const [dialogOpen, setDialogOpen] = useState(false);
+ const [selectedComplaintId, setSelectedComplaintId] = useState(null);
+
+ const complaints = data?.complaints || [];
+ const totalCount = data?.totalCount || 0;
+
+ const handleMarkResolved = (id: number) => {
+ setSelectedComplaintId(id);
+ setDialogOpen(true);
+ };
+
+ const handleConfirmResolve = (response?: string) => {
+ if (!selectedComplaintId) return;
+
+ resolveComplaint.mutate(
+ { id: String(selectedComplaintId), response },
+ {
+ onSuccess: () => {
+ Alert.alert("Success", "Complaint marked as resolved");
+ refetch();
+ setDialogOpen(false);
+ setSelectedComplaintId(null);
+ },
+ onError: (error: any) => {
+ Alert.alert(
+ "Error",
+ error.message || "Failed to resolve complaint"
+ );
+ setDialogOpen(false);
+ setSelectedComplaintId(null);
+ },
+ }
+ );
+ };
+
+ if (isLoading) {
+ return (
+
+ Loading complaints...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+ Error loading complaints
+
+ );
+ }
+
+ return (
+
+ item.id.toString()}
+ renderItem={({ item }) => (
+
+ Complaint #{item.id}
+ {item.text}
+
+ {item.images && item.images.length > 0 && (
+
+ Attached Images:
+
+ {item.images.map((imageUri: string, index: number) => (
+
+ ))}
+
+
+ )}
+
+
+
+ Alert.alert("User Page", "User page coming soon")
+ }
+ >
+
+ {item.userName}
+
+
+ |
+ {item.orderId && (
+
+ Alert.alert("Order Page", "Order page coming soon")
+ }
+ >
+
+ Order #{item.orderId}
+
+
+ )}
+
+
+ Status: {item.status}
+
+ {item.status === "pending" && (
+ handleMarkResolved(item.id)}
+ style={tw`mt-2 bg-blue-500 p-3 rounded-lg shadow-md`}
+ >
+ Mark as Resolved
+
+ )}
+
+ )}
+ ListEmptyComponent={
+
+ No complaints found
+
+ }
+ />
+
+ {
+ setDialogOpen(false);
+ setSelectedComplaintId(null);
+ }}
+ title="Mark as Resolved"
+ message="Add admin notes for this resolution:"
+ confirmText="Resolve"
+ cancelText="Cancel"
+ />
+
+ );
+}
diff --git a/apps/admin-ui/app/(drawer)/coupons/_layout.tsx b/apps/admin-ui/app/(drawer)/coupons/_layout.tsx
new file mode 100644
index 0000000..777af67
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/coupons/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/coupons/index.tsx b/apps/admin-ui/app/(drawer)/coupons/index.tsx
new file mode 100644
index 0000000..e17c248
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/coupons/index.tsx
@@ -0,0 +1,515 @@
+import React, { useState, useCallback, useMemo } from 'react';
+import { View, TouchableOpacity, Alert, RefreshControl, Dimensions } from 'react-native';
+import { MaterialCommunityIcons } from '@expo/vector-icons';
+import { LinearGradient } from 'expo-linear-gradient';
+import { tw, MyButton, MyText, SearchBar, MyFlatList, useMarkDataFetchers, MyTouchableOpacity, BottomDropdown } from 'common-ui';
+import useManualRefresh from 'common-ui/hooks/useManualRefresh';
+import { trpc } from '@/src/trpc-client';
+import { useRouter } from 'expo-router';
+import { TabView, SceneMap, TabBar } from 'react-native-tab-view';
+
+const CouponItem = ({ item, onDelete }: { item: any; onDelete: (id: number) => void }) => {
+ const router = useRouter();
+
+ const getCouponStatus = (coupon: any) => {
+ if (coupon.isInvalidated) return 'inactive';
+ if (coupon.validTill && new Date(coupon.validTill) <= new Date()) return 'expired';
+ return 'active';
+ };
+
+ const status = getCouponStatus(item);
+
+ const getBorderColor = () => {
+ if (status === 'active') return 'border-green-500';
+ if (status === 'expired') return 'border-yellow-500';
+ return 'border-red-500';
+ };
+
+ const getBgColor = () => {
+ if (status === 'active') return 'bg-green-100';
+ if (status === 'expired') return 'bg-yellow-100';
+ return 'bg-red-100';
+ };
+
+ const getTextColor = () => {
+ if (status === 'active') return 'text-green-600';
+ if (status === 'expired') return 'text-yellow-600';
+ return 'text-red-600';
+ };
+
+ const getIconColor = () => {
+ if (status === 'active') return '#10b981';
+ if (status === 'expired') return '#f59e0b';
+ return '#ef4444';
+ };
+
+ return (
+
+
+
+
+
+
+ {item.couponCode}
+ ID: {item.id}
+
+
+
+ {status === 'active' ? 'Active' : status === 'expired' ? 'Expired' : 'Inactive'}
+
+
+
+
+
+
+ Discount: {item.discountPercent ? `${item.discountPercent}% off` : item.flatDiscount ? `₹${item.flatDiscount} off` : 'N/A'}
+
+
+ Min Order: {item.minOrder ? `₹${item.minOrder}` : 'None'}
+ Max: {item.maxValue ? `₹${item.maxValue}` : 'None'}
+
+
+ Valid Till: {item.validTill ? new Date(item.validTill).toLocaleDateString() : 'No expiry'}
+
+
+
+
+
+ Target: {item.isApplyForAll ? 'All Users' : item.applicableUsers?.length > 0 ? `${item.applicableUsers.length} Users` : 'All Users'}
+
+ {item.applicableProducts && item.applicableProducts.length > 0 && (
+
+ Products: {item.applicableProducts.length} selected
+
+ )}
+
+
+
+ router.push(`/(drawer)/edit-coupon/${item.id}`)}
+ style={tw`bg-blue-500 p-3 rounded-lg shadow-md flex-1 flex-row items-center justify-center`}
+ >
+
+ Edit
+
+ onDelete(item.id)}
+ style={tw`bg-red-500 p-3 rounded-lg shadow-md flex-1 flex-row items-center justify-center`}
+ >
+
+ Delete
+
+
+
+ );
+};
+
+const ReservedCouponItem = ({ item }: { item: any }) => {
+ const getStatus = () => {
+ if (item.isRedeemed) return 'redeemed';
+ if (item.validTill && new Date(item.validTill) <= new Date()) return 'expired';
+ return 'active';
+ };
+
+ const status = getStatus();
+
+ const getBorderColor = () => {
+ if (status === 'active') return 'border-green-500';
+ if (status === 'expired') return 'border-yellow-500';
+ return 'border-blue-500';
+ };
+
+ const getBgColor = () => {
+ if (status === 'active') return 'bg-green-100';
+ if (status === 'expired') return 'bg-yellow-100';
+ return 'bg-blue-100';
+ };
+
+ const getTextColor = () => {
+ if (status === 'active') return 'text-green-600';
+ if (status === 'expired') return 'text-yellow-600';
+ return 'text-blue-600';
+ };
+
+ const getIconColor = () => {
+ if (status === 'active') return '#10b981';
+ if (status === 'expired') return '#f59e0b';
+ return '#3b82f6';
+ };
+
+ return (
+
+
+
+
+
+
+ {item.secretCode}
+ Coupon: {item.couponCode}
+
+
+
+ {status === 'active' ? 'Active' : status === 'expired' ? 'Expired' : 'Redeemed'}
+
+
+
+
+
+
+ Discount: {item.discountPercent ? `${item.discountPercent}% off` : item.flatDiscount ? `₹${item.flatDiscount} off` : 'N/A'}
+
+
+ Min Order: {item.minOrder ? `₹${item.minOrder}` : 'None'}
+ Max: {item.maxValue ? `₹${item.maxValue}` : 'None'}
+
+
+ Valid Till: {item.validTill ? new Date(item.validTill).toLocaleDateString() : 'No expiry'}
+
+
+
+ {item.isRedeemed && item.redeemedUser && (
+
+
+ Redeemed by: {item.redeemedUser.name || 'Unknown'} ({item.redeemedUser.mobile})
+
+
+ Redeemed on: {item.redeemedAt ? new Date(item.redeemedAt).toLocaleDateString() : 'N/A'}
+
+
+ )}
+
+
+
+ Created by: {item.creator?.name || 'Unknown'}
+
+
+
+ );
+};
+
+const GeneralTab = () => {
+ const router = useRouter();
+ const [refreshing, setRefreshing] = useState(false);
+ const [searchQuery, setSearchQuery] = useState('');
+ const [statusFilters, setStatusFilters] = useState([]);
+ const {
+ data,
+ fetchNextPage,
+ hasNextPage,
+ isLoading,
+ isFetchingNextPage,
+ error,
+ refetch,
+ } = trpc.admin.coupon.getAll.useInfiniteQuery(
+ { limit: 20, search: searchQuery },
+ { getNextPageParam: (lastPage) => lastPage.nextCursor }
+ );
+
+ const coupons = useMemo(() => data?.pages.flatMap(page => page.coupons) || [], [data]);
+
+ const getCouponStatus = (coupon: any) => {
+ if (coupon.isInvalidated) return 'inactive';
+ if (coupon.validTill && new Date(coupon.validTill) <= new Date()) return 'expired';
+ return 'active';
+ };
+
+ const filteredCoupons = useMemo(() => {
+ let filtered = coupons;
+ if (statusFilters.length > 0) {
+ filtered = filtered.filter(coupon => statusFilters.includes(getCouponStatus(coupon)));
+ }
+ return filtered;
+ }, [coupons, statusFilters]);
+
+ const handleRefresh = useCallback(async () => {
+ setRefreshing(true);
+ await refetch();
+ setRefreshing(false);
+ }, [refetch]);
+
+ useManualRefresh(() => refetch());
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const deleteCoupon = trpc.admin.coupon.delete.useMutation();
+
+ const handleDeleteCoupon = (id: number) => {
+ Alert.alert('Delete Coupon', 'Are you sure you want to delete this coupon?', [
+ { text: 'Cancel', style: 'cancel' },
+ {
+ text: 'Delete',
+ style: 'destructive',
+ onPress: () => {
+ deleteCoupon.mutate({ id }, {
+ onSuccess: () => {
+ Alert.alert('Success', 'Coupon deleted successfully');
+ refetch();
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to delete coupon');
+ },
+ });
+ },
+ },
+ ]);
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading Coupons...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Failed to load coupons
+ refetch()} style={tw`bg-red-500`}>
+ Retry
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+ setStatusFilters(value as string[])}
+ multiple={true}
+ triggerComponent={({ onPress }) => (
+
+
+
+ )}
+ />
+
+ item.id.toString()}
+ renderItem={({ item }) => }
+ refreshControl={
+
+ }
+ contentContainerStyle={tw`px-4 pb-4`}
+ onEndReached={() => {
+ if (hasNextPage && !isFetchingNextPage) {
+ fetchNextPage();
+ }
+ }}
+ onEndReachedThreshold={0.5}
+ ListEmptyComponent={
+
+
+ No Coupons Found
+ {searchQuery ? (
+ setSearchQuery('')} style={tw`bg-gray-500 mt-4`}>
+ Clear Search
+
+ ) : null}
+
+ }
+ />
+
+ );
+};
+
+const ReservedTab = () => {
+ const router = useRouter();
+ const [refreshing, setRefreshing] = useState(false);
+ const [searchQuery, setSearchQuery] = useState('');
+ const [statusFilters, setStatusFilters] = useState([]);
+
+ const {
+ data,
+ isLoading,
+ isFetchingNextPage,
+ hasNextPage,
+ fetchNextPage,
+ error,
+ refetch
+ } = trpc.admin.coupon.getReservedCoupons.useInfiniteQuery(
+ { limit: 20, search: searchQuery },
+ { getNextPageParam: (lastPage) => lastPage.nextCursor }
+ );
+
+ const coupons = useMemo(() => data?.pages.flatMap((page) => page.coupons) || [], [data]);
+
+ const getStatus = (coupon: any) => {
+ if (coupon.isRedeemed) return 'redeemed';
+ if (coupon.validTill && new Date(coupon.validTill) <= new Date()) return 'expired';
+ return 'active';
+ };
+
+ const filteredCoupons = useMemo(() => {
+ let filtered = coupons;
+ if (statusFilters.length > 0) {
+ filtered = filtered.filter(coupon => statusFilters.includes(getStatus(coupon)));
+ }
+ return filtered;
+ }, [coupons, statusFilters]);
+
+ const handleRefresh = useCallback(async () => {
+ setRefreshing(true);
+ await refetch();
+ setRefreshing(false);
+ }, [refetch]);
+
+ useManualRefresh(() => refetch());
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ if (isLoading) {
+ return (
+
+
+ Loading Reserved Coupons...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Failed to load reserved coupons
+ refetch()} style={tw`bg-red-500`}>
+ Retry
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+ setStatusFilters(value as string[])}
+ multiple={true}
+ triggerComponent={({ onPress }) => (
+
+
+
+ )}
+ />
+
+ item.id.toString()}
+ renderItem={({ item }) => }
+ refreshControl={
+
+ }
+ contentContainerStyle={tw`px-4 pb-4`}
+ onEndReached={() => {
+ if (hasNextPage && !isFetchingNextPage) {
+ fetchNextPage();
+ }
+ }}
+ onEndReachedThreshold={0.5}
+ ListEmptyComponent={
+
+
+ No Reserved Coupons Found
+ {searchQuery ? (
+ setSearchQuery('')} style={tw`bg-gray-500 mt-4`}>
+ Clear Search
+
+ ) : null}
+
+ }
+ />
+
+ );
+};
+
+export default function Coupons() {
+ const router = useRouter();
+ const [index, setIndex] = useState(0);
+ const routes = [
+ { key: 'general', title: 'General' },
+ { key: 'reserved', title: 'Reserved' },
+ ];
+
+ return (
+
+ (
+
+ )}
+ />
+ router.push('/(drawer)/create-coupon')}
+ activeOpacity={0.95}
+ style={{ position: 'absolute', bottom: 32, right: 24, zIndex: 100 }}
+ >
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/coupons/reserved-coupons/index.tsx b/apps/admin-ui/app/(drawer)/coupons/reserved-coupons/index.tsx
new file mode 100644
index 0000000..7f1eb81
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/coupons/reserved-coupons/index.tsx
@@ -0,0 +1,248 @@
+import React, { useState, useCallback, useMemo } from 'react';
+import { View, TouchableOpacity, Alert, RefreshControl } from 'react-native';
+import { MaterialCommunityIcons } from '@expo/vector-icons';
+import { LinearGradient } from 'expo-linear-gradient';
+import { tw, MyButton, MyText, SearchBar, MyFlatList, useMarkDataFetchers, MyTouchableOpacity, BottomDropdown } from 'common-ui';
+import useManualRefresh from 'common-ui/hooks/useManualRefresh';
+import { trpc } from '@/src/trpc-client';
+import { useRouter } from 'expo-router';
+import { useInfiniteQuery } from '@tanstack/react-query';
+
+const ReservedCouponItem = ({ item }: { item: any }) => {
+ const getStatus = () => {
+ if (item.isRedeemed) return 'redeemed';
+ if (item.validTill && new Date(item.validTill) <= new Date()) return 'expired';
+ return 'active';
+ };
+
+ const status = getStatus();
+
+ const getBorderColor = () => {
+ if (status === 'active') return 'border-green-500';
+ if (status === 'expired') return 'border-yellow-500';
+ return 'border-blue-500';
+ };
+
+ const getBgColor = () => {
+ if (status === 'active') return 'bg-green-100';
+ if (status === 'expired') return 'bg-yellow-100';
+ return 'bg-blue-100';
+ };
+
+ const getTextColor = () => {
+ if (status === 'active') return 'text-green-600';
+ if (status === 'expired') return 'text-yellow-600';
+ return 'text-blue-600';
+ };
+
+ const getIconColor = () => {
+ if (status === 'active') return '#10b981';
+ if (status === 'expired') return '#f59e0b';
+ return '#3b82f6';
+ };
+
+ return (
+
+
+
+
+
+
+ {item.secretCode}
+ Coupon: {item.couponCode}
+
+
+
+ {status === 'active' ? 'Active' : status === 'expired' ? 'Expired' : 'Redeemed'}
+
+
+
+
+
+
+ Discount: {item.discountPercent ? `${item.discountPercent}% off` : item.flatDiscount ? `₹${item.flatDiscount} off` : 'N/A'}
+
+
+ Min Order: {item.minOrder ? `₹${item.minOrder}` : 'None'}
+ Max: {item.maxValue ? `₹${item.maxValue}` : 'None'}
+
+
+ Valid Till: {item.validTill ? new Date(item.validTill).toLocaleDateString() : 'No expiry'}
+
+
+
+ {item.isRedeemed && item.redeemedUser && (
+
+
+ Redeemed by: {item.redeemedUser.name || 'Unknown'} ({item.redeemedUser.mobile})
+
+
+ Redeemed on: {item.redeemedAt ? new Date(item.redeemedAt).toLocaleDateString() : 'N/A'}
+
+
+ )}
+
+
+
+ Created by: {item.creator?.name || 'Unknown'}
+
+
+
+ );
+};
+
+export default function ReservedCoupons() {
+ const router = useRouter();
+ const [refreshing, setRefreshing] = useState(false);
+ const [searchQuery, setSearchQuery] = useState('');
+ const [statusFilters, setStatusFilters] = useState([]);
+
+ const {
+ data,
+ fetchNextPage,
+ hasNextPage,
+ isLoading,
+ isFetchingNextPage,
+ refetch,
+ } = trpc.admin.coupon.getReservedCoupons.useInfiniteQuery(
+ { limit: 50 },
+ {
+ getNextPageParam: (lastPage) => lastPage.nextCursor,
+ }
+ );
+
+ const coupons = data?.pages.flatMap(page => page.coupons) || [];
+
+ const getStatus = (coupon: any) => {
+ if (coupon.isRedeemed) return 'redeemed';
+ if (coupon.validTill && new Date(coupon.validTill) <= new Date()) return 'expired';
+ return 'active';
+ };
+
+ const filteredCoupons = useMemo(() => {
+ let filtered = coupons.filter(coupon =>
+ coupon.secretCode.toLowerCase().includes(searchQuery.toLowerCase()) ||
+ coupon.couponCode.toLowerCase().includes(searchQuery.toLowerCase())
+ );
+ if (statusFilters.length > 0) {
+ filtered = filtered.filter(coupon => statusFilters.includes(getStatus(coupon)));
+ }
+ return filtered;
+ }, [coupons, searchQuery, statusFilters]);
+
+ const handleRefresh = useCallback(async () => {
+ setRefreshing(true);
+ await refetch();
+ setRefreshing(false);
+ }, [refetch]);
+
+ useManualRefresh(() => refetch());
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ if (isLoading) {
+ return (
+
+
+
+
+ Loading Reserved Coupons...
+
+ );
+ }
+
+ return (
+
+
+
+
+
+ setStatusFilters(value as string[])}
+ multiple={true}
+ triggerComponent={({ onPress }) => (
+
+
+
+ )}
+ />
+
+ item.id.toString()}
+ renderItem={({ item }) => }
+ refreshControl={
+
+ }
+ contentContainerStyle={tw`px-4 pb-4`}
+ onEndReached={() => {
+ if (hasNextPage && !isFetchingNextPage) {
+ fetchNextPage();
+ }
+ }}
+ onEndReachedThreshold={0.5}
+ ListEmptyComponent={
+ searchQuery ? (
+
+
+
+
+ No Results
+ No reserved coupons match “{searchQuery}”
+ setSearchQuery('')} style={tw`bg-gray-500`}>
+ Clear Search
+
+
+ ) : (
+
+
+
+
+ No Reserved Coupons Yet
+ Create your first reserved coupon to start offering secret discounts
+ router.push('/(drawer)/create-coupon')} style={tw`bg-blue-500`}>
+
+
+ Create Reserved Coupon
+
+
+
+ )
+ }
+ />
+
+ {/* FAB for Add New Reserved Coupon */}
+ router.push('/(drawer)/create-coupon')}
+ activeOpacity={0.95}
+ style={{ position: 'absolute', bottom: 32, right: 24, zIndex: 100 }}
+ >
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/create-coupon/_layout.tsx b/apps/admin-ui/app/(drawer)/create-coupon/_layout.tsx
new file mode 100644
index 0000000..b95204e
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/create-coupon/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/create-coupon/index.tsx b/apps/admin-ui/app/(drawer)/create-coupon/index.tsx
new file mode 100644
index 0000000..07523a0
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/create-coupon/index.tsx
@@ -0,0 +1,49 @@
+import React from 'react';
+import { View, Alert } from 'react-native';
+import { tw, AppContainer } from 'common-ui';
+import CouponForm from '../../../src/components/CouponForm';
+import { trpc } from '@/src/trpc-client';
+import { useRouter } from 'expo-router';
+
+export default function CreateCoupon() {
+ const router = useRouter();
+ const createCoupon = trpc.admin.coupon.create.useMutation();
+ const createReservedCoupon = trpc.admin.coupon.createReservedCoupon.useMutation();
+
+ const handleCreateCoupon = (values: any) => {
+ console.log('Form values:', values); // Debug log
+ const { isReservedCoupon, ...rest } = values;
+ // Transform targetUsers array to targetUser for backend compatibility
+ const payload = {
+ ...rest,
+ targetUser: rest.targetUsers?.[0] || undefined,
+ };
+ delete payload.targetUsers;
+ console.log('Payload:', payload); // Debug log
+
+ const mutation = isReservedCoupon ? createReservedCoupon : createCoupon;
+ const isLoading = isReservedCoupon ? createReservedCoupon.isPending : createCoupon.isPending;
+
+ if (isLoading) return; // Prevent double submission
+
+ mutation.mutate(payload, {
+ onSuccess: () => {
+ Alert.alert('Success', `${isReservedCoupon ? 'Reserved coupon' : 'Coupon'} created successfully`, [
+ { text: 'OK', onPress: () => router.back() }
+ ]);
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to create coupon');
+ },
+ });
+ };
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/create-product-group.tsx b/apps/admin-ui/app/(drawer)/create-product-group.tsx
new file mode 100644
index 0000000..8f2bbd5
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/create-product-group.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+import { View } from 'react-native';
+import { AppContainer } from 'common-ui';
+import ProductGroupForm from '../../components/ProductGroupForm';
+import { useRouter } from 'expo-router';
+
+export default function CreateProductGroup() {
+ const router = useRouter();
+
+ return (
+
+ router.back()}
+ onSuccess={() => router.back()}
+ />
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/customize-app/_layout.tsx b/apps/admin-ui/app/(drawer)/customize-app/_layout.tsx
new file mode 100644
index 0000000..913362f
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/customize-app/_layout.tsx
@@ -0,0 +1,22 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/customize-app/index.tsx b/apps/admin-ui/app/(drawer)/customize-app/index.tsx
new file mode 100644
index 0000000..8148277
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/customize-app/index.tsx
@@ -0,0 +1,218 @@
+import React from 'react';
+import { View, ScrollView, Alert } from 'react-native';
+import { Formik } from 'formik';
+import { MyText, MyTextInput, MyTouchableOpacity, tw, AppContainer, Checkbox } from 'common-ui';
+import { trpc } from '../../../src/trpc-client';
+import { useRouter } from 'expo-router';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+
+interface ConstantFormData {
+ constants: ConstantItem[];
+}
+
+interface ConstantItem {
+ key: string;
+ value: any;
+}
+
+const CONST_LABELS: Record = {
+ minRegularOrderValue: 'Minimum Regular Order Value',
+ freeDeliveryThreshold: 'Free Delivery Threshold',
+ deliveryCharge: 'Delivery Charge',
+ flashFreeDeliveryThreshold: 'Flash Free Delivery Threshold',
+ flashDeliveryCharge: 'Flash Delivery Charge',
+ platformFeePercent: 'Platform Fee Percent',
+ taxRate: 'Tax Rate',
+ minOrderAmountForCoupon: 'Minimum Order Amount for Coupon',
+ maxCouponDiscount: 'Maximum Coupon Discount',
+ flashDeliverySlotId: 'Flash Delivery Slot ID',
+ readableOrderId: 'Readable Order ID',
+ versionNum: 'Version Number',
+ playStoreUrl: 'Play Store URL',
+ appStoreUrl: 'App Store URL',
+ popularItems: 'Popular Items',
+ isFlashDeliveryEnabled: 'Enable Flash Delivery',
+ supportMobile: 'Support Mobile',
+ supportEmail: 'Support Email',
+};
+
+interface ConstantInputProps {
+ constant: ConstantItem;
+ setFieldValue: (field: string, value: any) => void;
+ index: number;
+ router: any;
+}
+
+const ConstantInput: React.FC = ({ constant, setFieldValue, index, router }) => {
+ const fieldName = `constants.${index}.value`;
+
+ // Special handling for popularItems - show navigation button instead of input
+ if (constant.key === 'popularItems') {
+ return (
+
+
+ {CONST_LABELS[constant.key] || constant.key}
+
+ router.push('/(drawer)/customize-app/popular-items')}
+ style={tw`bg-blue-50 border-2 border-dashed border-blue-200 p-4 rounded-lg flex-row items-center justify-center`}
+ >
+
+
+ Manage Popular Items ({Array.isArray(constant.value) ? constant.value.length : 0} items)
+
+
+
+
+ );
+ }
+
+ // Handle boolean values - show checkbox
+ if (typeof constant.value === 'boolean') {
+ return (
+
+
+ {CONST_LABELS[constant.key] || constant.key}
+
+
+ setFieldValue(fieldName, !constant.value)}
+ size={28}
+ />
+
+ {constant.value ? 'Enabled' : 'Disabled'}
+
+
+
+ );
+ }
+
+ // Handle different value types
+ if (typeof constant.value === 'number') {
+ return (
+ {
+ const numValue = parseFloat(value);
+ setFieldValue(fieldName, isNaN(numValue) ? 0 : numValue);
+ }}
+ keyboardType="numeric"
+ placeholder="Enter number"
+ />
+ );
+ }
+
+ if (Array.isArray(constant.value)) {
+ return (
+ {
+ const arrayValue = value.split(',').map(s => s.trim()).filter(s => s.length > 0);
+ setFieldValue(fieldName, arrayValue);
+ }}
+ placeholder="Enter comma separated values"
+ />
+ );
+ }
+
+ // Default to string
+ return (
+ setFieldValue(fieldName, value)}
+ placeholder="Enter value"
+ />
+ );
+};
+
+export default function CustomizeApp() {
+ const router = useRouter();
+ const { data: constants, isLoading: isLoadingConstants, refetch } = trpc.admin.const.getConstants.useQuery();
+ const { mutate: updateConstants, isPending: isUpdating } = trpc.admin.const.updateConstants.useMutation();
+
+ const handleSubmit = (values: ConstantFormData) => {
+ // Filter out constants that haven't changed
+ const changedConstants = values.constants.filter((constant, index) => {
+ const original = constants?.[index];
+ return original && JSON.stringify(constant.value) !== JSON.stringify(original.value);
+ });
+
+ if (changedConstants.length === 0) {
+ Alert.alert('No Changes', 'No constants were modified.');
+ return;
+ }
+
+ updateConstants(
+ { constants: changedConstants },
+ {
+ onSuccess: (response) => {
+ Alert.alert('Success', `Updated ${response.updatedCount} constants successfully.`);
+ refetch();
+ },
+ onError: (error) => {
+ Alert.alert('Error', 'Failed to update constants. Please try again.');
+ console.error('Update constants error:', error);
+ },
+ }
+ );
+ };
+
+ if (isLoadingConstants) {
+ return (
+
+ Loading constants...
+
+ );
+ }
+
+ if (!constants) {
+ return (
+
+ Failed to load constants
+
+ );
+ }
+
+ const initialValues: ConstantFormData = {
+ constants: constants.map(c => ({ key: c.key, value: c.value ?? '' } as ConstantItem)),
+ };
+
+
+
+ return (
+
+
+ Customize App Constants
+
+ Modify application constants. Changes will take effect immediately.
+
+
+
+ {({ handleSubmit, values, setFieldValue }) => (
+
+ {values.constants.map((constant, index) => (
+
+
+
+ ))}
+
+ handleSubmit()}
+ disabled={isUpdating}
+ style={tw`bg-blue-500 p-4 rounded-lg mt-6 ${isUpdating ? 'opacity-50' : ''}`}
+ >
+
+ {isUpdating ? 'Updating...' : 'Save Changes'}
+
+
+
+ )}
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/customize-app/popular-items.tsx b/apps/admin-ui/app/(drawer)/customize-app/popular-items.tsx
new file mode 100644
index 0000000..6082bc3
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/customize-app/popular-items.tsx
@@ -0,0 +1,439 @@
+import React, { useState, useEffect, useMemo } from "react";
+import {
+ View,
+ TouchableOpacity,
+ Alert,
+ ActivityIndicator,
+} from "react-native";
+import { Image } from "expo-image";
+import DraggableFlatList, {
+ RenderItemParams,
+ ScaleDecorator,
+} from "react-native-draggable-flatlist";
+import {
+ AppContainer,
+ MyText,
+ tw,
+ BottomDialog,
+ BottomDropdown,
+} from "common-ui";
+import { useRouter } from "expo-router";
+import { trpc } from "../../../src/trpc-client";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { useQueryClient } from "@tanstack/react-query";
+
+interface PopularProduct {
+ id: number;
+ name: string;
+ shortDescription: string | null;
+ price: string;
+ marketPrice: string | null;
+ unit: string;
+ incrementStep: number;
+ productQuantity: number;
+ storeId: number | null;
+ isOutOfStock: boolean;
+ nextDeliveryDate: string | null;
+ images: string[];
+}
+
+interface ProductItemProps {
+ item: PopularProduct;
+ drag: () => void;
+ isActive: boolean;
+ onDelete: (id: number) => void;
+}
+
+const ProductItem: React.FC = ({
+ item,
+ drag,
+ isActive,
+ onDelete,
+}) => {
+ return (
+
+
+
+
+ {/* Drag Handle */}
+
+
+
+
+ {/* Product Image */}
+ {item.images?.[0] ? (
+
+ ) : (
+
+
+
+ )}
+
+ {/* Product Info */}
+
+
+ {item.name}
+
+
+ ₹{item.price}
+
+
+
+ {/* Delete Button */}
+ onDelete(item.id)}
+ style={tw`p-2 ml-2`}
+ >
+
+
+
+
+
+
+ );
+};
+
+export default function CustomizePopularItems() {
+ const router = useRouter();
+ const queryClient = useQueryClient();
+ const [popularProducts, setPopularProducts] = useState([]);
+ const [hasChanges, setHasChanges] = useState(false);
+ const [showAddDialog, setShowAddDialog] = useState(false);
+ const [selectedProductId, setSelectedProductId] = useState(null);
+
+ // Get current popular items from constants
+ const { data: constants, isLoading: isLoadingConstants, error: constantsError } = trpc.admin.const.getConstants.useQuery();
+ const { data: allProducts, isLoading: isLoadingProducts, error: productsError } = trpc.common.product.getAllProductsSummary.useQuery({});
+ const updateConstants = trpc.admin.const.updateConstants.useMutation();
+
+ // Initialize popular products from constants
+ useEffect(() => {
+ if (constants && allProducts?.products) {
+ const popularItemsConstant = constants.find(c => c.key === 'popularItems');
+
+ let popularIds: number[] = [];
+
+ if (popularItemsConstant) {
+ const value = popularItemsConstant.value;
+
+ if (Array.isArray(value)) {
+ // Already an array of IDs
+ popularIds = value.map((id: any) => parseInt(id));
+ } else if (typeof value === 'string') {
+ // Comma-separated string
+ popularIds = value.split(',').map((id: string) => parseInt(id.trim())).filter(id => !isNaN(id));
+ }
+
+ const popularProds: PopularProduct[] = [];
+
+ for (const id of popularIds) {
+ const product = allProducts.products.find(p => p.id === id);
+ if (product) {
+ popularProds.push(product);
+ }
+ }
+
+ setPopularProducts(popularProds);
+ }
+ }
+ }, [constants, allProducts]);
+
+ const handleDragEnd = ({ data }: { data: PopularProduct[] }) => {
+ setPopularProducts(data);
+ setHasChanges(true);
+ };
+
+ const handleDelete = (productId: number) => {
+ Alert.alert(
+ "Remove Product",
+ "Are you sure you want to remove this product from popular items?",
+ [
+ { text: "Cancel", style: "cancel" },
+ {
+ text: "Remove",
+ style: "destructive",
+ onPress: () => {
+ setPopularProducts(prev => prev.filter(p => p.id !== productId));
+ setHasChanges(true);
+ }
+ }
+ ]
+ );
+ };
+
+ const handleAddProduct = () => {
+ if (selectedProductId) {
+ const product = allProducts?.products.find(p => p.id === selectedProductId);
+ if (product && !popularProducts.find(p => p.id === product.id)) {
+ setPopularProducts(prev => [...prev, product as PopularProduct]);
+ setHasChanges(true);
+ setSelectedProductId(null);
+ setShowAddDialog(false);
+ }
+ }
+ };
+
+ const handleSave = () => {
+ const popularIds = popularProducts.map(p => p.id);
+
+ updateConstants.mutate(
+ {
+ constants: [{
+ key: 'popularItems',
+ value: popularIds
+ }]
+ },
+ {
+ onSuccess: () => {
+ setHasChanges(false);
+ Alert.alert('Success', 'Popular items updated successfully!');
+ queryClient.invalidateQueries({ queryKey: ['const.getConstants'] });
+ },
+ onError: (error) => {
+ Alert.alert('Error', 'Failed to update popular items. Please try again.');
+ console.error('Update popular items error:', error);
+ }
+ }
+ );
+ };
+
+ const availableProducts = (allProducts?.products || []).filter(
+ product => !popularProducts.find(p => p.id === product.id)
+ );
+
+ const productOptions = availableProducts.map(product => ({
+ label: `${product.name} - ₹${product.price}`,
+ value: product.id,
+ }));
+
+ // Show loading state while data is being fetched
+ if (isLoadingConstants || isLoadingProducts) {
+ return (
+
+
+ {/* Header */}
+
+ router.back()}
+ style={tw`p-2 -ml-4`}
+ >
+
+
+
+ Popular Items
+
+ {/* Spacer for centering */}
+
+
+ {/* Loading Content */}
+
+
+
+ {isLoadingConstants ? 'Loading constants...' : 'Loading products...'}
+
+
+
+
+ );
+ }
+
+ // Show error state if queries failed
+ if (constantsError || productsError) {
+ return (
+
+
+ {/* Header */}
+
+ router.back()}
+ style={tw`p-2 -ml-4`}
+ >
+
+
+
+ Popular Items
+
+ {/* Spacer for centering */}
+
+
+ {/* Error Content */}
+
+
+ Error
+
+ {constantsError ? 'Failed to load constants' : 'Failed to load products'}
+
+ router.back()}
+ style={tw`mt-6 bg-blue-600 px-6 py-3 rounded-full`}
+ >
+ Go Back
+
+
+
+
+ );
+ }
+
+ return (
+
+
+ {/* Header */}
+
+ router.back()}
+ style={tw`p-2 -ml-4`}
+ >
+
+
+
+ Popular Items
+
+
+
+ {updateConstants.isPending ? 'Saving...' : 'Save'}
+
+
+
+
+ {/* Content */}
+ {popularProducts.length === 0 ? (
+
+
+
+ No popular items configured
+
+
+ Add products to display as popular items
+
+
+ ) : (
+
+
+
+ Long press an item to drag and reorder
+
+
+
+ (
+
+ )}
+ keyExtractor={(item) => item.id.toString()}
+ onDragEnd={handleDragEnd}
+ showsVerticalScrollIndicator={false}
+ contentContainerStyle={tw`pb-8`}
+ />
+
+ )}
+
+ {/* FAB for Add Product */}
+
+ setShowAddDialog(true)}
+ style={tw`bg-blue-600 p-4 rounded-full shadow-lg`}
+ >
+
+
+
+
+ {/* Add Product Dialog */}
+ setShowAddDialog(false)}
+ >
+
+
+
+
+ Add Popular Item
+
+
+ Select a product to add to popular items
+
+
+
+ {availableProducts.length === 0 ? (
+
+
+
+ All products are already in popular items
+
+
+ ) : (
+ <>
+ setSelectedProductId(val as number)}
+ placeholder="Choose a product..."
+ />
+
+
+ setShowAddDialog(false)}
+ style={tw`flex-1 bg-gray-100 p-3 rounded-lg`}
+ >
+
+ Cancel
+
+
+
+
+
+ Add Product
+
+
+
+ >
+ )}
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/dashboard-banners/_layout.tsx b/apps/admin-ui/app/(drawer)/dashboard-banners/_layout.tsx
new file mode 100644
index 0000000..44dc7e9
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/dashboard-banners/_layout.tsx
@@ -0,0 +1,11 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/_layout.tsx b/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/_layout.tsx
new file mode 100644
index 0000000..3d5bd69
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/index.tsx b/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/index.tsx
new file mode 100644
index 0000000..bf4f606
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/dashboard-banners/create-banner/index.tsx
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import { View, TouchableOpacity, Alert } from 'react-native';
+import { AppContainer, MyText, tw } from 'common-ui';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { useRouter } from 'expo-router';
+import { FormikHelpers } from 'formik';
+import BannerForm, { BannerFormData } from '@/components/BannerForm';
+import { trpc } from '../../../../src/trpc-client';
+
+export default function CreateBanner() {
+ const router = useRouter();
+ const [isSubmitting, setIsSubmitting] = useState(false);
+
+ const initialValues: BannerFormData = {
+ name: '',
+ imageUrl: '',
+ description: '',
+ productIds: [],
+ redirectUrl: '',
+ // serialNum removed - assigned automatically by backend
+ };
+
+ const createBannerMutation = trpc.admin.banner.createBanner.useMutation();
+
+ const handleSubmit = async (values: BannerFormData, imageUrl?: string) => {
+ if (!imageUrl) {
+ Alert.alert('Error', 'Image is required');
+ return;
+ }
+
+ setIsSubmitting(true);
+
+ try {
+ await createBannerMutation.mutateAsync({
+ name: values.name,
+ imageUrl,
+ description: values.description || undefined,
+ productIds: values.productIds.length > 0 ? values.productIds : [],
+ redirectUrl: values.redirectUrl || undefined,
+ });
+
+ Alert.alert('Success', 'Banner created successfully', [
+ {
+ text: 'OK',
+ onPress: () => router.back(),
+ }
+ ]);
+ } catch (error) {
+
+ Alert.alert('Error', 'Failed to create banner. Please try again.');
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
+
+ const handleCancel = () => {
+ router.back();
+ };
+
+ return (
+
+
+ {/* Header */}
+
+
+
+
+ Create Banner
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/[id].tsx b/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/[id].tsx
new file mode 100644
index 0000000..b53360e
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/[id].tsx
@@ -0,0 +1,163 @@
+import React, { useState, useEffect } from 'react';
+import { View, TouchableOpacity, Alert } from 'react-native';
+import { AppContainer, MyText, tw } from 'common-ui';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import { FormikHelpers } from 'formik';
+import BannerForm, { BannerFormData } from '@/components/BannerForm';
+import { trpc } from '../../../../src/trpc-client';
+
+interface Banner {
+ id: number;
+ name: string;
+ imageUrl: string;
+ description?: string;
+ productIds?: number[];
+ redirectUrl?: string;
+ serialNum: number;
+ isActive: boolean;
+ createdAt: string;
+ lastUpdated: string;
+}
+
+export default function EditBanner() {
+ const router = useRouter();
+ const { id } = useLocalSearchParams();
+ const bannerId = id as string;
+
+ const [isLoading, setIsLoading] = useState(true);
+ const [isSubmitting, setIsSubmitting] = useState(false);
+ // Load real banner data from API
+ const {data: bannerData } = trpc.admin.banner.getBanner.useQuery({
+ id: parseInt(bannerId)
+ });
+ const [banner, setBanner] = useState(undefined);
+
+
+ useEffect(() => {
+ const loadBanner = async () => {
+ try {
+ setIsLoading(true);
+
+
+
+ if (bannerData) {
+ // Handle data format compatibility (productId -> productIds migration)
+ const processedBanner = {
+ ...bannerData,
+ productIds: Array.isArray(bannerData.productIds)
+ ? bannerData.productIds
+ : (bannerData.productIds ? [bannerData.productIds] : [])
+ };
+
+ setBanner(processedBanner);
+ } else {
+ Alert.alert('Error', 'Banner not found');
+ router.back();
+ }
+ } catch (error) {
+ console.error('Failed to load banner:', error);
+ Alert.alert('Error', 'Failed to load banner data');
+ router.back();
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ loadBanner();
+ }, [bannerId, bannerData]);
+
+ const initialValues: BannerFormData = banner ? {
+ name: banner.name,
+ imageUrl: banner.imageUrl,
+ description: banner.description || '',
+ productIds: banner.productIds || [],
+ redirectUrl: banner.redirectUrl || '',
+ // serialNum removed - handled automatically by backend
+ } : {
+ name: '',
+ imageUrl: '',
+ description: '',
+ productIds: [],
+ redirectUrl: '',
+ // serialNum removed - handled automatically by backend
+ };
+
+ const updateBannerMutation = trpc.admin.banner.updateBanner.useMutation();
+
+ const handleSubmit = async (values: BannerFormData, imageUrl?: string) => {
+ if (!banner) return;
+
+ setIsSubmitting(true);
+
+ try {
+ await updateBannerMutation.mutateAsync({
+ id: banner.id,
+ name: values.name,
+ imageUrl: imageUrl || banner.imageUrl,
+ description: values.description || undefined,
+ productIds: values.productIds.length > 0 ? values.productIds : [],
+ redirectUrl: values.redirectUrl || undefined,
+ });
+
+ Alert.alert('Success', 'Banner updated successfully', [
+ {
+ text: 'OK',
+ onPress: () => router.back(),
+ }
+ ]);
+ } catch (error) {
+ Alert.alert('Error', 'Failed to update banner. Please try again.');
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
+
+ const handleCancel = () => {
+ router.back();
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading banner...
+
+
+ );
+ }
+
+ if (!banner) {
+ return (
+
+
+ Banner not found
+
+
+ );
+ }
+
+ return (
+
+
+ {/* Header */}
+
+
+
+
+ Edit Banner
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/_layout.tsx b/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/_layout.tsx
new file mode 100644
index 0000000..1e4f7b1
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/dashboard-banners/edit-banner/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ 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
new file mode 100644
index 0000000..4123c9a
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/dashboard-banners/index.tsx
@@ -0,0 +1,467 @@
+import React, { useState } from 'react';
+import { View, ScrollView, TouchableOpacity, Alert, Image, RefreshControl } from 'react-native';
+import { AppContainer, MyText, tw, MyTouchableOpacity } from 'common-ui';
+import { trpc } from '../../../src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { useRouter } from 'expo-router';
+
+interface Banner {
+ id: number;
+ name: string;
+ imageUrl: string;
+ description: string | null;
+ productIds: number[] | null;
+ redirectUrl: string | null;
+ serialNum: number | null;
+ isActive: boolean;
+ createdAt: string;
+ lastUpdated: string;
+}
+
+export default function DashboardBanners() {
+ const router = useRouter();
+ const [refreshing, setRefreshing] = useState(false);
+
+ // Edit mode state
+ const [editMode, setEditMode] = useState(false);
+ const [selectedSlot, setSelectedSlot] = useState(null);
+ const [slotAssignments, setSlotAssignments] = useState<{[slot: number]: number | null}>({});
+ const [originalAssignments, setOriginalAssignments] = useState<{[slot: number]: number | null}>({});
+ const [saving, setSaving] = useState(false);
+
+ // Real API calls
+ const { data: bannersData, isLoading, error, refetch } = trpc.admin.banner.getBanners.useQuery();
+
+ const deleteBannerMutation = trpc.admin.banner.deleteBanner.useMutation();
+ const updateBannerMutation = trpc.admin.banner.updateBanner.useMutation();
+ const emptySlotMutation = trpc.admin.banner.updateBanner.useMutation();
+
+ const banners = bannersData?.banners || [];
+
+ // Initialize slot assignments when banners load
+ React.useEffect(() => {
+ const assignments: {[slot: number]: number | null} = {1: null, 2: null, 3: null, 4: null};
+ banners.forEach(banner => {
+ if (banner.serialNum && banner.serialNum >= 1 && banner.serialNum <= 4) {
+ assignments[banner.serialNum] = banner.id;
+ }
+ });
+ setSlotAssignments(assignments);
+ setOriginalAssignments({...assignments});
+ }, [bannersData]);
+
+ const onRefresh = async () => {
+ setRefreshing(true);
+ await refetch();
+ setRefreshing(false);
+ };
+
+ // Slot and edit mode handlers
+ const handleSlotClick = (slotNumber: number) => {
+ setSelectedSlot(slotNumber);
+ setEditMode(true);
+ };
+
+ const handleBannerSelect = (bannerId: number) => {
+ if (!editMode || selectedSlot === null) return;
+
+ // Remove banner from any existing slot
+ const newAssignments = {...slotAssignments};
+ Object.keys(newAssignments).forEach(slot => {
+ if (newAssignments[parseInt(slot)] === bannerId) {
+ newAssignments[parseInt(slot)] = null;
+ }
+ });
+
+ // Assign banner to selected slot
+ newAssignments[selectedSlot] = bannerId;
+ setSlotAssignments(newAssignments);
+ };
+
+ const handleSave = async () => {
+ setSaving(true);
+ try {
+ // Get banners that need to be updated
+ const bannersToUpdate: {id: number, serialNum: number | null}[] = [];
+
+ // Clear serial numbers for banners no longer in slots
+ banners.forEach(banner => {
+ const currentSlot = banner.serialNum;
+ const assignedSlot = Object.keys(slotAssignments).find(slot =>
+ slotAssignments[parseInt(slot)] === banner.id
+ );
+
+ if (currentSlot !== (assignedSlot ? parseInt(assignedSlot) : null)) {
+ bannersToUpdate.push({
+ id: banner.id,
+ serialNum: assignedSlot ? parseInt(assignedSlot) : null
+ });
+ }
+ });
+
+ // Update banners that gained slots
+ Object.keys(slotAssignments).forEach(slot => {
+ const slotNum = parseInt(slot);
+ const bannerId = slotAssignments[slotNum];
+ if (bannerId) {
+ const banner = banners.find(b => b.id === bannerId);
+ if (banner && banner.serialNum !== slotNum) {
+ bannersToUpdate.push({
+ id: bannerId,
+ serialNum: slotNum
+ });
+ }
+ }
+ });
+
+ // Execute updates
+ await Promise.all(
+ bannersToUpdate.map(({id, serialNum}) =>
+ updateBannerMutation.mutateAsync({ id, serialNum })
+ )
+ );
+
+ setOriginalAssignments({...slotAssignments});
+ setEditMode(false);
+ setSelectedSlot(null);
+ await refetch();
+ Alert.alert('Success', 'Slot assignments saved successfully');
+ } catch (error) {
+ Alert.alert('Error', 'Failed to save slot assignments');
+ } finally {
+ setSaving(false);
+ }
+ };
+
+ const handleCancel = () => {
+ setSlotAssignments({...originalAssignments});
+ setEditMode(false);
+ setSelectedSlot(null);
+ };
+
+ const handleEmptySlot = async () => {
+ if (!selectedSlot || !slotAssignments[selectedSlot]) return;
+
+ const bannerId = slotAssignments[selectedSlot];
+ const banner = banners.find(b => b.id === bannerId);
+
+ if (!banner) return;
+
+ try {
+ // Update banner's serialNum to null to empty the slot
+ await emptySlotMutation.mutateAsync({
+ id: banner.id,
+ serialNum: null
+ });
+
+ // Update local state
+ setSlotAssignments(prev => ({
+ ...prev,
+ [selectedSlot]: null
+ }));
+
+ // Update original assignments for cancel functionality
+ setOriginalAssignments(prev => ({
+ ...prev,
+ [selectedSlot]: null
+ }));
+
+ Alert.alert('Success', `Slot ${selectedSlot} has been emptied`);
+ } catch (error) {
+ Alert.alert('Error', 'Failed to empty slot');
+ }
+ };
+
+ // Helper function to get banner name by ID
+ const getBannerNameById = (id: number | null) => {
+ if (!id) return null;
+ const banner = banners.find(b => b.id === id);
+ return banner ? banner.name : null;
+ };
+
+ const handleEdit = (banner: Banner) => {
+ router.push(`/dashboard-banners/edit-banner/${banner.id}` as any);
+ };
+
+ const handleDelete = (id: number) => {
+ Alert.alert(
+ 'Delete Banner',
+ 'Are you sure you want to delete this banner?',
+ [
+ { text: 'Cancel', style: 'cancel' },
+ {
+ text: 'Delete',
+ style: 'destructive',
+ onPress: async () => {
+ try {
+ await deleteBannerMutation.mutateAsync({ id });
+ refetch();
+ Alert.alert('Success', 'Banner deleted');
+ } catch (error) {
+ Alert.alert('Error', 'Failed to delete banner');
+ }
+ }
+ }
+ ]
+ );
+ };
+
+ const handleCreate = () => {
+ router.push('/(drawer)/dashboard-banners/create-banner' as any);
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading banners...
+
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Error loading banners
+
+
+ );
+ }
+
+ return (
+
+
+
+ }
+ >
+ {/* Header */}
+ {/*
+ All Banners
+
+
+
+
+ Add New Banner
+
+
+ */}
+
+ {/* Slots Row */}
+
+
+ {editMode ? `Select banner for Slot ${selectedSlot}` : 'Banner Slots'}
+
+
+ {[1, 2, 3, 4].map(slotNum => {
+ const assignedBannerId = slotAssignments[slotNum];
+ const bannerName = getBannerNameById(assignedBannerId);
+ const isSelected = editMode && selectedSlot === slotNum;
+
+ return (
+ handleSlotClick(slotNum)}
+ style={tw`flex-1 mx-1 p-3 rounded-lg border-2 ${
+ isSelected
+ ? 'border-blue-500 bg-blue-50'
+ : assignedBannerId
+ ? 'border-green-300 bg-green-50'
+ : 'border-gray-300 bg-white'
+ }`}
+ >
+
+ Slot {slotNum}
+
+ {bannerName || 'Empty'}
+
+
+
+ );
+ })}
+
+
+ {/* Action buttons in edit mode */}
+ {editMode && (
+
+ {/* Save/Cancel buttons */}
+
+
+ Cancel
+
+
+
+ {saving ? 'Saving...' : 'Save Changes'}
+
+
+
+
+ {/* Empty Slot button */}
+
+
+
+
+ {emptySlotMutation.isPending ? 'Emptying...' : 'Empty Slot'}
+
+
+
+
+ )}
+
+
+ {/* Banners List */}
+
+ {editMode && (
+
+
+ Tap a banner below to assign it to Slot {selectedSlot}
+
+
+ )}
+
+ {banners.length === 0 ? (
+
+
+
+
+ No Banners Yet
+
+ Start by creating your first banner using the button above.
+
+
+ ) : (
+ banners.map((banner) => {
+ const isAssignedToSlot = Object.values(slotAssignments).includes(banner.id);
+ const isAssignedToSelectedSlot = slotAssignments[selectedSlot || 0] === banner.id;
+ const canInteract = editMode;
+
+ return (
+ handleBannerSelect(banner.id) : undefined}
+ disabled={!canInteract}
+ style={tw`bg-white rounded-xl p-4 mb-3 shadow-sm border ${
+ canInteract && isAssignedToSelectedSlot
+ ? 'border-blue-500 bg-blue-50'
+ : canInteract && isAssignedToSlot
+ ? 'border-green-300 bg-green-50'
+ : canInteract
+ ? 'border-gray-200'
+ : 'border-gray-100'
+ }`}
+ >
+
+
+
+
+
+ {banner.name}
+
+
+ {canInteract && isAssignedToSelectedSlot && (
+
+
+
+ )}
+ {canInteract && isAssignedToSlot && !isAssignedToSelectedSlot && (
+
+
+
+ )}
+
+ {!editMode && (
+ <>
+ handleEdit(banner)} style={tw`p-1 mr-1`}>
+
+
+ handleDelete(banner.id)} style={tw`p-1`}>
+
+
+ >
+ )}
+
+
+ {banner.description && (
+
+ {banner.description}
+
+ )}
+
+
+ Created: {new Date(banner.createdAt).toLocaleDateString()}
+
+ {banner.serialNum && banner.serialNum >= 1 && banner.serialNum <= 4 && (
+
+ Slot {banner.serialNum}
+
+ )}
+
+
+
+
+ );
+ })
+ )}
+
+
+
+ {/* Floating Action Button */}
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/dashboard/_layout.tsx b/apps/admin-ui/app/(drawer)/dashboard/_layout.tsx
new file mode 100644
index 0000000..c9990f0
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/dashboard/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ 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
new file mode 100644
index 0000000..55d5b4a
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/dashboard/index.tsx
@@ -0,0 +1,241 @@
+import React from 'react';
+import { View, ScrollView, Pressable } from 'react-native';
+import { useRouter } from 'expo-router';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { MyText, tw } from 'common-ui';
+import { LinearGradient } from 'expo-linear-gradient';
+import { theme } from 'common-ui/src/theme';
+
+interface MenuItem {
+ title: string;
+ icon: string;
+ description?: string;
+ route: string;
+ category: 'quick' | 'products' | 'orders' | 'marketing' | 'settings';
+ iconColor?: string;
+ iconBg?: string;
+}
+
+interface MenuItemComponentProps {
+ item: MenuItem;
+ router: any;
+}
+
+const MenuItemComponent: React.FC = ({ item, router }) => (
+ router.push(item.route as any)}
+ style={({ pressed }) => [
+ tw`flex-row items-center p-4 bg-white border border-gray-100 rounded-xl mb-3 shadow-sm`,
+ pressed && tw`bg-gray-50`,
+ ]}
+ >
+
+
+
+
+ {item.title}
+ {item.description && (
+ {item.description}
+ )}
+
+
+
+);
+
+export default function Dashboard() {
+ const router = useRouter();
+
+ const menuItems: MenuItem[] = [
+ {
+ title: 'Manage Orders',
+ icon: 'shopping-bag',
+ description: 'View and manage customer orders',
+ route: '/(drawer)/orders',
+ category: 'orders',
+ iconColor: '#10B981',
+ iconBg: '#D1FAE5',
+ },
+ {
+ title: 'Delivery Sequences',
+ icon: 'alt-route',
+ description: 'Plan and optimize delivery routes',
+ route: '/(drawer)/delivery-sequences',
+ category: 'orders',
+ iconColor: '#8B5CF6',
+ iconBg: '#EDE9FE',
+ },
+ {
+ title: 'Delivery Slots',
+ icon: 'schedule',
+ description: 'Configure delivery times',
+ route: '/(drawer)/slots' as any,
+ category: 'quick',
+ iconColor: '#06B6D4',
+ iconBg: '#CFFAFE',
+ },
+ {
+ title: 'Add Product',
+ icon: 'add-circle',
+ description: 'Create a new product listing',
+ route: '/(drawer)/add-product',
+ category: 'quick',
+ iconColor: theme.colors.brand500,
+ iconBg: theme.colors.brand50,
+ },
+ {
+ title: 'Complaints',
+ icon: 'report-problem',
+ description: 'Handle customer complaints',
+ route: '/(drawer)/complaints',
+ category: 'quick',
+ iconColor: '#F59E0B',
+ iconBg: '#FEF3C7',
+ },
+ {
+ title: 'Products',
+ icon: 'inventory-2',
+ description: 'Manage product catalog',
+ route: '/(drawer)/products',
+ category: 'products',
+ iconColor: '#6366F1',
+ iconBg: '#E0E7FF',
+ },
+ {
+ title: 'Prices Overview',
+ icon: 'attach-money',
+ description: 'Update product pricing',
+ route: '/(drawer)/prices-overview',
+ category: 'products',
+ iconColor: '#059669',
+ iconBg: '#ECFDF5',
+ },
+ {
+ title: 'Product Tags',
+ icon: 'label',
+ description: 'Organize with tags',
+ route: '/(drawer)/product-tags',
+ category: 'products',
+ iconColor: '#EC4899',
+ iconBg: '#FCE7F3',
+ },
+ {
+ title: 'Product Groupings',
+ icon: 'category',
+ description: 'Group products together',
+ route: '/(drawer)/product-groupings',
+ category: 'products',
+ iconColor: '#8B5CF6',
+ iconBg: '#F3E8FF',
+ },
+ {
+ title: 'Stores',
+ icon: 'store',
+ description: 'Manage store locations',
+ route: '/(drawer)/stores',
+ category: 'settings',
+ iconColor: '#14B8A6',
+ iconBg: '#CCFBF1',
+ },
+ {
+ title: 'Coupons',
+ icon: 'local-offer',
+ description: 'Create discount coupons',
+ route: '/(drawer)/coupons',
+ category: 'marketing',
+ 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',
+ description: 'Customize app settings',
+ route: '/(drawer)/customize-app',
+ category: 'settings',
+ iconColor: '#7C3AED',
+ iconBg: '#F3E8FF',
+ },
+ ];
+
+ const quickActions = menuItems.filter(item => item.category === 'quick');
+
+ const categories = [
+ { key: 'orders', title: 'Orders', icon: 'receipt-long' },
+ { key: 'products', title: 'Products & Inventory', icon: 'inventory' },
+ { key: 'marketing', title: 'Marketing & Promotions', icon: 'campaign' },
+ { key: 'settings', title: 'Settings & Configuration', icon: 'settings' },
+ ];
+
+
+
+ return (
+
+
+ {/* Header with Gradient */}
+ {/*
+ Dashboard
+ Manage your business operations
+ */}
+
+ {/* Quick Actions */}
+
+ Quick Actions
+
+ {quickActions.map((item) => (
+ router.push(item.route as any)}
+ style={({ pressed }) => [
+ tw`bg-white rounded-xl p-3 shadow-sm border border-gray-100 items-center`,
+ { width: 'calc(25% - 9px)' },
+ pressed && tw`bg-gray-50`,
+ ]}
+ >
+
+
+
+
+ {item.title}
+
+
+ ))}
+
+
+
+ {/* Categorized Menu Items */}
+
+ {categories.map((category) => {
+ const categoryItems = menuItems.filter(item => item.category === category.key);
+ if (categoryItems.length === 0) return null;
+
+ return (
+
+
+
+
+
+ {category.title}
+
+ {categoryItems.map(item => )}
+
+ );
+ })}
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/delivery-sequences/_layout.tsx b/apps/admin-ui/app/(drawer)/delivery-sequences/_layout.tsx
new file mode 100644
index 0000000..36149c3
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/delivery-sequences/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/delivery-sequences/index.tsx b/apps/admin-ui/app/(drawer)/delivery-sequences/index.tsx
new file mode 100644
index 0000000..afb2c3c
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/delivery-sequences/index.tsx
@@ -0,0 +1,978 @@
+import React, { useState, useEffect, useMemo } from "react";
+import {
+ View,
+ TouchableOpacity,
+ Alert,
+ ActivityIndicator,
+ Linking,
+} from "react-native";
+import DraggableFlatList, {
+ RenderItemParams,
+ ScaleDecorator,
+} from "react-native-draggable-flatlist";
+import {
+ AppContainer,
+ MyText,
+ tw,
+ useManualRefresh,
+ useMarkDataFetchers,
+ BottomDialog,
+ Checkbox,
+ BottomDropdown,
+} from "common-ui";
+import { useQueryClient } from "@tanstack/react-query";
+import dayjs from "dayjs";
+import { useLocalSearchParams, useRouter } from "expo-router";
+import { trpc } from "@/src/trpc-client";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import Entypo from "@expo/vector-icons/Entypo";
+import * as Location from "expo-location";
+
+// Define types outside
+interface OrderWithSequence {
+ sequenceId: number;
+ readableId: number;
+ isPackaged: boolean;
+ totalAmount: number;
+ address: string;
+ latitude: number | null;
+ longitude: number | null;
+ id: number;
+ isDelivered: boolean;
+ addressId: number;
+ adminNotes?: string | null;
+ customerName?: string | null;
+ assignedUserName?: string | null;
+}
+
+interface SlotProgressProps {
+ slotId: number;
+ orders: any[];
+}
+
+const SlotProgress: React.FC = ({ slotId, orders }) => {
+ const delivered = orders.filter((o) => o.isDelivered).length;
+ const undelivered = orders.filter((o) => !o.isDelivered).length;
+ const packaged = orders.filter((o) => o.isPackaged).length;
+ const notPackaged = orders.filter((o) => !o.isPackaged).length;
+
+ const stats = [
+ { label: "Delivered", value: delivered },
+ { label: "Undelivered", value: undelivered },
+ { label: "Packaged", value: packaged },
+ { label: "Not Packaged", value: notPackaged },
+ ];
+
+ return (
+
+
+ Slot {slotId} Statistics
+
+
+ {stats.map((stat, index) => (
+
+
+
+ {stat.value}
+
+ {stat.label}
+
+
+ ))}
+
+
+ );
+};
+
+interface OrderItemProps {
+ item: OrderWithSequence;
+ drag: () => void;
+ isActive: boolean;
+ isPending: boolean;
+ setSelectedOrder: (order: OrderWithSequence | null) => void;
+ setShowOrderMenu: (show: boolean) => void;
+ selectedOrderIds: number[];
+ onToggleOrder: (id: number) => void;
+ assignedUserName?: string | null;
+ staffData?: { staff?: Array<{ id: number; name: string }> };
+ setSelectedUserId?: (id: number) => void;
+}
+
+const OrderItem: React.FC = ({
+ item,
+ drag,
+ isActive,
+ isPending,
+ setSelectedOrder,
+ setShowOrderMenu,
+ selectedOrderIds,
+ onToggleOrder,
+ assignedUserName,
+ staffData,
+ setSelectedUserId,
+}) => {
+ const orderItem = item;
+
+ return (
+
+
+
+
+ {/* Checkbox and Drag Handle */}
+
+ onToggleOrder(orderItem.id)}
+ size={20}
+ fillColor="#3b82f6"
+ checkColor="#FFFFFF"
+ />
+
+
+
+
+
+ {/* Content */}
+
+
+
+
+ #{orderItem.readableId}
+
+
+
+ Pkg
+
+
+
+ {/* Optional: Add time if available, or just keep ID */}
+
+
+
+
+ ₹{orderItem.totalAmount}
+
+
+ {
+ setSelectedOrder(orderItem);
+ setShowOrderMenu(true);
+ }}
+ style={tw`p-2`}
+ >
+
+
+
+
+
+
+
+
+ {orderItem.address}
+
+ {orderItem.latitude && orderItem.longitude && (
+ {
+ Linking.openURL(
+ `https://www.google.com/maps?q=${orderItem.latitude},${orderItem.longitude}`
+ );
+ }}
+ style={tw`ml-2`}
+ >
+
+
+ )}
+
+ {assignedUserName && (
+
+
+ Assigned to{" "}
+
+ {
+ const assignedUserId = staffData?.staff?.find(
+ (s: { id: number; name: string }) => s.name === assignedUserName
+ )?.id;
+ if (assignedUserId && setSelectedUserId) {
+ setSelectedUserId(assignedUserId);
+ }
+ }}
+ >
+
+ {assignedUserName}
+
+
+
+ )}
+
+
+ {/* Admin Notes */}
+ {orderItem.adminNotes && (
+
+
+ {orderItem.adminNotes}
+
+
+ )}
+
+
+
+ );
+};
+
+export default function DeliverySequences() {
+ const { slotId } = useLocalSearchParams();
+ const selectedSlotId = slotId ? Number(slotId) : null;
+ const [localOrderedOrders, setLocalOrderedOrders] = useState<
+ OrderWithSequence[]
+ >([]);
+ const [showOrderMenu, setShowOrderMenu] = useState(false);
+ const [selectedOrder, setSelectedOrder] = useState(
+ null
+ );
+ const [selectedUserId, setSelectedUserId] = useState(-1);
+ const [selectedOrderIds, setSelectedOrderIds] = useState([]);
+ const [hasSequenceChanged, setHasSequenceChanged] = useState(false);
+ const router = useRouter();
+
+ const { data: slotsData, refetch: refetchSlots } =
+ trpc.admin.slots.getAll.useQuery();
+ const {
+ data: ordersData,
+ isLoading: ordersLoading,
+ refetch: refetchOrders,
+ } = trpc.admin.order.getSlotOrders.useQuery(
+ { slotId: String(selectedSlotId) },
+ {
+ enabled: !!selectedSlotId,
+ }
+ );
+ const { data: sequenceData, refetch: refetchSequence } =
+ trpc.admin.slots.getDeliverySequence.useQuery(
+ { id: String(selectedSlotId) },
+ {
+ enabled: !!selectedSlotId,
+ }
+ );
+
+ const { data: staffData } = trpc.admin.staffUser.getStaff.useQuery();
+
+ // Auto-select first slot if no slotId provided
+ useEffect(() => {
+ if (!slotId && slotsData?.slots && slotsData.slots.length > 0) {
+ router.replace(`/delivery-sequences?slotId=${slotsData.slots[0].id}`);
+ }
+ }, [slotId, slotsData, router]);
+
+ const updateSequenceMutation =
+ trpc.admin.slots.updateDeliverySequence.useMutation();
+ const updatePackagedMutation = trpc.admin.order.updatePackaged.useMutation();
+ const updateDeliveredMutation =
+ trpc.admin.order.updateDelivered.useMutation();
+ const updateAddressCoordsMutation =
+ trpc.admin.order.updateAddressCoords.useMutation();
+
+ // Manual refresh functionality
+ useManualRefresh(() => {
+ refetchSlots();
+ refetchOrders();
+ refetchSequence();
+ });
+
+ useMarkDataFetchers(() => {
+ refetchSlots();
+ refetchOrders();
+ refetchSequence();
+ });
+
+ const slots = slotsData?.slots || [];
+ const orders = ordersData?.data || [];
+ const deliverySequence = sequenceData?.deliverySequence || [];
+
+ const slotOptions =
+ slots?.map((slot) => ({
+ label: dayjs(slot.deliveryTime).format("ddd DD MMM, h:mm a"),
+ value: slot.id,
+ })) || [];
+
+ const userOptions = [
+ { label: "Unassigned", value: -1 },
+ { label: "All Users", value: -2 },
+ ...(staffData?.staff?.map((staff) => ({
+ label: staff.name,
+ value: staff.id,
+ })) || []),
+ ];
+
+ // Create ordered orders based on delivery sequence
+ const computedOrderedOrders = useMemo(() => {
+ if (orders.length > 0) {
+ const userSequence =
+ selectedUserId !== -1
+ ? (deliverySequence as any)?.[String(selectedUserId)] || []
+ : null;
+ if (selectedUserId !== -1 && userSequence && userSequence.length > 0) {
+ // Sort orders according to user's sequence
+ const sequenceMap = new Map(
+ userSequence.map((id: number, index: number) => [id, index])
+ );
+ let ordered = orders
+ .filter((order) => userSequence.includes(order.id))
+ .map((order) => ({ ...order, sequenceId: order.id }))
+ .sort((a, b) => {
+ const aIndex = sequenceMap.get(a.sequenceId) ?? Infinity;
+ const bIndex = sequenceMap.get(b.sequenceId) ?? Infinity;
+ return aIndex < bIndex ? -1 : aIndex > bIndex ? 1 : 0;
+ });
+ return ordered;
+ } else if (selectedUserId === -1) {
+ // Show unassigned orders (not in any user's sequence)
+ const assignedIds = new Set(
+ Object.values(deliverySequence as any).flat()
+ );
+ let ordered = orders
+ .filter((order) => !assignedIds.has(order.id))
+ .map((order) => ({ ...order, sequenceId: order.id }))
+ .sort((a, b) =>
+ a.sequenceId < b.sequenceId
+ ? -1
+ : a.sequenceId > b.sequenceId
+ ? 1
+ : 0
+ );
+ return ordered;
+ } else if (selectedUserId === -2) {
+ // Show all orders with assignment info
+ const orderToUserMap = new Map();
+ Object.entries(deliverySequence as any).forEach(([userId, orderIds]) => {
+ (orderIds as number[]).forEach((orderId) => {
+ orderToUserMap.set(orderId, parseInt(userId));
+ });
+ });
+ let ordered = orders
+ .map((order) => {
+ const assignedUserId = orderToUserMap.get(order.id);
+ const assignedUser = staffData?.staff?.find(
+ (s) => s.id === assignedUserId
+ );
+ return {
+ ...order,
+ sequenceId: order.id,
+ assignedUserName: assignedUser?.name || null,
+ };
+ })
+ .sort((a, b) =>
+ a.sequenceId < b.sequenceId
+ ? -1
+ : a.sequenceId > b.sequenceId
+ ? 1
+ : 0
+ );
+ return ordered;
+ } else {
+ // No sequence for user, show empty
+ return [];
+ }
+ } else {
+ return [];
+ }
+ }, [ordersData, sequenceData, selectedUserId]);
+
+ // Sync local state with computed orders
+ useEffect(() => {
+ setLocalOrderedOrders(computedOrderedOrders);
+ }, [computedOrderedOrders]);
+
+ const handleDragEnd = ({ data }: { data: OrderWithSequence[] }) => {
+ if (selectedUserId !== -1 && selectedUserId !== -2) {
+ setLocalOrderedOrders(data);
+ setHasSequenceChanged(true);
+ }
+ };
+
+ const handleSaveSequence = () => {
+ if (!selectedSlotId || selectedUserId === -1) return;
+
+ const newSequence = { ...(deliverySequence as any) };
+ newSequence[String(selectedUserId)] = localOrderedOrders.map(
+ (order) => order.sequenceId
+ );
+
+ updateSequenceMutation.mutate(
+ {
+ id: selectedSlotId,
+ deliverySequence: newSequence,
+ },
+ {
+ onSuccess: () => {
+ setHasSequenceChanged(false);
+ Alert.alert("Success", "Delivery sequence updated successfully");
+ },
+ onError: (error: any) => {
+ Alert.alert(
+ "Error",
+ `Failed to update delivery sequence: ${
+ error.message || "Unknown error"
+ }`
+ );
+ },
+ }
+ );
+ };
+
+ if (!slotsData) {
+ return (
+
+
+ Loading slots...
+
+ );
+ }
+
+ if (slotsData.slots.length === 0) {
+ return (
+
+
+
+ No slots available
+
+
+ );
+ }
+
+ return (
+
+ {selectedSlotId ? (
+ <>
+ {/* Header Section */}
+
+ router.back()}
+ style={tw`p-2 -ml-4`}
+ accessibilityLabel="Go back"
+ >
+
+
+
+
+ {
+ if (val) {
+ router.replace(`/delivery-sequences?slotId=${val}`);
+ }
+ }}
+ placeholder="Select slot"
+ />
+
+
+ setSelectedUserId(val as number)}
+ placeholder="Select user"
+ />
+
+
+
+ {/* Content Section */}
+ {ordersLoading ? (
+
+
+ Loading orders...
+
+ ) : localOrderedOrders.length === 0 ? (
+
+
+
+ No orders found for this slot
+
+
+ ) : (
+
+ {/*
+
+ Long press an item to drag and reorder
+
+ */}
+ (
+ {
+ setSelectedOrderIds((prev) =>
+ prev.includes(id)
+ ? prev.filter((i) => i !== id)
+ : [...prev, id]
+ );
+ }}
+ assignedUserName={selectedUserId === -2 ? item.assignedUserName : undefined}
+ staffData={staffData}
+ setSelectedUserId={setSelectedUserId}
+ />
+ )}
+ keyExtractor={(item) => item.sequenceId.toString()}
+ onDragEnd={handleDragEnd}
+ showsVerticalScrollIndicator={false}
+ contentContainerStyle={tw`pb-8`}
+ ListHeaderComponent={
+
+ }
+ />
+
+ )}
+
+ {/* FAB for Assignment */}
+ {selectedOrderIds.length > 0 && (
+
+ opt.value !== -1),
+ { label: "None", value: -3 },
+ ]}
+ value={-1}
+ onValueChange={(val) => {
+ if (val !== -1) {
+ if (val === -3) {
+ // Unassign selected orders
+ const newSequence = { ...(deliverySequence as any) };
+ Object.keys(newSequence).forEach((userId) => {
+ newSequence[userId] = newSequence[userId].filter(
+ (id: number) => !selectedOrderIds.includes(id)
+ );
+ });
+ // Save
+ updateSequenceMutation.mutate(
+ {
+ id: selectedSlotId,
+ deliverySequence: newSequence,
+ },
+ {
+ onSuccess: () => {
+ setSelectedOrderIds([]);
+ refetchSequence();
+ Alert.alert(
+ "Success",
+ "Orders unassigned successfully"
+ );
+ },
+ onError: (error: any) => {
+ Alert.alert(
+ "Error",
+ `Failed to unassign orders: ${
+ error.message || "Unknown error"
+ }`
+ );
+ },
+ }
+ );
+ } else {
+ // Assign selected orders to the user
+ // Update deliverySequence map
+ const newSequence = { ...(deliverySequence as any) };
+ // Remove from all other users
+ Object.keys(newSequence).forEach((userId) => {
+ newSequence[userId] = newSequence[userId].filter(
+ (id: number) => !selectedOrderIds.includes(id)
+ );
+ });
+ // Add to selected user
+ if (!newSequence[String(val)])
+ newSequence[String(val)] = [];
+ newSequence[String(val)] = [
+ ...new Set([
+ ...newSequence[String(val)],
+ ...selectedOrderIds,
+ ]),
+ ];
+ // Save
+ updateSequenceMutation.mutate(
+ {
+ id: selectedSlotId,
+ deliverySequence: newSequence,
+ },
+ {
+ onSuccess: () => {
+ setSelectedOrderIds([]);
+ refetchSequence();
+ Alert.alert(
+ "Success",
+ "Orders assigned successfully"
+ );
+ },
+ onError: (error: any) => {
+ Alert.alert(
+ "Error",
+ `Failed to assign orders: ${
+ error.message || "Unknown error"
+ }`
+ );
+ },
+ }
+ );
+ }
+ }
+ }}
+ triggerComponent={({ onPress }) => (
+
+
+
+ )}
+ />
+
+ )}
+
+ {/* FAB for Save */}
+ {hasSequenceChanged && (
+
+
+
+
+
+ )}
+ >
+ ) : (
+
+
+
+ No slot selected. Please select a slot to view delivery sequence.
+
+ router.back()}
+ >
+ Go Back
+
+
+ )}
+
+ {/* Order Menu Dialog */}
+ setShowOrderMenu(false)}
+ >
+
+ {/* Handle Bar */}
+
+
+
+ Order #{selectedOrder?.readableId}
+
+
+ Select an action to perform
+
+
+
+ {/* Actions */}
+ {
+ router.push(`/order-details/${selectedOrder?.id}`);
+ setShowOrderMenu(false);
+ }}
+ disabled={updateAddressCoordsMutation.isPending}
+ >
+
+
+
+
+
+ View Details
+
+
+ See full order information
+
+
+
+
+
+ {
+ if (!selectedOrder) return;
+ try {
+ await updatePackagedMutation.mutateAsync({
+ orderId: selectedOrder.id.toString(),
+ isPackaged: !selectedOrder.isPackaged,
+ });
+ refetchOrders();
+ refetchSequence();
+ setShowOrderMenu(false);
+ } catch (error) {
+ Alert.alert("Error", "Failed to update packaged status");
+ }
+ }}
+ disabled={updatePackagedMutation.isPending}
+ >
+
+
+
+
+
+ {selectedOrder?.isPackaged
+ ? "Unmark Packaged"
+ : "Mark Packaged"}
+
+
+ {selectedOrder?.isPackaged
+ ? "Revert to not packaged"
+ : "Update status to packaged"}
+
+
+
+
+
+ {
+ if (!selectedOrder) return;
+ try {
+ await updateDeliveredMutation.mutateAsync({
+ orderId: selectedOrder.id.toString(),
+ isDelivered: !selectedOrder.isDelivered,
+ });
+ refetchOrders();
+ refetchSequence();
+ setShowOrderMenu(false);
+ } catch (error) {
+ Alert.alert("Error", "Failed to update delivered status");
+ }
+ }}
+ disabled={updateDeliveredMutation.isPending}
+ >
+
+
+
+
+
+ {selectedOrder?.isDelivered
+ ? "Unmark Delivered"
+ : "Mark Delivered"}
+
+
+ {selectedOrder?.isDelivered
+ ? "Revert delivery status"
+ : "Complete the delivery"}
+
+
+
+
+
+ {
+ if (!selectedOrder) return;
+ try {
+ const { status } =
+ await Location.requestForegroundPermissionsAsync();
+ if (status !== "granted") {
+ Alert.alert(
+ "Permission Denied",
+ "Location permission is required to attach coordinates."
+ );
+ return;
+ }
+ const location = await Location.getCurrentPositionAsync({
+ accuracy: Location.Accuracy.High,
+ });
+ const { latitude, longitude } = location.coords;
+ await updateAddressCoordsMutation.mutateAsync({
+ addressId: selectedOrder.addressId,
+ latitude,
+ longitude,
+ });
+ Alert.alert(
+ "Success",
+ "Location attached to address successfully."
+ );
+ } catch (error) {
+ Alert.alert(
+ "Error",
+ "Failed to attach location. Please try again."
+ );
+ }
+ setShowOrderMenu(false);
+ }}
+ >
+
+
+
+
+
+ Attach Location
+
+
+ Save coordinates to address
+
+
+
+
+
+ {
+ const phoneMatch = selectedOrder?.address.match(/Phone: (\d+)/);
+ const phone = phoneMatch ? phoneMatch[1] : null;
+ if (phone) {
+ Linking.openURL(`whatsapp://send?phone=+91${phone}`);
+ } else {
+ Alert.alert("No phone number found");
+ }
+ setShowOrderMenu(false);
+ }}
+ >
+
+
+
+
+
+ Message On WhatsApp
+
+
+ Send message via WhatsApp
+
+
+
+
+
+ {
+ const phoneMatch = selectedOrder?.address.match(/Phone: (\d+)/);
+ const phone = phoneMatch ? phoneMatch[1] : null;
+ if (phone) {
+ Linking.openURL(`tel:${phone}`);
+ } else {
+ Alert.alert("No phone number found");
+ }
+ setShowOrderMenu(false);
+ }}
+ >
+
+
+
+
+
+ Dial Mobile Number
+
+
+ Call customer directly
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/admin-ui/app/(drawer)/edit-coupon/[id]/index.tsx b/apps/admin-ui/app/(drawer)/edit-coupon/[id]/index.tsx
new file mode 100644
index 0000000..c2cdd67
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-coupon/[id]/index.tsx
@@ -0,0 +1,83 @@
+import React from 'react';
+import { View, Alert } from 'react-native';
+import { tw, AppContainer, MyText } from 'common-ui';
+import CouponForm from '../../../../src/components/CouponForm';
+import { trpc } from '@/src/trpc-client';
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import dayjs from 'dayjs';
+import { CreateCouponPayload } from 'common-ui/shared-types';
+
+export default function EditCoupon() {
+ const router = useRouter();
+ const { id } = useLocalSearchParams();
+ const couponId = parseInt(id as string);
+
+ const { data: coupon, isLoading } = trpc.admin.coupon.getById.useQuery({ id: couponId });
+ const updateCoupon = trpc.admin.coupon.update.useMutation();
+
+ const handleUpdateCoupon = (values: CreateCouponPayload & { isReservedCoupon?: boolean }) => {
+ // Transform targetUsers array to targetUser for backend compatibility
+ const updates = {
+ ...values,
+ targetUser: values.targetUsers?.[0] || undefined,
+ };
+ delete updates.targetUsers;
+
+ updateCoupon.mutate({ id: couponId, updates }, {
+ onSuccess: () => {
+ Alert.alert('Success', 'Coupon updated successfully', [
+ { text: 'OK', onPress: () => router.back() }
+ ]);
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to update coupon');
+ },
+ });
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading...
+
+
+ );
+ }
+
+ if (!coupon) {
+ return (
+
+
+ Coupon not found
+
+
+ );
+ }
+
+ // Transform coupon data for form (targetUser to targetUsers array)
+ const initialValues: Partial = {
+ couponCode: coupon.couponCode,
+ isUserBased: coupon.isUserBased,
+ isApplyForAll: coupon.isApplyForAll,
+ targetUsers: coupon.targetUser ? [coupon.targetUser.id] : [],
+ discountPercent: coupon.discountPercent ? parseFloat(coupon.discountPercent) : undefined,
+ flatDiscount: coupon.flatDiscount ? parseFloat(coupon.flatDiscount) : undefined,
+ minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : undefined,
+ maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : undefined,
+ validTill: coupon.validTill ? dayjs(coupon.validTill).format('YYYY-MM-DD') : undefined,
+ maxLimitForUser: coupon.maxLimitForUser || undefined,
+ productIds: coupon.productIds,
+ isReservedCoupon: false, // Normal coupons
+ };
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-product-group/[id].tsx b/apps/admin-ui/app/(drawer)/edit-product-group/[id].tsx
new file mode 100644
index 0000000..50834db
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-product-group/[id].tsx
@@ -0,0 +1,47 @@
+import React from 'react';
+import { View } from 'react-native';
+import { AppContainer, MyText } from 'common-ui';
+import ProductGroupForm from '../../../components/ProductGroupForm';
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import { trpc } from '../../../src/trpc-client';
+
+export default function EditProductGroup() {
+ const router = useRouter();
+ const { id } = useLocalSearchParams();
+
+ const groupId = parseInt(id as string);
+
+ const { data: groupsData, isLoading } = trpc.admin.product.getGroups.useQuery();
+ const groups = groupsData?.groups || [];
+ const group = groups.find(g => g.id === groupId);
+
+ if (isLoading) {
+ return (
+
+
+ Loading group...
+
+
+ );
+ }
+
+ if (!group) {
+ return (
+
+
+ Group not found
+
+
+ );
+ }
+
+ return (
+
+ router.back()}
+ onSuccess={() => router.back()}
+ />
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-product/_layout.tsx b/apps/admin-ui/app/(drawer)/edit-product/_layout.tsx
new file mode 100644
index 0000000..86cc142
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-product/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-product/index.tsx b/apps/admin-ui/app/(drawer)/edit-product/index.tsx
new file mode 100644
index 0000000..aa41103
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-product/index.tsx
@@ -0,0 +1,150 @@
+import React, { useRef } from 'react';
+import { View, Text, Alert } from 'react-native';
+import { useLocalSearchParams } from 'expo-router';
+import { AppContainer, useManualRefresh, MyText, tw } from 'common-ui';
+import ProductForm, { ProductFormRef } from '../../../src/components/ProductForm';
+import { useUpdateProduct } from '../../../src/api-hooks/product.api';
+import { trpc } from '@/src/trpc-client';
+
+export default function EditProduct() {
+ const { id } = useLocalSearchParams();
+ const productId = Number(id);
+ const productFormRef = useRef(null);
+
+ // const { data: product, isLoading: isFetching, refetch } = useGetProduct(productId);
+ const { data: product, isLoading: isFetching, refetch } = trpc.admin.product.getProductById.useQuery(
+ { id: productId },
+ { enabled: !!productId }
+ );
+ //
+ const { mutate: updateProduct, isPending: isUpdating } = useUpdateProduct();
+
+ useManualRefresh(() => refetch());
+
+ const handleSubmit = (values: any, newImages?: { uri?: string }[], imagesToDelete?: string[]) => {
+ const payload = {
+ name: values.name,
+ shortDescription: values.shortDescription,
+ longDescription: values.longDescription,
+ unitId: parseInt(values.unitId),
+ storeId: parseInt(values.storeId),
+ price: parseFloat(values.price),
+ marketPrice: values.marketPrice ? parseFloat(values.marketPrice) : undefined,
+ incrementStep: 1,
+ productQuantity: values.productQuantity || 1,
+ deals: values.deals?.filter((deal: any) =>
+ deal.quantity && deal.price && deal.validTill
+ ).map((deal: any) => ({
+ quantity: parseInt(deal.quantity),
+ price: parseFloat(deal.price),
+ validTill: deal.validTill instanceof Date
+ ? deal.validTill.toISOString().split('T')[0]
+ : deal.validTill, // Convert Date to YYYY-MM-DD string
+ })),
+ tagIds: values.tagIds,
+ };
+
+ console.log({payload})
+
+ const formData = new FormData();
+ Object.entries(payload).forEach(([key, value]) => {
+ if (key === 'deals' && Array.isArray(value)) {
+ formData.append(key, JSON.stringify(value));
+ } else if (key === 'tagIds' && Array.isArray(value)) {
+ value.forEach(tagId => {
+ formData.append('tagIds', tagId.toString());
+ });
+ } else if (value !== undefined && value !== null) {
+ formData.append(key, value as string);
+ }
+ });
+
+ // Add new images
+ if (newImages && newImages.length > 0) {
+ newImages.forEach((image, index) => {
+ if (image.uri) {
+ const fileName = image.uri.split('/').pop() || `image_${index}.jpg`;
+ formData.append('images', {
+ uri: image.uri,
+ name: fileName,
+ type: 'image/jpeg',
+ } as any);
+ }
+ });
+ }
+
+ // Add images to delete
+ if (imagesToDelete && imagesToDelete.length > 0) {
+ formData.append('imagesToDelete', JSON.stringify(imagesToDelete));
+ }
+
+ updateProduct(
+ { id: productId, formData },
+ {
+ onSuccess: (data) => {
+ Alert.alert('Success', 'Product updated successfully!');
+ // Clear newly added images after successful update
+ productFormRef.current?.clearImages();
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to update product');
+ },
+ }
+ );
+ };
+
+ if (isFetching) {
+ return (
+
+
+ Loading product...
+
+
+ );
+ }
+
+ if (!product) {
+ return (
+
+
+ Product not found
+
+
+ );
+ }
+
+ const productData = product.product; // The API returns { product: Product }
+
+ const initialValues = {
+ name: productData.name,
+ shortDescription: productData.shortDescription || '',
+ longDescription: productData.longDescription || '',
+ unitId: productData.unitId,
+ storeId: productData.storeId || 1,
+ price: productData.price.toString(),
+ marketPrice: productData.marketPrice?.toString() || '',
+ deals: productData.deals?.map(deal => ({
+ quantity: deal.quantity,
+ price: deal.price,
+ validTill: deal.validTill ? new Date(deal.validTill) : null, // Convert to Date object
+ })) || [{ quantity: '', price: '', validTill: null }],
+ tagIds: productData.tags?.map((tag: any) => tag.id) || [],
+ isSuspended: productData.isSuspended || false,
+ isFlashAvailable: productData.isFlashAvailable || false,
+ flashPrice: productData.flashPrice?.toString() || '',
+ productQuantity: productData.productQuantity || 1,
+ };
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-slot/[id]/index.tsx b/apps/admin-ui/app/(drawer)/edit-slot/[id]/index.tsx
new file mode 100644
index 0000000..c17300d
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-slot/[id]/index.tsx
@@ -0,0 +1,53 @@
+import React from 'react';
+import { View, Text } from 'react-native';
+import { AppContainer } from 'common-ui';
+// import SlotForm from '../../../components/SlotForm';
+// import { trpc } from '../../../src/trpc-client';
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import { trpc } from '@/src/trpc-client';
+import SlotForm from '@/components/SlotForm';
+
+export default function EditSlot() {
+ const router = useRouter();
+ const { id } = useLocalSearchParams();
+ const slotId = parseInt(id as string);
+
+ const { data: slot, isLoading } = trpc.admin.slots.getSlotById.useQuery({ id: slotId });
+
+ const handleSlotUpdated = () => {
+ router.back();
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading slot...
+
+
+ );
+ }
+
+ if (!slot) {
+ return (
+
+
+ Slot not found
+
+
+ );
+ }
+
+ return (
+
+ p.id) || []}
+ onSlotAdded={handleSlotUpdated}
+ />
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-slot/_layout.tsx b/apps/admin-ui/app/(drawer)/edit-slot/_layout.tsx
new file mode 100644
index 0000000..5a46e47
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-slot/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-store/_layout.tsx b/apps/admin-ui/app/(drawer)/edit-store/_layout.tsx
new file mode 100644
index 0000000..de4cfe5
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-store/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-store/index.tsx b/apps/admin-ui/app/(drawer)/edit-store/index.tsx
new file mode 100644
index 0000000..74bfdf1
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-store/index.tsx
@@ -0,0 +1,76 @@
+import React from 'react';
+import { View, Alert } from 'react-native';
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import { AppContainer, MyText, tw } from 'common-ui';
+import StoreForm, { StoreFormData } from '@/components/StoreForm';
+import { trpc } from '@/src/trpc-client';
+
+export default function EditStore() {
+ const router = useRouter();
+ const { id } = useLocalSearchParams();
+
+ const storeId = parseInt(id as string);
+
+ const { data: storeData, isLoading: isLoadingStore, refetch } = trpc.admin.store.getStoreById.useQuery(
+ { id: storeId },
+ { enabled: !!storeId }
+ );
+
+ const updateStoreMutation = trpc.admin.store.updateStore.useMutation();
+
+ const handleSubmit = (values: StoreFormData) => {
+ updateStoreMutation.mutate({ id: storeId, ...values }, {
+ onSuccess: (data) => {
+ refetch();
+ Alert.alert('Success', data.message);
+ router.push('/(drawer)/stores' as any);
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to update store');
+ },
+ });
+ };
+
+ if (isLoadingStore) {
+ return (
+
+
+ Loading store...
+
+
+ );
+ }
+
+ if (!storeData?.store) {
+ return (
+
+
+ Store not found
+
+
+ );
+ }
+
+ const initialValues = {
+ name: storeData.store.name,
+ description: storeData.store.description || '',
+ imageUrl: storeData.store.imageUrl || '',
+ owner: storeData.store.owner.id,
+ products: [], // Will be set by StoreForm
+ };
+
+ return (
+
+
+ Edit Store
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-tag/_layout.tsx b/apps/admin-ui/app/(drawer)/edit-tag/_layout.tsx
new file mode 100644
index 0000000..1db11a3
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-tag/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/edit-tag/index.tsx b/apps/admin-ui/app/(drawer)/edit-tag/index.tsx
new file mode 100644
index 0000000..260b05e
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/edit-tag/index.tsx
@@ -0,0 +1,107 @@
+import React from 'react';
+import { View, Alert } from 'react-native';
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import { AppContainer, MyText, tw } from 'common-ui';
+import TagForm from '@/src/components/TagForm';
+import { useGetTag, useUpdateTag } from '@/src/api-hooks/tag.api';
+
+interface TagFormData {
+ tagName: string;
+ tagDescription: string;
+ isDashboardTag: boolean;
+ existingImageUrl?: string;
+}
+
+export default function EditTag() {
+ const router = useRouter();
+ const { tagId } = useLocalSearchParams<{ tagId: string }>();
+ const tagIdNum = tagId ? parseInt(tagId) : null;
+
+ const { data: tagData, isLoading: isLoadingTag, error: tagError } = useGetTag(tagIdNum!);
+ const { mutate: updateTag, isPending: isUpdating } = useUpdateTag();
+
+ const handleSubmit = (values: TagFormData, image?: { uri?: string }) => {
+ if (!tagIdNum) return;
+
+ const formData = new FormData();
+
+ // Add text fields
+ formData.append('tagName', values.tagName);
+ if (values.tagDescription) {
+ formData.append('tagDescription', values.tagDescription);
+ }
+ formData.append('isDashboardTag', values.isDashboardTag.toString());
+
+ // Add image if uploaded
+ if (image?.uri) {
+ const filename = image.uri.split('/').pop() || 'image.jpg';
+ const match = /\.(\w+)$/.exec(filename);
+ const type = match ? `image/${match[1]}` : 'image/jpeg';
+
+ formData.append('image', {
+ uri: image.uri,
+ name: filename,
+ type,
+ } as any);
+ }
+
+ updateTag({ id: tagIdNum, formData }, {
+ onSuccess: (data) => {
+ Alert.alert('Success', 'Tag updated successfully', [
+ {
+ text: 'OK',
+ onPress: () => router.back(),
+ },
+ ]);
+ },
+ onError: (error: any) => {
+ const errorMessage = error.message || 'Failed to update tag';
+ Alert.alert('Error', errorMessage);
+ },
+ });
+ };
+
+ if (isLoadingTag) {
+ return (
+
+
+ Loading tag...
+
+
+ );
+ }
+
+ if (tagError || !tagData?.tag) {
+ return (
+
+
+ Tag not found
+
+
+ );
+ }
+
+ const tag = tagData.tag;
+ const initialValues: TagFormData = {
+ tagName: tag.tagName,
+ tagDescription: tag.tagDescription || '',
+ isDashboardTag: tag.isDashboardTag,
+ existingImageUrl: tag.imageUrl || undefined,
+ };
+
+ return (
+
+
+
+ {/* Form */}
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/manage-orders/_layout.tsx b/apps/admin-ui/app/(drawer)/manage-orders/_layout.tsx
new file mode 100644
index 0000000..37e80fe
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/manage-orders/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/manage-orders/index.tsx b/apps/admin-ui/app/(drawer)/manage-orders/index.tsx
new file mode 100644
index 0000000..dd8a3ec
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/manage-orders/index.tsx
@@ -0,0 +1,92 @@
+import { View, TouchableOpacity, Alert } from 'react-native';
+import { MyText, BottomDropdown, tw, MyFlatList, useMarkDataFetchers } from 'common-ui';
+import { useRouter } from 'expo-router';
+import dayjs from 'dayjs';
+import { useState } from 'react';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { trpc } from '@/src/trpc-client';
+
+export default function ManageOrders() {
+ const router = useRouter();
+ const [selectedSlotId, setSelectedSlotId] = useState(null);
+ const { data: slotsData, refetch } = trpc.admin.slots.getAll.useQuery();
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ // Create slot options with Flash Deliveries as first option
+ const slotOptions = [
+ { label: '⚡ Flash Deliveries', value: 'flash' },
+ ...(slotsData?.slots?.map(slot => ({
+ label: dayjs(slot.deliveryTime).format('ddd DD MMM, h:mm a'),
+ value: slot.id.toString()
+ })) || [])
+ ];
+
+ const menuItems = [
+ {
+ title: 'Delivery Sequences',
+ icon: 'route',
+ color: 'bg-purple-500',
+ onPress: () => {
+ if (selectedSlotId === 'flash') {
+ Alert.alert('Flash Deliveries', 'Flash deliveries do not have delivery sequences. Use the Orders menu to manage flash deliveries.');
+ return;
+ }
+ router.push(`/(drawer)/delivery-sequences?slotId=${selectedSlotId}`);
+ },
+ },
+ {
+ title: 'Orders',
+ icon: 'list',
+ color: 'bg-cyan-500',
+ onPress: () => {
+ if (selectedSlotId === 'flash') {
+ router.push('/(drawer)/orders?filter=flash');
+ } else {
+ router.push('/(drawer)/orders');
+ }
+ },
+ },
+ ];
+
+ return (
+
+ (
+
+
+
+
+ {item.title}
+
+
+
+ )}
+ keyExtractor={(item, index) => index.toString()}
+ columnWrapperStyle={tw`justify-between gap-4`}
+ contentContainerStyle={tw`p-6 gap-4 bg-white flex-1`}
+ ListHeaderComponent={
+ <>
+
+ setSelectedSlotId(String(val))}
+ placeholder="Select Slot"
+ />
+
+ >
+ }
+
+ />
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/order-details/[id].tsx b/apps/admin-ui/app/(drawer)/order-details/[id].tsx
new file mode 100644
index 0000000..266365a
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/order-details/[id].tsx
@@ -0,0 +1,886 @@
+import React, { useState } from "react";
+import {
+ View,
+ ScrollView,
+ TouchableOpacity,
+ Platform,
+ Alert,
+} from "react-native";
+import { useLocalSearchParams, useRouter } from "expo-router";
+import { AppContainer, MyText, tw, BottomDialog, MyTextInput, theme } from "common-ui";
+import { trpc } from "@/src/trpc-client";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import FontAwesome5 from "@expo/vector-icons/FontAwesome5";
+import dayjs from "dayjs";
+import CancelOrderDialog from "@/components/CancelOrderDialog";
+
+export default function OrderDetails() {
+ const { id } = useLocalSearchParams<{ id: string }>();
+ const router = useRouter();
+ const [generateCouponDialogOpen, setGenerateCouponDialogOpen] =
+ useState(false);
+ const [initiateRefundDialogOpen, setInitiateRefundDialogOpen] =
+ useState(false);
+ const [cancelDialogOpen, setCancelDialogOpen] = useState(false);
+ const [refundType, setRefundType] = useState<"percent" | "amount">("percent");
+ const [refundValue, setRefundValue] = useState("100");
+ const [updatingItems, setUpdatingItems] = useState>(new Set());
+
+ const {
+ data: orderData,
+ isLoading,
+ error,
+ refetch,
+ } = trpc.admin.order.getOrderDetails.useQuery(
+ { orderId: id ? parseInt(id) : 0 },
+ { enabled: !!id }
+ );
+
+ const generateCouponMutation =
+ trpc.admin.coupon.generateCancellationCoupon.useMutation({
+ onSuccess: (coupon) => {
+ Alert.alert(
+ "Success",
+ `Refund coupon generated successfully!\n\nCode: ${coupon.couponCode
+ }\nValue: ₹${coupon.flatDiscount}\nExpires: ${coupon.validTill
+ ? new Date(coupon.validTill).toLocaleDateString()
+ : "N/A"
+ }`
+ );
+ setGenerateCouponDialogOpen(false);
+ },
+ onError: (error: any) => {
+ Alert.alert(
+ "Error",
+ error.message || "Failed to generate refund coupon"
+ );
+ },
+ });
+
+ const initiateRefundMutation = trpc.admin.payments.initiateRefund.useMutation(
+ {
+ onSuccess: (result) => {
+ Alert.alert(
+ "Success",
+ `Refund initiated successfully!\n\nAmount: ₹${result.amount}\nStatus: ${result.status}`
+ );
+ setInitiateRefundDialogOpen(false);
+ },
+ onError: (error: any) => {
+ Alert.alert("Error", error.message || "Failed to initiate refund");
+ },
+ }
+ );
+
+ const updateItemPackagingMutation = trpc.admin.order.updateOrderItemPackaging.useMutation({
+ onSuccess: () => {
+ // Refetch order details to get updated packaging status
+ refetch();
+ },
+ onError: (error: any) => {
+ Alert.alert("Error", error.message || "Failed to update packaging status");
+ },
+ });
+
+ if (isLoading) {
+ return (
+
+
+ Loading order details...
+
+
+ );
+ }
+
+ if (error || !orderData) {
+ return (
+
+
+
+
+ Oops!
+
+
+ {error?.message || "Failed to load order details"}
+
+ router.back()}
+ style={tw`bg-gray-900 px-6 py-3 rounded-xl w-full items-center`}
+ >
+ Go Back
+
+
+
+ );
+ }
+
+ const order = orderData;
+
+ // Calculate subtotal and discount for order summary
+ const subtotal = order.items.reduce((sum, item) => sum + item.amount, 0);
+ const discountAmount = order.discountAmount || 0;
+
+ const handleGenerateCoupon = () => {
+ generateCouponMutation.mutate({ orderId: order.id });
+ };
+
+ const handleInitiateRefund = () => {
+ const value = parseFloat(refundValue);
+ if (isNaN(value) || value <= 0) {
+ Alert.alert("Error", "Please enter a valid refund value");
+ return;
+ }
+
+ const mutationData: any = {
+ orderId: order.id,
+ };
+
+ if (refundType === "percent") {
+ if (value > 100) {
+ Alert.alert("Error", "Refund percentage cannot exceed 100%");
+ return;
+ }
+ mutationData.refundPercent = value;
+ } else {
+ mutationData.refundAmount = value;
+ }
+
+ initiateRefundMutation.mutate(mutationData);
+ setInitiateRefundDialogOpen(false);
+ };
+
+ const handlePackagingToggle = (itemId: number, field: 'isPackaged' | 'isPackageVerified', value: boolean) => {
+ // Add item to updating set to disable UI
+ setUpdatingItems(prev => new Set(prev).add(itemId));
+
+ updateItemPackagingMutation.mutate(
+ {
+ orderItemId: itemId,
+ [field]: value,
+ },
+ {
+ onSettled: () => {
+ // Remove item from updating set
+ setUpdatingItems(prev => {
+ const newSet = new Set(prev);
+ newSet.delete(itemId);
+ return newSet;
+ });
+ },
+ }
+ );
+ };
+
+ const getStatusColor = (status: string) => {
+ switch (status) {
+ case "delivered":
+ return "text-green-600 bg-green-50 border-green-100";
+ case "cancelled":
+ return "text-red-600 bg-red-50 border-red-100";
+ default:
+ return "text-yellow-600 bg-yellow-50 border-yellow-100";
+ }
+ };
+
+ const statusStyle = getStatusColor(order.status);
+ const showRefundOptions = true;
+
+ const getRefundDotColor = (status: string) => {
+ if (status === 'success') return 'bg-green-500';
+ else if (status === 'pending') return 'bg-yellow-500';
+ else if (status === 'failed') return 'bg-red-500';
+ else return 'bg-gray-500';
+ };
+
+ const getRefundTextColor = (status: string) => {
+ if (status === 'success' || status === 'na') return 'text-green-700';
+ else if (status === 'pending') return 'text-yellow-700';
+ else if (status === 'failed') return 'text-red-700';
+ else return 'text-gray-700';
+ };
+
+ const getRefundStatusText = (status: string) => {
+ if (status === 'success' || status === 'na') return 'Completed';
+ else if (status === 'pending') return 'Pending';
+ else if (status === 'failed') return 'Failed';
+ else if (status === 'none') return 'Not Initiated';
+ else if (status === 'na') return 'Not Applicable';
+ else return 'Unknown';
+ };
+ return (
+
+
+
+ {/* Order ID & Status Card */}
+
+
+
+ Order ID
+
+ #{order.readableId}
+
+
+
+
+
+ {order.status}
+
+
+ {order.isFlashDelivery && (
+
+ ⚡
+
+ )}
+
+
+
+
+
+
+ {order.isFlashDelivery ? "Flash Delivery:" : "Delivery at:"} {order.isFlashDelivery
+ ? dayjs(order.createdAt).add(30, 'minutes').format("MMM DD, YYYY • h:mm A")
+ : order.slotInfo?.time ? dayjs(order.slotInfo.time).format("MMM DD, YYYY • h:mm A") : 'Not scheduled'}
+
+
+ {order.isFlashDelivery && (
+
+
+
+ ⚡ 30-Minute Flash Delivery • High Priority
+
+
+ )}
+
+
+
+ Placed on {dayjs(order.createdAt).format("MMM DD, YYYY • h:mm A")}
+
+
+
+
+ {/* Order Progress (Simplified Timeline) */}
+ {order.status !== "cancelled" && (
+
+
+ Order Status
+
+
+ {/* Placed */}
+
+
+
+
+
+ Placed
+
+
+
+
+ {/* Packaged */}
+
+
+
+
+
+ Packaged
+
+
+
+
+ {/* Delivered */}
+
+
+ {order.isFlashDelivery && order.isDelivered ? (
+
+ ) : (
+
+ )}
+
+
+
+ {order.isFlashDelivery && order.isDelivered ? "Flash Delivered" : "Delivered"}
+
+ {order.isFlashDelivery && (
+
+ ⚡ 30-Min
+
+ )}
+
+
+
+
+ )}
+
+ {/* Customer Details */}
+
+
+ Customer Details
+
+
+
+
+
+
+
+
+ {order.customerName}
+
+ Customer
+
+
+
+
+
+
+
+
+
+ {order.customerMobile}
+
+
+ {order.customerEmail && (
+
+
+
+
+
+ {order.customerEmail}
+
+
+ )}
+
+
+
+
+
+
+ {order.address.line1}
+ {order.address.line2 ? `, ${order.address.line2}` : ""}
+ {`\n${order.address.city}, ${order.address.state} - ${order.address.pincode}`}
+
+
+
+
+
+
+ {/* Order Items */}
+
+
+ Items Ordered
+
+ {order.items.map((item, index) => (
+
+
+
+
+
+
+ {item.name}
+
+
+ {item.quantity} {item.unit} × ₹{item.price}
+
+
+ handlePackagingToggle(item.id, 'isPackaged', !item.isPackaged)}
+ disabled={updatingItems.has(item.id)}
+ >
+
+
+ Packaged
+
+
+ handlePackagingToggle(item.id, 'isPackageVerified', !item.isPackageVerified)}
+ disabled={updatingItems.has(item.id)}
+ >
+
+
+ Pkg Verified
+
+
+
+
+
+ ₹{item.amount}
+
+
+ ))}
+
+
+
+
+ Subtotal ({order.items.length} items)
+
+
+ ₹{subtotal}
+
+
+ {discountAmount > 0 && (
+
+
+ Discount
+
+
+ -₹{discountAmount}
+
+
+ )}
+
+
+
+ Total Amount
+
+ {order.isFlashDelivery && (
+
+ ⚡ FLASH
+
+ )}
+
+
+ ₹{order.totalAmount}
+
+
+
+
+
+ {/* Flash Delivery Priority Notice */}
+ {order.isFlashDelivery && (
+
+
+
+
+ Flash Delivery Order
+
+
+
+ ⚡ This is a high-priority flash delivery order that must be delivered within 30 minutes of placement.
+
+
+
+ Expected Delivery: {dayjs(order.createdAt).add(30, 'minutes').format("MMM DD, YYYY • h:mm A")}
+
+
+
+ )}
+
+ {/* Admin Notes */}
+ {order.adminNotes && (
+
+
+
+
+ Admin Notes
+
+
+
+ {order.adminNotes}
+
+
+ )}
+
+ {/* Coupon Applied Section */}
+ {order.couponCode && (
+
+
+ Coupon Applied
+
+
+
+
+
+ {order.couponCode}
+
+
+
+ {order.couponDescription}
+
+
+
+ Discount Applied:
+
+
+ -₹{order.discountAmount}
+
+
+
+
+ )}
+
+ {/* Refund Coupon Section */}
+ {order.orderStatus?.refundCouponId && (
+
+
+ Refund Coupon
+
+
+
+
+
+ {order.couponCode}
+
+
+
+ Generated refund coupon for order cancellation
+
+
+
+ Value:
+
+
+ ₹{order.couponData?.discountAmount}
+
+
+ {/*
+
+ Expires:
+
+
+ {order.couponData?.
+ ? dayjs(order.orderStatus.refundCoupon.validTill).format("DD MMM YYYY")
+ : "N/A"}
+
+ */}
+
+
+ )}
+
+ {/* TEMPORARILY HIDDEN: Refund Details Section */}
+ {/* WARNING: This section contains functional refund and cancellation management features */}
+ {/* DO NOT REMOVE - This is temporarily commented out for UI simplification */}
+ {/* When ready to re-enable, simply uncomment the entire block below */}
+ {/*
+
+
+ {order.status === "cancelled" ? "Cancellation Details" : "Refund Details"}
+
+ {order.status === "cancelled" && order.cancelReason && (
+
+
+ Cancellation Reason
+
+
+ {order.cancelReason}
+
+
+ )}
+
+
+ Refund Status
+
+
+
+
+ {getRefundStatusText(order.refundStatus)}
+
+
+
+ {order.refundRecord && (
+
+
+ Refund Amount
+
+
+ ₹{order.refundRecord.refundAmount}
+
+
+ )}
+
+ {(!Boolean(order.refundRecord)) &&
+ {!order.isCod && ( setInitiateRefundDialogOpen(true)}
+ >
+
+
+ Initiate Refund
+
+
+ )}
+ setGenerateCouponDialogOpen(true)}
+ >
+
+
+ Generate Refund Coupon
+
+
+ }
+
+
+ */}
+
+
+
+ {/* Bottom Action Bar */}
+
+ {order.status !== "cancelled" && (
+ setCancelDialogOpen(true)}
+ style={tw`bg-red-500 rounded-xl py-4 items-center shadow-lg mb-3`}
+ >
+
+ Cancel Order
+
+
+ )}
+ router.push("/(drawer)/manage-orders")}
+ style={tw`bg-gray-900 rounded-xl py-4 items-center shadow-lg`}
+ >
+
+ Manage Orders
+
+
+
+
+ {/* Generate Coupon Dialog */}
+ setGenerateCouponDialogOpen(false)}
+ >
+
+
+
+
+
+
+ Generate Refund Coupon
+
+
+ Create a one-time use coupon for the customer equal to the order amount. Valid for 30 days.
+
+
+
+
+
+
+ This only works for online payment orders. COD orders cannot generate refund coupons.
+
+
+
+
+ setGenerateCouponDialogOpen(false)}
+ >
+ Cancel
+
+
+
+ {generateCouponMutation.isPending
+ ? "Generating..."
+ : "Generate Coupon"}
+
+
+
+
+
+
+ {/* Initiate Refund Dialog */}
+ setInitiateRefundDialogOpen(false)}
+ >
+
+
+
+
+
+
+ Initiate Refund
+
+
+ Process a refund directly to the customer's source account via Razorpay.
+
+
+
+ {/* Refund Type Selection */}
+
+
+ Refund Type
+
+
+ setRefundType("percent")}
+ >
+
+
+ Percentage
+
+
+
+ setRefundType("amount")}
+ >
+
+
+ Fixed Amount
+
+
+
+
+
+ {/* Refund Value Input */}
+
+
+
+
+
+
+
+ For COD orders, refunds are processed immediately upon delivery confirmation.
+
+
+
+
+ setInitiateRefundDialogOpen(false)}
+ >
+ Cancel
+
+
+
+ {initiateRefundMutation.isPending
+ ? "Processing..."
+ : "Confirm Refund"}
+
+
+
+
+
+
+ {/* Cancel Order Dialog */}
+ setCancelDialogOpen(false)}
+ onSuccess={refetch}
+ />
+
+ );
+}
+
diff --git a/apps/admin-ui/app/(drawer)/order-details/_layout.tsx b/apps/admin-ui/app/(drawer)/order-details/_layout.tsx
new file mode 100644
index 0000000..d238e05
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/order-details/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/orders/_layout.tsx b/apps/admin-ui/app/(drawer)/orders/_layout.tsx
new file mode 100644
index 0000000..d6319ff
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/orders/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/orders/index.tsx b/apps/admin-ui/app/(drawer)/orders/index.tsx
new file mode 100644
index 0000000..93ab819
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/orders/index.tsx
@@ -0,0 +1,836 @@
+import React, { useState , useEffect } from 'react';
+import { View, TouchableOpacity, Alert, TextInput, ActivityIndicator } from 'react-native';
+import { AppContainer, MyText, tw, MyFlatList, BottomDialog, BottomDropdown, Checkbox, theme, MyTextInput } from 'common-ui';
+import { trpc } from '../../../src/trpc-client';
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import dayjs from 'dayjs';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { Entypo } from '@expo/vector-icons';
+import CancelOrderDialog from '@/components/CancelOrderDialog';
+
+const AdminNotesForm = ({ orderId, existingNotes, onClose, refetch }: { orderId: string; existingNotes?: string | null; onClose: () => void; refetch: () => void }) => {
+ const [notesText, setNotesText] = useState(existingNotes || '');
+ const updateNotesMutation = trpc.admin.order.updateNotes.useMutation();
+
+ return (
+
+ Admin Notes
+
+
+ {
+ updateNotesMutation.mutate(
+ { orderId: parseInt(orderId), adminNotes: notesText },
+ {
+ onSuccess: () => {
+ onClose();
+ Alert.alert('Success', 'Notes updated successfully');
+ refetch();
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to update notes');
+ },
+ }
+ );
+ }}
+ >
+ Save
+
+
+
+ );
+};
+
+
+interface OrderType {
+ id: number;
+ orderId: string;
+ readableId: number;
+ customerName: string | null;
+ address: string;
+ totalAmount: number;
+ deliveryCharge: number;
+ items: {
+ id?: number;
+ name: string;
+ quantity: number;
+ price: number;
+ amount: number;
+ unit: string;
+ isPackaged?: boolean;
+ isPackageVerified?: boolean;
+ }[];
+ createdAt: string;
+ deliveryTime: string | null;
+ status: 'pending' | 'delivered' | 'cancelled';
+ isPackaged: boolean;
+ isDelivered: boolean;
+ isCod: boolean;
+ isFlashDelivery: boolean;
+ couponCode?: string;
+ couponDescription?: string;
+ discountAmount?: number;
+ adminNotes?: string | null;
+ userNotes?: string | null;
+}
+
+const OrderItem = ({ order, refetch }: { order: OrderType; refetch: () => void }) => {
+ const id = order.orderId;
+ const router = useRouter();
+ const [menuOpen, setMenuOpen] = useState(false);
+ const [itemsDialogOpen, setItemsDialogOpen] = useState(false);
+ const [notesDialogOpen, setNotesDialogOpen] = useState(false);
+ const [cancelDialogOpen, setCancelDialogOpen] = useState(false);
+ const [userNotesDialogOpen, setUserNotesDialogOpen] = useState(false);
+ const [adminNotesDialogOpen, setAdminNotesDialogOpen] = useState(false);
+ const [updatingItems, setUpdatingItems] = useState>(new Set());
+
+ const updatePackagedMutation = trpc.admin.order.updatePackaged.useMutation();
+ const updateDeliveredMutation = trpc.admin.order.updateDelivered.useMutation();
+ const updateItemPackagingMutation = trpc.admin.order.updateOrderItemPackaging.useMutation();
+
+ const handleOrderPress = () => {
+ router.push(`/order-details/${order.orderId}` as any);
+ };
+
+ const handleMenuOption = () => {
+ setMenuOpen(false);
+ router.push(`/order-details/${order.orderId}` as any);
+ };
+
+ const handleMarkPackaged = (isPackaged: boolean) => {
+ updatePackagedMutation.mutate(
+ { orderId: order.orderId.toString(), isPackaged },
+ {
+ onSuccess: () => {
+ setMenuOpen(false);
+ refetch();
+ },
+ }
+ );
+ };
+
+ const handleMarkDelivered = (isDelivered: boolean) => {
+ updateDeliveredMutation.mutate(
+ { orderId: order.orderId.toString(), isDelivered },
+ {
+ onSuccess: () => {
+ setMenuOpen(false);
+ refetch();
+ },
+ }
+ );
+ };
+
+ const handleItemPackagingToggle = (itemId: number, field: 'isPackaged' | 'isPackageVerified', value: boolean) => {
+ setUpdatingItems(prev => new Set(prev).add(itemId));
+
+ updateItemPackagingMutation.mutate(
+ { orderItemId: itemId, [field]: value },
+ {
+ onSuccess: () => {
+ setUpdatingItems(prev => {
+ const newSet = new Set(prev);
+ newSet.delete(itemId);
+ return newSet;
+ });
+ refetch();
+ },
+ onError: (error: any) => {
+ setUpdatingItems(prev => {
+ const newSet = new Set(prev);
+ newSet.delete(itemId);
+ return newSet;
+ });
+ Alert.alert("Error", error.message || "Failed to update packaging status");
+ },
+ }
+ );
+ };
+
+ const getStatusColor = (status: string) => {
+ switch (status) {
+ case 'delivered': return 'bg-green-100 text-green-800';
+ case 'cancelled': return 'bg-red-100 text-red-800';
+ default: return 'bg-yellow-100 text-yellow-800';
+ }
+ };
+
+ if(order.id === 162)
+ console.log({order})
+
+ return (
+ <>
+
+ {/* Header Section */}
+
+
+
+
+
+ {order.customerName || 'Unknown Customer'}
+
+
+ #{order.readableId}
+
+ {order.isFlashDelivery && (
+
+
+ FLASH
+
+ )}
+
+
+
+
+ {dayjs(order.createdAt).format('MMM D, h:mm A')}
+
+
+
+
+ setMenuOpen(true)}
+ style={tw`p-2 -mr-2 -mt-2 rounded-full`}
+ >
+
+
+
+
+
+ {/* Main Content */}
+
+ {/* Status Badges */}
+
+ {/*
+ {order.status}
+ */}
+ {/* {order.isCod && (
+
+ COD
+
+ )} */}
+
+ Packaged
+ handleMarkPackaged(!order.isPackaged)}
+ onPress={() => {}}
+ size={18}
+ fillColor={theme.colors.gray500}
+ checkColor="#FFFFFF"
+ />
+
+
+ Delivered
+ handleMarkDelivered(!order.isDelivered)}
+ size={18}
+ fillColor="#10B981"
+ checkColor="#FFFFFF"
+ />
+
+
+
+ {/* Delivery Info */}
+
+
+
+ Delivery Address
+
+ {order.address}
+
+
+
+
+ {order.isFlashDelivery ? "Flash Delivery:" : "Slot:"} {order.isFlashDelivery ? dayjs(order.createdAt).add(30, 'minutes').format('MMM D, h:mm A') : order.deliveryTime ? dayjs(order.deliveryTime).format("ddd, MMM D • h:mm A") : 'Not scheduled'}
+
+
+ {order.isFlashDelivery && (
+
+
+
+ 30-Minute Delivery • High Priority
+
+
+ )}
+
+
+
+ {/* Items Summary & Total */}
+
+
+
+ setItemsDialogOpen(true)}
+ style={tw`flex-row items-center py-2 px-3 bg-blue-50 rounded-lg flex-1 mr-3`}
+ >
+
+
+ {order.items.length} {order.items.length === 1 ? 'item' : 'items'}
+
+ {order.isFlashDelivery && (
+
+ ⚡
+
+ )}
+
+
+ Total:
+ ₹{order.totalAmount}
+
+
+
+
+
+ {/* Coupons */}
+ {order.couponCode && (
+
+ Applied Coupons
+
+
+ {order.couponCode}
+
+ {order.couponDescription && (
+
+ {order.couponDescription}
+
+ )}
+ {order.discountAmount && (
+
+ Discount: ₹{order.discountAmount}
+
+ )}
+
+
+ )}
+
+ {/* Notes Section */}
+
+ {order.userNotes && (
+ setUserNotesDialogOpen(true)}
+ >
+
+
+ User Notes
+
+
+ )}
+ {order.adminNotes && (
+ setNotesDialogOpen(true)}
+ >
+
+
+ Admin Notes
+
+
+ )}
+
+
+ {/* Footer / Delivery Charge */}
+ {order.deliveryCharge > 0 && (
+
+
+ Delivery Charge
+ ₹{order.deliveryCharge}
+
+
+ )}
+
+
+
+ setMenuOpen(false)}>
+
+
+ Order Options
+
+ {order.isFlashDelivery && (
+
+
+
+ Flash Delivery Order
+
+ Deliver within 30 minutes • High Priority
+
+
+
+ )}
+ handleMarkPackaged(!order.isPackaged)}
+ >
+
+
+ {order.isPackaged ? 'Mark Not Packaged' : 'Mark Packaged'}
+
+
+ {order.isPackaged && (
+ handleMarkDelivered(!order.isDelivered)}
+ >
+
+
+ {order.isDelivered ? 'Mark Not Delivered' : 'Mark Delivered'}
+
+
+ )}
+
+
+
+ Order Details
+
+
+ {
+ setMenuOpen(false);
+ setNotesDialogOpen(true);
+ }}
+ >
+
+
+ Admin Notes
+
+
+ {order.status !== 'cancelled' && (
+ {
+ setMenuOpen(false);
+ setCancelDialogOpen(true);
+ }}
+ >
+
+
+ Cancel Order
+
+
+ )}
+
+
+
+ setItemsDialogOpen(false)}>
+
+
+
+ Order Items
+
+ {order.isFlashDelivery && (
+
+
+ FLASH
+
+ )}
+
+
+ Total: ₹{order.totalAmount}
+
+ {order.items.map((item, idx) => (
+
+
+
+ {item.quantity} {item.unit}
+
+
+ {item.name.length > 30 ? `${item.name.substring(0, 30)}...` : item.name}
+
+ {item.isPackaged !== undefined && item.isPackageVerified !== undefined && (
+ <>
+
+ pkg
+ handleItemPackagingToggle(item.id!, 'isPackaged', !item.isPackaged)}
+ size={18}
+ fillColor={updatingItems.has(item.id!) ? "#F59E0B" : "#10B981"}
+ checkColor="#FFFFFF"
+ />
+
+
+ verf
+ handleItemPackagingToggle(item.id!, 'isPackageVerified', !item.isPackageVerified)}
+ size={18}
+ fillColor={updatingItems.has(item.id!) ? "#F59E0B" : "#10B981"}
+ checkColor="#FFFFFF"
+ />
+
+ {updatingItems.has(item.id!) && (
+
+ )}
+ >
+ )}
+
+
+ ))}
+
+
+
+ setNotesDialogOpen(false)}>
+ setNotesDialogOpen(false)} refetch={refetch} />
+
+
+ setCancelDialogOpen(false)}
+ onSuccess={refetch}
+ />
+
+ setUserNotesDialogOpen(false)}>
+
+
+ User Notes
+
+
+
+ {order.userNotes}
+
+
+
+
+
+ setAdminNotesDialogOpen(false)}>
+
+
+ Admin Notes
+
+
+
+ {order.adminNotes}
+
+
+
+
+ >
+ );
+ };
+
+export default function Orders() {
+ const router = useRouter();
+ const { filter } = useLocalSearchParams<{ filter?: string }>();
+ const [selectedSlot, setSelectedSlot] = useState(null);
+ const [selectedSlotType, setSelectedSlotType] = useState<'slot' | 'flash' | null>(null);
+ const [packagedFilter, setPackagedFilter] = useState<'all' | 'packaged' | 'not_packaged'>('all');
+ const [packagedChecked, setPackagedChecked] = useState(false);
+ const [notPackagedChecked, setNotPackagedChecked] = useState(false);
+ const [deliveredFilter, setDeliveredFilter] = useState<'all' | 'delivered' | 'not_delivered'>('all');
+ const [deliveredChecked, setDeliveredChecked] = useState(false);
+ const [notDeliveredChecked, setNotDeliveredChecked] = useState(false);
+ const [cancellationFilter, setCancellationFilter] = useState<'all' | 'cancelled' | 'not_cancelled'>('all');
+ const [cancelledChecked, setCancelledChecked] = useState(false);
+ const [notCancelledChecked, setNotCancelledChecked] = useState(false);
+ const [flashDeliveryFilter, setFlashDeliveryFilter] = useState<'all' | 'flash' | 'regular'>('all');
+ const [flashChecked, setFlashChecked] = useState(false);
+ const [regularChecked, setRegularChecked] = useState(false);
+ const [filterDialogOpen, setFilterDialogOpen] = useState(false);
+
+ // Handle initial filter from URL params
+ useEffect(() => {
+ if (filter === 'flash') {
+ setSelectedSlotType('flash');
+ setFlashDeliveryFilter('flash');
+ setFlashChecked(true);
+ setRegularChecked(false);
+ }
+ }, [filter]);
+ const { data: slotsData } = trpc.admin.slots.getAll.useQuery();
+ const { data, isLoading, isFetchingNextPage, fetchNextPage, hasNextPage, refetch } = trpc.admin.order.getAll.useInfiniteQuery(
+ {
+ limit: 20,
+ slotId: selectedSlotType === 'slot' ? selectedSlot : null,
+ packagedFilter,
+ deliveredFilter,
+ cancellationFilter,
+ flashDeliveryFilter: selectedSlotType === 'flash' ? 'flash' : flashDeliveryFilter
+ },
+ {
+ getNextPageParam: (lastPage) => lastPage?.nextCursor,
+ }
+ );
+
+ const orders = data?.pages.flatMap(page => page?.orders) || [];
+
+ if (isLoading) {
+ return (
+
+
+ Loading orders...
+
+ );
+ }
+
+ const slotOptions = [
+ { label: '⚡ Flash Deliveries', value: 'flash' },
+ ...(slotsData?.slots?.map(slot => ({
+ label: dayjs(slot.deliveryTime).format('ddd DD MMM, h:mm a'),
+ value: slot.id.toString(),
+ })) || [])
+ ];
+
+
+ return (
+ <>
+ item!.orderId}
+ renderItem={({ item }) => item ? : null}
+ onEndReached={() => {
+ if (hasNextPage && !isFetchingNextPage) {
+ fetchNextPage();
+ }
+ }}
+ onEndReachedThreshold={0.5}
+ onRefresh={() => refetch()}
+ ListHeaderComponent={
+ <>
+
+
+ {
+ if (val === 'flash') {
+ setSelectedSlotType('flash');
+ setSelectedSlot(null);
+ setFlashDeliveryFilter('flash');
+ // Reset other filters when switching to flash
+ setPackagedFilter('all');
+ setPackagedChecked(false);
+ setNotPackagedChecked(false);
+ setDeliveredFilter('all');
+ setDeliveredChecked(false);
+ setNotDeliveredChecked(false);
+ setCancellationFilter('all');
+ setCancelledChecked(false);
+ setNotCancelledChecked(false);
+ } else {
+ setSelectedSlotType('slot');
+ setSelectedSlot(val ? Number(val) : null);
+ setFlashDeliveryFilter('all');
+ }
+ }}
+ placeholder="All slots"
+ />
+
+ setFilterDialogOpen(true)}
+ style={tw`p-2`}
+ >
+
+
+
+ {!isLoading && selectedSlotType && (
+
+
+ {selectedSlotType === 'flash'
+ ? `${orders.length} Flash delivery orders`
+ : `${orders.length} Orders in slot`
+ }
+
+
+ )}
+ >
+ }
+ ListFooterComponent={
+ isFetchingNextPage ? (
+
+
+ Loading more...
+
+ ) : null
+ }
+ />
+
+ setFilterDialogOpen(false)}>
+
+
+ Packaged Status
+
+ {
+ const newValue = !packagedChecked;
+ setPackagedChecked(newValue);
+ if (newValue && notPackagedChecked) {
+ setPackagedFilter('all');
+ } else if (newValue) {
+ setPackagedFilter('packaged');
+ } else if (notPackagedChecked) {
+ setPackagedFilter('not_packaged');
+ } else {
+ setPackagedFilter('all');
+ }
+ }}
+ />
+ Packaged
+
+
+ {
+ const newValue = !notPackagedChecked;
+ setNotPackagedChecked(newValue);
+ if (packagedChecked && newValue) {
+ setPackagedFilter('all');
+ } else if (newValue) {
+ setPackagedFilter('not_packaged');
+ } else if (packagedChecked) {
+ setPackagedFilter('packaged');
+ } else {
+ setPackagedFilter('all');
+ }
+ }}
+ />
+ Not Packaged
+
+
+
+ Delivered Status
+
+ {
+ const newValue = !deliveredChecked;
+ setDeliveredChecked(newValue);
+ if (newValue && notDeliveredChecked) {
+ setDeliveredFilter('all');
+ } else if (newValue) {
+ setDeliveredFilter('delivered');
+ } else if (notDeliveredChecked) {
+ setDeliveredFilter('not_delivered');
+ } else {
+ setDeliveredFilter('all');
+ }
+ }}
+ />
+ Delivered
+
+
+ {
+ const newValue = !notDeliveredChecked;
+ setNotDeliveredChecked(newValue);
+ if (deliveredChecked && newValue) {
+ setDeliveredFilter('all');
+ } else if (newValue) {
+ setDeliveredFilter('not_delivered');
+ } else if (deliveredChecked) {
+ setDeliveredFilter('delivered');
+ } else {
+ setDeliveredFilter('all');
+ }
+ }}
+ />
+ Not Delivered
+
+
+
+ Cancellation Status
+
+ {
+ const newValue = !cancelledChecked;
+ setCancelledChecked(newValue);
+ if (newValue && notCancelledChecked) {
+ setCancellationFilter('all');
+ } else if (newValue) {
+ setCancellationFilter('cancelled');
+ } else if (notCancelledChecked) {
+ setCancellationFilter('not_cancelled');
+ } else {
+ setCancellationFilter('all');
+ }
+ }}
+ />
+ Cancelled
+
+
+ {
+ const newValue = !notCancelledChecked;
+ setNotCancelledChecked(newValue);
+ if (cancelledChecked && newValue) {
+ setCancellationFilter('all');
+ } else if (newValue) {
+ setCancellationFilter('not_cancelled');
+ } else if (cancelledChecked) {
+ setCancellationFilter('cancelled');
+ } else {
+ setCancellationFilter('all');
+ }
+ }}
+ />
+ Not Cancelled
+
+
+
+ Delivery Type
+
+ {
+ const newValue = !flashChecked;
+ setFlashChecked(newValue);
+ if (newValue && regularChecked) {
+ setFlashDeliveryFilter('all');
+ } else if (newValue) {
+ setFlashDeliveryFilter('flash');
+ } else if (regularChecked) {
+ setFlashDeliveryFilter('regular');
+ } else {
+ setFlashDeliveryFilter('all');
+ }
+ }}
+ />
+ ⚡ Flash Delivery
+
+
+ {
+ const newValue = !regularChecked;
+ setRegularChecked(newValue);
+ if (flashChecked && newValue) {
+ setFlashDeliveryFilter('all');
+ } else if (newValue) {
+ setFlashDeliveryFilter('regular');
+ } else if (flashChecked) {
+ setFlashDeliveryFilter('flash');
+ } else {
+ setFlashDeliveryFilter('all');
+ }
+ }}
+ />
+ Regular Delivery
+
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/prices-overview/_layout.tsx b/apps/admin-ui/app/(drawer)/prices-overview/_layout.tsx
new file mode 100644
index 0000000..c65c91a
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/prices-overview/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function PricesOverviewLayout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/prices-overview/index.tsx b/apps/admin-ui/app/(drawer)/prices-overview/index.tsx
new file mode 100644
index 0000000..2c3ec88
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/prices-overview/index.tsx
@@ -0,0 +1,424 @@
+import React, { useState, useEffect, useMemo } from "react";
+import {
+ View,
+ TouchableOpacity,
+ FlatList,
+ Image,
+ Alert,
+ ActivityIndicator,
+ TextInput,
+} from "react-native";
+import { useRouter } from "expo-router";
+import {
+ AppContainer,
+ MyText,
+ tw,
+ BottomDialog,
+ BottomDropdown,
+ Checkbox,
+} from "common-ui";
+import { trpc } from "@/src/trpc-client";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { Entypo } from "@expo/vector-icons";
+
+interface ProductItemProps {
+ item: any;
+ hasChanges: (productId: number) => boolean;
+ pendingChanges: Record;
+ setPendingChanges: React.Dispatch>>;
+ openEditDialog: (product: any) => void;
+}
+
+const ProductItemComponent: React.FC = ({
+ item: product,
+ hasChanges,
+ pendingChanges,
+ setPendingChanges,
+ openEditDialog,
+}) => {
+ const changed = hasChanges(product.id);
+ const change = pendingChanges[product.id] || {};
+ const displayPrice = change.price !== undefined ? change.price : product.price;
+ const displayMarketPrice = change.marketPrice !== undefined ? change.marketPrice : product.marketPrice;
+ const displayFlashPrice = change.flashPrice !== undefined ? change.flashPrice : product.flashPrice;
+
+ return (
+
+ {/* Change indicator */}
+
+
+ {changed && }
+
+
+
+ {/* First row: Image and Name */}
+
+ {/* Product image */}
+
+
+ {/* Product name and Flash Checkbox */}
+
+
+ {product.name.length > 25 ? product.name.substring(0, 25) + '...' : product.name}
+
+
+ {
+ const currentValue = change.isFlashAvailable ?? product.isFlashAvailable ?? false;
+ setPendingChanges(prev => ({
+ ...prev,
+ [product.id]: {
+ ...change,
+ isFlashAvailable: !currentValue,
+ },
+ }));
+ }}
+ style={tw`mr-1`}
+ />
+ Flash
+
+
+
+
+ {/* Second row: Prices */}
+
+ {/* Our Price */}
+
+ Our Price
+
+ ₹{displayPrice}
+ openEditDialog(product)} style={tw`ml-1`}>
+
+
+
+
+
+ {/* Market Price */}
+
+ Market Price
+
+ {displayMarketPrice ? `₹${displayMarketPrice}` : "N/A"}
+ openEditDialog(product)} style={tw`ml-1`}>
+
+
+
+
+
+ {/* Flash Price */}
+
+ Flash Price
+
+ {displayFlashPrice ? `₹${displayFlashPrice}` : "N/A"}
+ openEditDialog(product)} style={tw`ml-1`}>
+
+
+
+
+
+
+ );
+};
+
+interface PendingChange {
+ price?: number;
+ marketPrice?: number | null;
+ flashPrice?: number | null;
+ isFlashAvailable?: boolean;
+}
+
+interface EditDialogState {
+ open: boolean;
+ product: any;
+ tempPrice: string;
+ tempMarketPrice: string;
+ tempFlashPrice: string;
+}
+
+export default function PricesOverview() {
+ const router = useRouter();
+ const [selectedStores, setSelectedStores] = useState([]);
+ const [pendingChanges, setPendingChanges] = useState>({});
+ const [editDialog, setEditDialog] = useState({
+ open: false,
+ product: null,
+ tempPrice: "",
+ tempMarketPrice: "",
+ tempFlashPrice: "",
+ });
+ const [showMenu, setShowMenu] = useState(false);
+
+ const { data: productsData, isLoading: productsLoading, refetch: refetchProducts } =
+ trpc.admin.product.getProducts.useQuery();
+ const { data: storesData, isLoading: storesLoading } =
+ trpc.admin.store.getStores.useQuery();
+
+ const updatePricesMutation = trpc.admin.product.updateProductPrices.useMutation();
+
+ const stores = storesData?.stores || [];
+ const allProducts = productsData?.products || [];
+
+ // Sort stores alphabetically
+ const sortedStores = useMemo(() =>
+ [...stores].sort((a, b) => a.name.localeCompare(b.name)),
+ [stores]
+ );
+
+ // Store options for dropdown
+ const storeOptions = useMemo(() =>
+ sortedStores.map(store => ({
+ label: store.name,
+ value: store.id.toString(),
+ })),
+ [sortedStores]
+ );
+
+ // Initialize selectedStores to all if not set
+ useEffect(() => {
+ if (stores.length > 0 && selectedStores.length === 0) {
+ setSelectedStores(stores.map(s => s.id.toString()));
+ }
+ }, [stores, selectedStores]);
+
+ // Filter products by selected stores
+ const filteredProducts = useMemo(() => {
+ if (selectedStores.length === 0) return allProducts;
+ return allProducts.filter(product =>
+ product.storeId && selectedStores.includes(product.storeId.toString())
+ );
+ }, [allProducts, selectedStores]);
+
+ // Check if a product has changes
+ const hasChanges = (productId: number) => !!pendingChanges[productId];
+
+ // Open edit dialog
+ const openEditDialog = (product: any) => {
+ const change = pendingChanges[product.id] || {};
+ setEditDialog({
+ open: true,
+ product,
+ tempPrice: (change.price ?? product.price)?.toString() || "",
+ tempMarketPrice: (change.marketPrice ?? product.marketPrice)?.toString() || "",
+ tempFlashPrice: (change.flashPrice ?? product.flashPrice)?.toString() || "",
+ });
+ };
+
+ // Save edit dialog
+ const saveEditDialog = () => {
+ const price = parseFloat(editDialog.tempPrice);
+ const marketPrice = editDialog.tempMarketPrice ? parseFloat(editDialog.tempMarketPrice) : null;
+ const flashPrice = editDialog.tempFlashPrice ? parseFloat(editDialog.tempFlashPrice) : null;
+
+ if (isNaN(price) || price <= 0) {
+ Alert.alert("Error", "Please enter a valid price");
+ return;
+ }
+
+ if (editDialog.tempMarketPrice && (isNaN(marketPrice!) || marketPrice! <= 0)) {
+ Alert.alert("Error", "Please enter a valid market price");
+ return;
+ }
+
+ if (editDialog.tempFlashPrice && (isNaN(flashPrice!) || flashPrice! <= 0)) {
+ Alert.alert("Error", "Please enter a valid flash price");
+ return;
+ }
+
+ setPendingChanges(prev => ({
+ ...prev,
+ [editDialog.product.id]: {
+ price: price !== editDialog.product.price ? price : undefined,
+ marketPrice: marketPrice !== editDialog.product.marketPrice ? marketPrice : undefined,
+ flashPrice: flashPrice !== editDialog.product.flashPrice ? flashPrice : undefined,
+ },
+ }));
+
+ setEditDialog({ open: false, product: null, tempPrice: "", tempMarketPrice: "", tempFlashPrice: "" });
+ };
+
+ // Handle save all changes
+ const handleSave = () => {
+ const updates = Object.entries(pendingChanges).map(([productId, change]) => {
+ const update: any = { productId: parseInt(productId) };
+ if (change.price !== undefined) update.price = change.price;
+ if (change.marketPrice !== undefined) update.marketPrice = change.marketPrice;
+ if (change.flashPrice !== undefined) update.flashPrice = change.flashPrice;
+ if (change.isFlashAvailable !== undefined) update.isFlashAvailable = change.isFlashAvailable;
+ return update;
+ });
+
+ updatePricesMutation.mutate(
+ { updates },
+ {
+ onSuccess: () => {
+ setPendingChanges({});
+ refetchProducts();
+ Alert.alert("Success", "Prices updated successfully");
+ },
+ onError: (error: any) => {
+ Alert.alert("Error", `Failed to update prices: ${error.message || "Unknown error"}`);
+ },
+ }
+ );
+ };
+
+
+
+ const changeCount = Object.keys(pendingChanges).length;
+
+ return (
+
+ {/* Stores filter, save button, and menu */}
+
+
+ setSelectedStores(value as string[])}
+ multiple={true}
+ placeholder="Select stores"
+ />
+
+ 0 && !updatePricesMutation.isPending ? tw`bg-blue-600` : tw`bg-gray-300`,
+ ]}
+ onPress={handleSave}
+ disabled={changeCount === 0 || updatePricesMutation.isPending}
+ >
+ {updatePricesMutation.isPending ? (
+ 0 ? "white" : "#6b7280"} style={tw`mr-2`} />
+ ) : (
+ 0 ? "white" : "#6b7280"}
+ style={tw`mr-2`}
+ />
+ )}
+ 0 ? tw`text-white` : tw`text-gray-500`,
+ ]}
+ >
+ Save ({changeCount})
+
+
+ setShowMenu(true)}
+ style={tw`p-2 -mr-2`}
+ >
+
+
+
+
+ {/* Content */}
+ {productsLoading || storesLoading ? (
+
+
+ Loading...
+
+ ) : (
+ (
+
+ )}
+ keyExtractor={(item) => item.id.toString()}
+ contentContainerStyle={tw`p-4`}
+ showsVerticalScrollIndicator={false}
+ />
+ )}
+
+ {/* Edit Dialog */}
+ setEditDialog({ ...editDialog, open: false, tempFlashPrice: "" })}>
+
+ {editDialog.product?.name}
+
+
+ Our Price
+ setEditDialog({ ...editDialog, tempPrice: text })}
+ keyboardType="numeric"
+ placeholder="Enter price"
+ />
+
+
+
+ Market Price (Optional)
+ setEditDialog({ ...editDialog, tempMarketPrice: text })}
+ keyboardType="numeric"
+ placeholder="Enter market price"
+ />
+
+
+
+ Flash Price (Optional)
+ setEditDialog({ ...editDialog, tempFlashPrice: text })}
+ keyboardType="numeric"
+ placeholder="Enter flash price"
+ />
+
+
+
+ Update Price
+
+
+
+
+ {/* Menu Dialog */}
+ setShowMenu(false)}>
+
+
+ Options
+
+ {
+ router.push('/rebalance-orders' as any);
+ setShowMenu(false);
+ }}
+ >
+
+
+ Re-Balance Orders
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/product-detail/[id].tsx b/apps/admin-ui/app/(drawer)/product-detail/[id].tsx
new file mode 100644
index 0000000..14a21bb
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/product-detail/[id].tsx
@@ -0,0 +1,547 @@
+import React, { useState, useEffect } from 'react';
+import { View, Text, ScrollView, TouchableOpacity, Alert, TextInput, Dimensions, ActivityIndicator, Platform } from 'react-native';
+import { Image } from 'expo-image';
+import { useRouter, useLocalSearchParams, Stack } from 'expo-router';
+import { tw, AppContainer, MyText, useMarkDataFetchers, BottomDialog, ImageUploader, ImageCarousel } from 'common-ui';
+import { MaterialIcons, FontAwesome5, Ionicons, Feather, MaterialCommunityIcons } from '@expo/vector-icons';
+import { trpc } from '@/src/trpc-client';
+import usePickImage from 'common-ui/src/components/use-pick-image';
+import { Formik } from 'formik';
+import { LinearGradient } from 'expo-linear-gradient';
+import { BlurView } from 'expo-blur';
+import Animated, { FadeInDown, FadeInUp, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
+
+const { width: screenWidth } = Dimensions.get("window");
+const carouselHeight = screenWidth * 0.85;
+
+interface ReviewResponseFormProps {
+ reviewId: number;
+ onClose: () => void;
+}
+
+const ReviewResponseForm: React.FC = ({ reviewId, onClose }) => {
+ const [adminResponse, setAdminResponse] = useState('');
+ const [selectedImages, setSelectedImages] = useState<{ blob: Blob; mimeType: string }[]>([]);
+ const [displayImages, setDisplayImages] = useState<{ uri?: string }[]>([]);
+ const [uploadUrls, setUploadUrls] = useState([]);
+
+ const respondToReview = trpc.admin.product.respondToReview.useMutation();
+ const generateUploadUrls = trpc.user.fileUpload.generateUploadUrls.useMutation();
+
+ const handleImagePick = usePickImage({
+ setFile: async (assets: any) => {
+ if (!assets || (Array.isArray(assets) && assets.length === 0)) {
+ setSelectedImages([]);
+ setDisplayImages([]);
+ return;
+ }
+
+ const files = Array.isArray(assets) ? assets : [assets];
+ const blobPromises = files.map(async (asset) => {
+ const response = await fetch(asset.uri);
+ const blob = await response.blob();
+ return { blob, mimeType: asset.mimeType || 'image/jpeg' };
+ });
+
+ const blobArray = await Promise.all(blobPromises);
+ setSelectedImages(blobArray);
+ setDisplayImages(files.map(asset => ({ uri: asset.uri })));
+ },
+ multiple: true,
+ });
+
+ const handleRemoveImage = (uri: string) => {
+ const index = displayImages.findIndex(img => img.uri === uri);
+ if (index !== -1) {
+ const newDisplay = displayImages.filter((_, i) => i !== index);
+ const newFiles = selectedImages.filter((_, i) => i !== index);
+ setDisplayImages(newDisplay);
+ setSelectedImages(newFiles);
+ }
+ };
+
+ const handleSubmit = async (adminResponse: string) => {
+ try {
+ const mimeTypes = selectedImages.map(s => s.mimeType);
+ const { uploadUrls: generatedUrls } = await generateUploadUrls.mutateAsync({
+ contextString: 'review',
+ mimeTypes,
+ });
+ const keys = generatedUrls.map(url => {
+ const u = new URL(url);
+ const rawKey = u.pathname.replace(/^\/+/, "");
+ const decodedKey = decodeURIComponent(rawKey);
+ const parts = decodedKey.split('/');
+ parts.shift();
+ return parts.join('/');
+ });
+ setUploadUrls(generatedUrls);
+
+ for (let i = 0; i < generatedUrls.length; i++) {
+ const uploadUrl = generatedUrls[i];
+ const { blob, mimeType } = selectedImages[i];
+ const uploadResponse = await fetch(uploadUrl, {
+ method: 'PUT',
+ body: blob,
+ headers: { 'Content-Type': mimeType },
+ });
+ if (!uploadResponse.ok) throw new Error(`Upload failed with status ${uploadResponse.status}`);
+ }
+
+ await respondToReview.mutateAsync({
+ reviewId,
+ adminResponse,
+ adminResponseImages: keys,
+ uploadUrls: generatedUrls,
+ });
+
+ Alert.alert('Success', 'Response submitted');
+ onClose();
+ setAdminResponse('');
+ setSelectedImages([]);
+ setDisplayImages([]);
+ setUploadUrls([]);
+ } catch (error:any) {
+
+ Alert.alert('Error', error.message || 'Failed to submit response.');
+ }
+ };
+
+ return (
+ handleSubmit(values.adminResponse)}
+ >
+ {({ handleChange, handleSubmit: formikSubmit, values }) => (
+
+
+
+
+ Attach Images
+
+
+
+ formikSubmit()}
+ activeOpacity={0.8}
+ disabled={respondToReview.isPending}
+ >
+
+ {respondToReview.isPending ? (
+
+ ) : (
+ Submit Response
+ )}
+
+
+
+ )}
+
+ );
+};
+
+export default function ProductDetail() {
+ const { id } = useLocalSearchParams();
+ const router = useRouter();
+ const productId = parseInt(id as string);
+
+ const { data: productData, isLoading, error, refetch } = trpc.admin.product.getProductById.useQuery({ id: productId });
+ const { data: reviewsData } = trpc.admin.product.getProductReviews.useQuery({ productId });
+ const [responseDialogOpen, setResponseDialogOpen] = useState(false);
+ const [selectedReview, setSelectedReview] = useState(null);
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const toggleOutOfStock = trpc.admin.product.toggleOutOfStock.useMutation();
+
+ const product = productData?.product;
+
+ const handleEdit = () => {
+ router.push(`/edit-product?id=${productId}` as any);
+ };
+
+
+
+ if (isLoading) {
+ return (
+
+
+ Loading...
+
+ );
+ }
+
+ if (error || !product) {
+ return (
+
+
+ Product Not Found
+ router.back()} style={tw`mt-6 px-8 py-3 bg-gray-100 rounded-full`}>
+ Go Back
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+ {/* Hero Section */}
+
+ {product.images && product.images.length > 0 ? (
+
+ ) : (
+
+ )}
+
+ {/* Gradient Overlay */}
+
+
+ {/* Floating Header Buttons */}
+
+ router.back()} activeOpacity={0.8}>
+
+
+
+
+
+
+
+
+ Edit
+
+
+
+
+
+ {/* Content Container - Overlapping the image slightly */}
+
+
+ {/* Main Info Card */}
+
+
+ {product.name}
+ {
+ toggleOutOfStock.mutate({ id: productId }, {
+ onSuccess: () => Alert.alert('Success', 'Stock status updated'),
+ onError: (err) => Alert.alert('Error', err.message)
+ });
+ }}
+ activeOpacity={0.9}
+ >
+
+
+ {product.isOutOfStock ? 'Out of Stock' : 'In Stock'}
+
+
+
+
+
+
+ ₹{product.price}
+ / {product.unit?.shortNotation}
+ {product.marketPrice && (
+
+ ₹{product.marketPrice}
+
+ )}
+
+
+ {/* Increment Step Info */}
+
+
+
+ Increment: {product.incrementStep || 1}
+
+
+
+
+ {/* Quick Stats Row */}
+
+
+
+
+
+ {reviewsData?.reviews.reduce((acc, r) => acc + r.ratings, 0)
+ ? (reviewsData.reviews.reduce((acc, r) => acc + r.ratings, 0) / reviewsData.reviews.length).toFixed(1)
+ : '-'}
+
+
+ Rating
+
+
+ {reviewsData?.reviews.length || 0}
+ Reviews
+
+ {/*
+ {
+ toggleOutOfStock.mutate({ id: productId }, {
+ onSuccess: () => Alert.alert('Success', 'Stock status updated'),
+ onError: (err) => Alert.alert('Error', err.message)
+ });
+ }}
+ activeOpacity={0.9}
+ >
+
+
+ {product.isOutOfStock ? 'Out of Stock' : 'In Stock'}
+
+
+
+ Stock
+ */}
+
+
+
+ {/* Description */}
+
+
+
+
+
+
+ Description
+
+
+ {product.shortDescription && (
+ {product.shortDescription}
+ )}
+
+
+ {product.longDescription || "No detailed description available for this product."}
+
+
+
+
+ {/* Availability */}
+
+
+
+
+
+
+ Availability
+
+
+
+ This product is currently {product.isOutOfStock ? 'out of stock' : 'in stock'}.
+
+
+ {
+ toggleOutOfStock.mutate({ id: productId }, {
+ onSuccess: () => {
+ Alert.alert('Success', 'Stock status updated');
+ refetch();
+ },
+ onError: (err) => Alert.alert('Error', err.message)
+ });
+ }}
+ activeOpacity={0.8}
+ style={tw`bg-gray-100 px-4 py-2 rounded-full border border-gray-200 self-start`}
+ >
+
+ Mark as {product.isOutOfStock ? 'In Stock' : 'Out of Stock'}
+
+
+
+
+
+ {/* Special Deals */}
+ {product.deals && product.deals.length > 0 && (
+
+
+
+
+
+
+ Special Deals
+
+
+ {product.deals.map((deal, index) => (
+
+
+ Buy {deal.quantity}
+ Valid until {new Date(deal.validTill).toLocaleDateString()}
+
+
+ ₹{deal.price}
+ Total Price
+
+
+ ))}
+
+
+ )}
+
+ {/* Reviews Section */}
+
+
+
+
+
+
+
+ Reviews
+
+
+ {reviewsData?.reviews.length || 0} Total
+
+
+
+ {reviewsData && reviewsData.reviews.length > 0 ? (
+ reviewsData.reviews.map((review, idx) => (
+
+
+
+
+ {review.userName}
+
+ {[1, 2, 3, 4, 5].map((star) => (
+
+ ))}
+
+
+
+ {review.reviewBody}
+
+ {review.signedImageUrls && review.signedImageUrls.length > 0 && (
+
+ {review.signedImageUrls.map((url, index) => (
+
+ ))}
+
+ )}
+
+ {/* Admin Response Section */}
+ {review.adminResponse ? (
+
+
+
+ Admin Response
+
+ {review.adminResponse}
+ {review.signedAdminImageUrls && review.signedAdminImageUrls.length > 0 && (
+
+ {review.signedAdminImageUrls.map((url, index) => (
+
+ ))}
+
+ )}
+
+ ) : (
+ {
+ setSelectedReview(review);
+ setResponseDialogOpen(true);
+ }}
+ style={tw`mt-2 self-end px-4 py-2 bg-white rounded-full border border-gray-200 shadow-sm flex-row items-center`}
+ >
+
+ Reply
+
+ )}
+
+
+
+ ))
+ ) : (
+
+
+ No reviews yet
+
+ )}
+
+
+
+
+
+
+ {/* Response Dialog */}
+ setResponseDialogOpen(false)}>
+
+
+ Reply to Review
+ setResponseDialogOpen(false)} style={tw`p-2 bg-gray-100 rounded-full`}>
+
+
+
+
+ {selectedReview && (
+
+
+
+
+ Replying to {selectedReview.userName}
+
+
+ {selectedReview.reviewBody}
+
+
+ {
+ setResponseDialogOpen(false);
+ setSelectedReview(null);
+ }}
+ />
+
+ )}
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/product-detail/_layout.tsx b/apps/admin-ui/app/(drawer)/product-detail/_layout.tsx
new file mode 100644
index 0000000..5056af2
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/product-detail/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/product-groupings/_layout.tsx b/apps/admin-ui/app/(drawer)/product-groupings/_layout.tsx
new file mode 100644
index 0000000..322a451
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/product-groupings/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/product-groupings/index.tsx b/apps/admin-ui/app/(drawer)/product-groupings/index.tsx
new file mode 100644
index 0000000..5ed34f9
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/product-groupings/index.tsx
@@ -0,0 +1,254 @@
+import React, { useState } from "react";
+import { View, ScrollView, TouchableOpacity, Alert } from "react-native";
+import {
+ theme,
+ AppContainer,
+ MyText,
+ tw,
+ useManualRefresh,
+ useMarkDataFetchers,
+ MyTouchableOpacity,
+ BottomDialog,
+} from "common-ui";
+import { trpc } from "../../../src/trpc-client";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { LinearGradient } from "expo-linear-gradient";
+import dayjs from "dayjs";
+import { useRouter } from "expo-router";
+
+interface ProductGroup {
+ id: number;
+ groupName: string;
+ description: string | null;
+ createdAt: string;
+ products: any[];
+ productCount: number;
+}
+
+const GroupItem = ({
+ group,
+ onEdit,
+ onDelete,
+ onViewProducts,
+ index,
+}: {
+ group: ProductGroup;
+ onEdit: (group: ProductGroup) => void;
+ onDelete: (id: number) => void;
+ onViewProducts: (products: any[]) => void;
+ index: number;
+}) => {
+ return (
+
+
+ {/* Top Header: Name & Actions */}
+
+
+
+
+
+
+
+ Group Name
+
+
+ {group.groupName}
+
+
+
+
+
+ onEdit(group)}
+ style={tw`p-2 mr-2`}
+ >
+
+
+ onDelete(group.id)}
+ style={tw`p-2`}
+ >
+
+
+
+
+
+ {/* Description */}
+ {group.description && (
+
+
+ {group.description}
+
+
+ )}
+
+ {/* Stats */}
+
+
+ onViewProducts(group.products)}
+ style={tw`flex-row items-center mr-4`}
+ >
+
+
+ {group.productCount} Products
+
+
+
+
+
+ {dayjs(group.createdAt).format("MMM DD, YYYY")}
+
+
+
+
+
+
+ );
+};
+
+export default function ProductGroupings() {
+ const router = useRouter();
+ const {
+ data: groupsData,
+ isLoading,
+ error,
+ refetch,
+ } = trpc.admin.product.getGroups.useQuery();
+ const deleteGroup = trpc.admin.product.deleteGroup.useMutation();
+
+ const groups = groupsData?.groups || [];
+ const [viewProducts, setViewProducts] = useState(null);
+
+ useManualRefresh(refetch);
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const handleCreate = () => {
+ router.push("/(drawer)/create-product-group");
+ };
+
+ const handleEdit = (group: ProductGroup) => {
+ router.push(`/(drawer)/edit-product-group/${group.id}`);
+ };
+
+ const handleDelete = (id: number) => {
+ Alert.alert("Delete Group", "Are you sure you want to delete this group?", [
+ { text: "Cancel", style: "cancel" },
+ {
+ text: "Delete",
+ style: "destructive",
+ onPress: () => {
+ deleteGroup.mutate(
+ { id },
+ {
+ onSuccess: () => {
+ refetch();
+ },
+ }
+ );
+ },
+ },
+ ]);
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading product groups...
+
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Error loading groups
+
+
+ );
+ }
+
+ return (
+
+
+ {groups.length === 0 ? (
+
+
+
+
+
+ No Groups Yet
+
+
+ Start by creating your first product group using the button below.
+
+
+ ) : (
+ groups.map((group, index) => (
+
+
+ {index < groups.length - 1 && (
+
+ )}
+
+ ))
+ )}
+
+ {/* Global Floating Action Button */}
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/admin-ui/app/(drawer)/product-tags/_layout.tsx b/apps/admin-ui/app/(drawer)/product-tags/_layout.tsx
new file mode 100644
index 0000000..d3b51c0
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/product-tags/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/product-tags/index.tsx b/apps/admin-ui/app/(drawer)/product-tags/index.tsx
new file mode 100644
index 0000000..01e060d
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/product-tags/index.tsx
@@ -0,0 +1,132 @@
+import React, { useState } from 'react';
+import { View, TouchableOpacity, Alert, RefreshControl } from 'react-native';
+import { Image } from 'expo-image';
+import { useRouter } from 'expo-router';
+import { MaterialIcons } from '@expo/vector-icons';
+import { tw, MyText, useManualRefresh, useMarkDataFetchers, MyFlatList } from 'common-ui';
+import { TagMenu } from '@/src/components/TagMenu';
+import { useGetTags, Tag } from '@/src/api-hooks/tag.api';
+
+interface TagItemProps {
+ item: Tag;
+ onDeleteSuccess: () => void;
+}
+
+const TagItem: React.FC = ({ item, onDeleteSuccess }) => (
+
+
+
+ {item.imageUrl && (
+
+ )}
+
+ {item.tagName}
+ {item.tagDescription && (
+ {item.tagDescription}
+ )}
+ {item.isDashboardTag && (
+
+
+ Dashboard Tag
+
+ )}
+
+
+
+
+
+);
+
+interface TagHeaderProps {
+ onAddNewTag: () => void;
+}
+
+const TagHeader: React.FC = ({ onAddNewTag }) => (
+
+ Product Tags
+
+
+ Add New Tag
+
+
+);
+
+export default function ProductTags() {
+ const router = useRouter();
+ const { data: tagsData, isLoading, error, refetch } = useGetTags();
+ const [refreshing, setRefreshing] = useState(false);
+
+ const tags = tagsData?.tags || [];
+
+ useManualRefresh(refetch);
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const handleRefresh = async () => {
+ setRefreshing(true);
+ await refetch();
+ setRefreshing(false);
+ };
+
+ const handleAddNewTag = () => {
+ router.push('/(drawer)/add-tag');
+ };
+
+
+
+ if (isLoading) {
+ return (
+
+ Loading tags...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Error
+ {error?.message || 'Failed to load tags'}
+ refetch()}
+ style={tw`mt-4 bg-blue-500 px-4 py-2 rounded-lg`}
+ >
+ Retry
+
+
+ );
+ }
+
+ return (
+
+ }
+ keyExtractor={(item) => item.id.toString()}
+ showsVerticalScrollIndicator={false}
+ refreshControl={
+
+ }
+ ListHeaderComponent={}
+ contentContainerStyle={tw`pb-4`}
+ ListEmptyComponent={
+
+
+ No tags yet
+ Create your first product tag
+
+ }
+ />
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/products/_layout.tsx b/apps/admin-ui/app/(drawer)/products/_layout.tsx
new file mode 100644
index 0000000..1e70cdf
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/products/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/products/index.tsx b/apps/admin-ui/app/(drawer)/products/index.tsx
new file mode 100644
index 0000000..9bcdbed
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/products/index.tsx
@@ -0,0 +1,271 @@
+import React, { useState, useMemo } from 'react';
+import { View, ScrollView, TouchableOpacity, Alert, RefreshControl } from 'react-native';
+import { Image } from 'expo-image';
+import { useRouter } from 'expo-router';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { AppContainer, MyText, tw, MyButton, useManualRefresh, MyTextInput, SearchBar, useMarkDataFetchers } from 'common-ui';
+
+import { trpc } from '@/src/trpc-client';
+import { Product } from '@/src/api-hooks/product.api';
+
+type FilterType = 'all' | 'in-stock' | 'out-of-stock';
+
+export default function Products() {
+ const router = useRouter();
+ const [searchTerm, setSearchTerm] = useState('');
+ const [activeFilter, setActiveFilter] = useState('all');
+ const [refreshing, setRefreshing] = useState(false);
+
+ const { data: productsData, isLoading, error, refetch } = trpc.admin.product.getProducts.useQuery();
+
+ const toggleOutOfStockMutation = trpc.admin.product.toggleOutOfStock.useMutation();
+
+ useManualRefresh(refetch);
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const products = productsData?.products || [];
+
+ const handleRefresh = async () => {
+ setRefreshing(true);
+ await refetch();
+ setRefreshing(false);
+ };
+
+ const filteredProducts = useMemo(() => {
+ return products.filter(product => {
+ const matchesSearch = product.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
+ (product.shortDescription?.toLowerCase().includes(searchTerm.toLowerCase()));
+
+ const matchesFilter = activeFilter === 'all' ||
+ (activeFilter === 'in-stock' && !product.isOutOfStock) ||
+ (activeFilter === 'out-of-stock' && product.isOutOfStock);
+
+ return matchesSearch && matchesFilter;
+ });
+ }, [products, searchTerm, activeFilter]);
+
+ const handleEdit = (productId: number) => {
+ router.push(`/edit-product?id=${productId}` as any);
+ };
+
+
+
+ // const handleToggleStock = (product: any) => {
+ const handleToggleStock = (product: Pick) => {
+ const action = product.isOutOfStock ? 'mark as in stock' : 'mark as out of stock';
+ Alert.alert(
+ 'Update Stock Status',
+ `Are you sure you want to ${action} "${product.name}"?`,
+ [
+ { text: 'Cancel', style: 'cancel' },
+ {
+ text: 'Confirm',
+ onPress: () => {
+ toggleOutOfStockMutation.mutate({ id: product.id }, {
+ onSuccess: (data) => {
+ Alert.alert('Success', data.message);
+ refetch(); // Refresh the list
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to update stock status');
+ },
+ });
+ },
+ },
+ ]
+ );
+ };
+
+ const handleViewDetails = (productId: number) => {
+ router.push(`/product-detail/${productId}` as any);
+ };
+
+ const FilterButton = ({ filter, label, count }: { filter: FilterType; label: string; count: number }) => (
+ setActiveFilter(filter)}
+ style={tw`px-4 py-2 rounded-lg ${activeFilter === filter ? 'bg-blue-500' : 'bg-gray-200'}`}
+ >
+
+ {label} ({count})
+
+
+ );
+
+ if (isLoading) {
+ return (
+
+
+ Loading products...
+
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Error loading products
+ refetch()}
+ style={tw`mt-4 bg-blue-500 px-4 py-2 rounded-lg`}
+ >
+ Retry
+
+
+
+ );
+ }
+
+ const inStockCount = products.filter(p => !p.isOutOfStock).length;
+ const outOfStockCount = products.filter(p => p.isOutOfStock).length;
+
+ return (
+
+
+ {/* Header */}
+
+ Products
+ router.push('/add-product' as any)}>
+ Add Product
+
+
+
+ {/* Search Bar */}
+
+ {}}
+ placeholder="Search products..."
+ containerStyle={tw`mb-0`}
+ />
+
+
+
+ {/* Filter Tabs */}
+
+
+
+
+
+
+ {/* Products List */}
+
+ }
+ >
+ {filteredProducts.length === 0 ? (
+
+
+
+ {searchTerm || activeFilter !== 'all' ? 'No products match your filters' : 'No products found'}
+
+
+ {searchTerm || activeFilter !== 'all' ? 'Try adjusting your search or filters' : 'Start by adding your first product'}
+
+ {(searchTerm || activeFilter !== 'all') && (
+ {
+ setSearchTerm('');
+ setActiveFilter('all');
+ }}
+ style={tw`mt-4 bg-blue-500 px-4 py-2 rounded-lg`}
+ >
+ Clear Filters
+
+ )}
+
+ ) : (
+
+ {filteredProducts.map(product => (
+
+ {/* Product Image */}
+ {product.images && product.images.length > 0 ? (
+
+ ) : (
+
+
+
+ )}
+
+ {/* Product Info */}
+
+
+
+ {product.name}
+
+
+
+
+ {product.isOutOfStock ? 'Out' : 'In'}
+
+
+
+
+ {product.shortDescription && (
+
+ {product.shortDescription}
+
+ )}
+
+
+
+
+ ₹{product.price}
+
+ {product.marketPrice && (
+
+ ₹{product.marketPrice}
+
+ )}
+
+
+
+ {/* Action Buttons */}
+
+ handleViewDetails(product.id)}
+ style={tw`flex-1 bg-gray-500 p-3 rounded-lg flex-row items-center justify-center`}
+ >
+
+ View
+
+
+ handleEdit(product.id)}
+ style={tw`flex-1 bg-blue-500 p-3 rounded-lg flex-row items-center justify-center`}
+ >
+
+ Edit
+
+
+ handleToggleStock(product)}
+ style={tw`flex-1 ${product.isOutOfStock ? 'bg-green-500' : 'bg-orange-500'} p-3 rounded-lg flex-row items-center justify-center`}
+ >
+
+
+ {product.isOutOfStock ? 'Stock' : 'Out'}
+
+
+
+
+
+ ))}
+
+ )}
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/rebalance-orders/_layout.tsx b/apps/admin-ui/app/(drawer)/rebalance-orders/_layout.tsx
new file mode 100644
index 0000000..83ba2bd
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/rebalance-orders/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from "expo-router";
+
+export default function RebalanceOrdersLayout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/rebalance-orders/index.tsx b/apps/admin-ui/app/(drawer)/rebalance-orders/index.tsx
new file mode 100644
index 0000000..223bf16
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/rebalance-orders/index.tsx
@@ -0,0 +1,239 @@
+import React, { useState } from 'react';
+import { View, TouchableOpacity, Alert, FlatList } from 'react-native';
+import { MaterialCommunityIcons } from '@expo/vector-icons';
+import { MyText, tw, MyTouchableOpacity, MyFlatList, BottomDialog } from 'common-ui';
+import { trpc } from '../../../src/trpc-client';
+import dayjs from 'dayjs';
+import { LinearGradient } from 'expo-linear-gradient';
+
+interface SlotItemProps {
+ item: any;
+ selectedSlots: number[];
+ toggleSlotSelection: (slotId: number) => void;
+ setDialogProducts: React.Dispatch>;
+ setDialogOpen: React.Dispatch>;
+}
+
+const SlotItemComponent: React.FC = ({
+ item: slot,
+ selectedSlots,
+ toggleSlotSelection,
+ setDialogProducts,
+ setDialogOpen,
+}) => {
+ const isSelected = selectedSlots.includes(slot.id);
+ const slotProducts = slot.products?.map((p: any) => p.name).filter(Boolean) || [];
+ const displayProducts = slotProducts.slice(0, 2).join(', ');
+ const isActive = slot.isActive;
+ const statusColor = isActive ? 'bg-green-100 text-green-700' : 'bg-red-100 text-red-700';
+ const statusText = isActive ? 'Active' : 'Inactive';
+
+ return (
+ toggleSlotSelection(slot.id)}
+ activeOpacity={0.7}
+ style={tw`bg-white p-5 mb-4 rounded-3xl shadow-sm border border-gray-100`}
+ >
+ {/* Header: Checkbox, ID and Status */}
+
+
+ toggleSlotSelection(slot.id)} style={tw`mr-3`}>
+
+
+
+
+
+
+ Slot #{slot.id}
+ ID: {slot.id}
+
+
+
+
+ {statusText}
+
+
+
+
+ {/* Divider */}
+
+
+ {/* Details Grid */}
+
+ {/* Delivery Time */}
+
+
+
+ Delivery
+
+
+ {dayjs(slot.deliveryTime).format('DD MMM, h:mm A')}
+
+
+
+ {/* Freeze Time */}
+
+
+
+ Freeze
+
+
+ {dayjs(slot.freezeTime).format('DD MMM, h:mm A')}
+
+
+
+
+ {/* Products */}
+ {slotProducts.length > 0 ? (
+
+
+
+
+ Products
+
+ {displayProducts}
+ {slotProducts.length > 2 && (
+ {
+ setDialogProducts(slotProducts);
+ setDialogOpen(true);
+ }}
+ >
+
+ +{slotProducts.length - 2} more
+
+
+ )}
+
+
+
+
+ ) : null}
+
+ );
+};
+
+export default function RebalanceOrders() {
+ const [selectedSlots, setSelectedSlots] = useState([]);
+ const [dialogOpen, setDialogOpen] = useState(false);
+ const [dialogProducts, setDialogProducts] = useState([]);
+ const [refreshing, setRefreshing] = useState(false);
+
+ const { data: slotsData, isLoading, refetch: refetchSlots } = trpc.admin.slots.getAll.useQuery();
+
+ const upcomingSlots = slotsData?.slots?.filter(slot => dayjs(slot.deliveryTime).isAfter(dayjs())) || [];
+
+ const handleRefresh = async () => {
+ setRefreshing(true);
+ await refetchSlots();
+ setRefreshing(false);
+ };
+
+ const { mutate: rebalanceSlots } = trpc.admin.order.rebalanceSlots.useMutation({
+ onSuccess: () => {
+ refetchSlots();
+ },
+ onSettled: () => {
+ Alert.alert("Rebalance Complete", "Slots have been rebalanced.");
+ }
+ });
+
+ const toggleSlotSelection = (slotId: number) => {
+ setSelectedSlots(prev =>
+ prev.includes(slotId)
+ ? prev.filter(id => id !== slotId)
+ : [...prev, slotId]
+ );
+ };
+
+ const handleRebalance = () => {
+ Alert.alert("Rebalancing...", "Please wait while we rebalance the selected slots.", [{ text: "OK" }]);
+ rebalanceSlots({ slotIds: selectedSlots });
+ };
+
+
+
+ if (isLoading) {
+ return (
+
+ Loading slots...
+
+ );
+ }
+
+ return (
+
+
+ Rebalance Upcoming Slots
+ {upcomingSlots.length === 0 ? (
+
+ No upcoming slots available for rebalancing.
+
+ ) : (
+ item.id.toString()}
+ renderItem={({ item }) => (
+
+ )}
+ contentContainerStyle={tw`pb-24 flex-1`} // Space for floating button
+ showsVerticalScrollIndicator={false}
+ onRefresh={handleRefresh}
+ refreshing={refreshing}
+ />
+ )}
+
+
+ {/* Floating Rebalance Button */}
+
+
+
+
+
+
+ {/* Products Dialog */}
+ setDialogOpen(false)}>
+
+ All Products
+ index.toString()}
+ renderItem={({ item }) => (
+
+ {item}
+
+ )}
+ showsVerticalScrollIndicator={false}
+ style={tw`max-h-80`}
+ />
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/slots/_layout.tsx b/apps/admin-ui/app/(drawer)/slots/_layout.tsx
new file mode 100644
index 0000000..3e880a2
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/slots/_layout.tsx
@@ -0,0 +1,10 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/slots/index.tsx b/apps/admin-ui/app/(drawer)/slots/index.tsx
new file mode 100644
index 0000000..139161c
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/slots/index.tsx
@@ -0,0 +1,202 @@
+import React, { useState } from 'react';
+import { MaterialCommunityIcons } from '@expo/vector-icons';
+import { View, TouchableOpacity, FlatList } from 'react-native';
+import { AppContainer, MyText, tw, MyFlatList , BottomDialog, MyTouchableOpacity } from 'common-ui';
+import { trpc } from '../../../src/trpc-client';
+import { useRouter } from 'expo-router';
+import dayjs from 'dayjs';
+import { LinearGradient } from 'expo-linear-gradient';
+
+interface SlotItemProps {
+ item: any;
+ router: any;
+ setDialogProducts: React.Dispatch>;
+ setDialogOpen: React.Dispatch>;
+}
+
+const SlotItemComponent: React.FC = ({
+ item: slot,
+ router,
+ setDialogProducts,
+ setDialogOpen,
+}) => {
+ const slotProducts = slot.products?.map((p: any) => p.name).filter(Boolean) || [];
+ const displayProducts = slotProducts.slice(0, 2).join(', ');
+
+ const isActive = slot.isActive;
+ const statusColor = isActive ? 'bg-green-100 text-green-700' : 'bg-red-100 text-red-700';
+ const statusText = isActive ? 'Active' : 'Inactive';
+
+ return (
+ router.push(`/(drawer)/slots/slot-details?slotId=${slot.id}`)}
+ activeOpacity={0.7}
+ >
+
+ {/* Header: ID and Status */}
+
+
+
+
+
+
+ Slot #{slot.id}
+ ID: {slot.id}
+
+
+
+ router.push(`/edit-slot/${slot.id}` as any)}
+ style={tw`px-3 py-1 rounded-full bg-pink2 mr-2`}
+ >
+
+
+ Edit
+
+
+
+ {statusText}
+
+
+
+
+ {/* Divider */}
+
+
+ {/* Details Grid */}
+
+ {/* Delivery Time */}
+
+
+
+ Delivery
+
+
+ {dayjs(slot.deliveryTime).format('DD MMM, h:mm A')}
+
+
+
+ {/* Freeze Time */}
+
+
+
+ Freeze
+
+
+ {dayjs(slot.freezeTime).format('DD MMM, h:mm A')}
+
+
+
+
+ {/* Products */}
+ {slotProducts.length > 0 ? (
+
+
+
+
+ Products
+
+ {displayProducts}
+ {slotProducts.length > 2 && (
+ {
+ setDialogProducts(slotProducts);
+ setDialogOpen(true);
+ }}
+ >
+
+ +{slotProducts.length - 2} more
+
+
+ )}
+
+
+
+
+ ) : null}
+
+
+ );
+};
+
+export default function Slots() {
+ const router = useRouter();
+ const { data: slotsData, isLoading, refetch } = trpc.admin.slots.getAll.useQuery();
+
+ const slots = slotsData?.slots || [];
+
+ // Dialog state
+ const [dialogOpen, setDialogOpen] = useState(false);
+ const [dialogProducts, setDialogProducts] = useState([]);
+ const [refreshing, setRefreshing] = useState(false);
+
+ const handleRefresh = async () => {
+ setRefreshing(true);
+ await refetch();
+ setRefreshing(false);
+ };
+
+
+
+ if (isLoading) {
+ return (
+
+ Loading slots...
+
+ );
+ }
+
+ return (
+
+ item.id.toString()}
+ renderItem={({ item }) => (
+
+ )}
+ contentContainerStyle={tw`p-4`}
+ onRefresh={handleRefresh}
+ refreshing={refreshing}
+ />
+
+ {/* FAB for Add New Slot */}
+ router.push('/add-slot' as any)}
+ activeOpacity={0.95}
+ style={{ position: 'absolute', bottom: 32, right: 24, zIndex: 100 }}
+ >
+
+
+
+
+
+ {/* Products Dialog */}
+ setDialogOpen(false)}>
+
+ All Products
+ index.toString()}
+ renderItem={({ item }) => (
+
+ {item}
+
+ )}
+ showsVerticalScrollIndicator={false}
+ style={tw`max-h-80`}
+ />
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/slots/slot-details.tsx b/apps/admin-ui/app/(drawer)/slots/slot-details.tsx
new file mode 100644
index 0000000..d780486
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/slots/slot-details.tsx
@@ -0,0 +1,245 @@
+import React, { useState } from 'react';
+import { View, ScrollView, TouchableOpacity, Alert, Share } from 'react-native';
+import { theme, AppContainer, MyText, tw, MyTouchableOpacity, BottomDialog } from 'common-ui';
+import { trpc } from '../../../src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import dayjs from "dayjs";
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import { LinearGradient } from 'expo-linear-gradient';
+
+export default function SlotDetails() {
+ const router = useRouter();
+ const { slotId } = useLocalSearchParams();
+
+ const { data: slotData, isLoading, error } = trpc.admin.slots.getSlotById.useQuery({
+ id: parseInt(slotId as string),
+ });
+
+ const slot = slotData?.slot;
+ const products = slot?.products || [];
+ const vendorSnippets = slot?.vendorSnippets || [];
+
+ // Dialog state for snippet products
+ const [dialogOpen, setDialogOpen] = useState(false);
+ const [dialogProducts, setDialogProducts] = useState([]);
+
+ if (isLoading) {
+ return (
+
+
+ Loading slot details...
+
+
+ );
+ }
+
+ if (error || !slot) {
+ return (
+
+
+ Error loading slot details
+
+
+ );
+ }
+
+ return (
+
+
+
+ {/* Header */}
+
+
+ Slot #{slot.id}
+
+
+
+
+ Delivery: {dayjs(slot.deliveryTime).format('MMM DD, YYYY hh:mm A')}
+
+
+ Freeze: {dayjs(slot.freezeTime).format('MMM DD, YYYY hh:mm A')}
+
+
+
+
+ {slot.isActive ? 'Active' : 'Inactive'}
+
+
+
+
+
+ {/* Vendor Snippets Section */}
+
+
+ Vendor Snippets
+
+ {vendorSnippets.length} snippets
+
+
+
+ {vendorSnippets.length === 0 ? (
+
+
+ No vendor snippets for this slot
+
+ ) : (
+
+ {vendorSnippets.map((snippet, index) => {
+ const isExpired = snippet.validTill && dayjs(snippet.validTill).isBefore(dayjs());
+
+ return (
+
+
+
+
+ {snippet.snippetCode}
+
+
+
+
+
+ {isExpired ? 'Expired' : 'Active'}
+
+
+
+
+
+
+
+ {
+ const snippetProducts = products.filter(p => snippet.productIds.includes(p.id));
+ setDialogProducts(snippetProducts);
+ setDialogOpen(true);
+ }}
+ style={tw`flex-row items-center mr-4`}
+ >
+
+
+ {snippet.productIds.length} products
+
+
+
+ {
+ try {
+ await Share.share({
+ message: snippet.accessUrl,
+ });
+ } catch (error) {
+ Alert.alert('Error', 'Failed to share link');
+ }
+ }}
+ style={tw`flex-row items-center`}
+ >
+
+
+ Share
+
+
+
+
+ {snippet.validTill && (
+
+
+
+ Expires {dayjs(snippet.validTill).format('MMM DD')}
+
+
+ )}
+
+
+ {snippet.createdAt && (
+
+
+ Created {dayjs(snippet.createdAt).format('MMM DD, YYYY')}
+
+
+ )}
+
+ );
+ })}
+
+ )}
+
+
+ {/* Products Section */}
+
+
+ Products
+
+ {products.length} items
+
+
+
+ {products.length === 0 ? (
+
+
+ No products in this slot
+
+ ) : (
+
+ {products.map((product) => (
+
+
+ {product.name}
+
+
+ ))}
+
+ )}
+
+
+
+ {/* FAB for Edit Slot */}
+ router.push(`/edit-slot/${slot.id}` as any)}
+ activeOpacity={0.95}
+ style={{ position: 'absolute', bottom: 32, right: 24, zIndex: 100 }}
+ >
+
+
+
+
+
+ setDialogOpen(false)}>
+
+ Snippet Products
+
+ {dialogProducts.length === 0 ? (
+
+
+ No products found for this snippet
+
+
+ ) : (
+ dialogProducts.map(product => (
+
+
+ {product.name}
+
+ {product.shortDescription && (
+
+ {product.shortDescription}
+
+ )}
+
+ ))
+ )}
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/stores/_layout.tsx b/apps/admin-ui/app/(drawer)/stores/_layout.tsx
new file mode 100644
index 0000000..4e26ba9
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/stores/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/stores/index.tsx b/apps/admin-ui/app/(drawer)/stores/index.tsx
new file mode 100644
index 0000000..e923171
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/stores/index.tsx
@@ -0,0 +1,224 @@
+import React, { useState } from 'react';
+import { View, TouchableOpacity, Dimensions, ActivityIndicator, RefreshControl, Alert } from 'react-native';
+import { Image } from 'expo-image';
+import { useRouter } from 'expo-router';
+import { MaterialIcons, Feather } from '@expo/vector-icons';
+import { MyText, tw, MyButton, useMarkDataFetchers } from 'common-ui';
+import MyFlatList from 'common-ui/src/components/flat-list';
+import { trpc } from '@/src/trpc-client';
+import { LinearGradient } from 'expo-linear-gradient';
+import Animated, { FadeInDown, FadeInUp } from 'react-native-reanimated';
+
+const { width: screenWidth } = Dimensions.get('window');
+
+interface StoreItemProps {
+ item: any;
+ index: number;
+ isEditMode: boolean;
+ onEdit: (storeId: number) => void;
+ onDelete: (storeId: number) => void;
+}
+
+const StoreItem: React.FC = ({ item, index, isEditMode, onEdit, onDelete }) => {
+ const CARD_MARGIN = 8;
+ const cardWidth = (screenWidth - 32 - CARD_MARGIN * 2) / 2;
+
+ return (
+
+
+ {/* Delete Button - Only visible in edit mode */}
+ {isEditMode && (
+ onDelete(item.id)}
+ style={tw`absolute top-2 right-2 z-10 bg-red-500 p-2 rounded-full shadow-lg`}
+ >
+
+
+ )}
+
+ onEdit(item.id)}
+ style={tw`flex-1`}
+ disabled={isEditMode} // Disable navigation in edit mode
+ >
+ {/* Image Section - Portrait oriented */}
+
+ {item.imageUrl ? (
+
+ ) : (
+
+
+
+ )}
+
+ {/* Status Dot */}
+
+
+
+ {/* Content Section */}
+
+
+ {item.name}
+
+
+
+ ID: #{item.id}
+
+
+ {item.createdAt ? new Date(item.createdAt).toLocaleDateString(undefined, { month: 'short', day: 'numeric' }) : 'N/A'}
+
+
+
+ {/* Action Footer */}
+
+ View Details
+
+
+
+
+
+
+ );
+};
+
+export default function Stores() {
+ const router = useRouter();
+ const [isEditMode, setIsEditMode] = useState(false);
+
+ const { data: storesData, isLoading, error, refetch } = trpc.admin.store.getStores.useQuery();
+ const { mutate: deleteStore, mutateAsync: deleteStoreAsync} = trpc.admin.store.deleteStore.useMutation();
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const stores = storesData?.stores || [];
+
+ const handleEdit = (storeId: number) => {
+ router.push({ pathname: '/edit-store', params: { id: storeId } });
+ };
+
+ const handleDelete = (storeId: number) => {
+ Alert.alert(
+ "Delete Store",
+ "Are you sure you want to delete this store? This action cannot be undone. All products will be unassigned from this store.",
+ [
+ { text: "Cancel", style: "cancel" },
+ {
+ text: "Delete",
+ style: "destructive",
+ onPress: async () => {
+ try {
+ await deleteStoreAsync({ storeId });
+ refetch();
+ Alert.alert("Success", "Store deleted successfully");
+ } catch (error: any) {
+ Alert.alert("Error", error.message || "Failed to delete store");
+ }
+ }
+ }
+ ]
+ );
+ };
+
+ const CARD_MARGIN = 8;
+ const cardWidth = (screenWidth - 32 - CARD_MARGIN * 2) / 2;
+
+
+
+ if (isLoading) {
+ return (
+
+
+ Loading stores...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+
+
+ Oops!
+ We couldn't load the stores. Please try again.
+ refetch()} style={tw`bg-red-500 px-8 py-3 rounded-xl`}>
+ Retry
+
+
+ );
+ }
+
+ return (
+
+ item.id.toString()}
+ renderItem={({ item, index }) => }
+ numColumns={2}
+ columnWrapperStyle={tw`justify-start`}
+ contentContainerStyle={tw`p-2 pb-24`}
+ refreshControl={}
+ ListHeaderComponent={
+
+
+
+ Stores
+ Manage your outlets
+
+
+ setIsEditMode(!isEditMode)}
+ style={tw`bg-white border border-gray-200 px-4 py-2 rounded-full shadow-sm mr-2`}
+ >
+
+ {isEditMode ? 'Done' : 'Edit'}
+
+
+
+ {stores.length} Locations
+
+
+
+
+ }
+ ListEmptyComponent={
+
+
+ No stores found
+ Get started by adding your first store location.
+
+ }
+ />
+
+ {/* Floating Action Button for Adding New Store */}
+
+ router.push('/add-store' as any)}
+ >
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/user-details/[id]/index.tsx b/apps/admin-ui/app/(drawer)/user-details/[id]/index.tsx
new file mode 100644
index 0000000..8d8d420
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/user-details/[id]/index.tsx
@@ -0,0 +1,158 @@
+import React from 'react';
+import { View, TouchableOpacity, Alert } from 'react-native';
+import { useLocalSearchParams, useRouter } from 'expo-router';
+import { AppContainer, MyText, tw } from 'common-ui';
+import { trpc } from '@/src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import dayjs from 'dayjs';
+
+export default function UserDetails() {
+ const { id } = useLocalSearchParams<{ id: string }>();
+ const router = useRouter();
+
+ const { data: userData, isLoading, error, refetch } = trpc.admin.staffUser.getUserDetails.useQuery(
+ { userId: id ? parseInt(id) : 0 },
+ { enabled: !!id }
+ );
+
+ const updateSuspensionMutation = trpc.admin.staffUser.updateUserSuspension.useMutation({
+ onSuccess: () => {
+ refetch();
+ Alert.alert('Success', 'User suspension status updated');
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to update suspension');
+ },
+ });
+
+ const handleToggleSuspension = () => {
+ if (!userData) return;
+ const newStatus = !userData.isSuspended;
+ updateSuspensionMutation.mutate({
+ userId: userData.id,
+ isSuspended: newStatus,
+ });
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading user details...
+
+
+ );
+ }
+
+ if (error || !userData) {
+ return (
+
+
+
+
+ Error
+
+
+ {error?.message || "Failed to load user details"}
+
+ router.back()}
+ style={tw`mt-6 bg-gray-900 px-6 py-3 rounded-xl`}
+ >
+ Go Back
+
+
+
+ );
+ }
+
+ const user = userData;
+
+ return (
+
+
+ {/* User Info */}
+
+
+
+
+
+
+
+ {user.name || 'n/a'}
+ User ID: {user.id}
+
+
+
+
+
+
+ {user.mobile}
+
+
+
+
+ {user.email}
+
+
+
+
+
+ Added on {dayjs(user.addedOn).format('MMM DD, YYYY')}
+
+
+
+
+
+
+ {user.lastOrdered
+ ? `Last ordered ${dayjs(user.lastOrdered).format('MMM DD, YYYY')}`
+ : 'No orders yet'
+ }
+
+
+
+
+
+ {/* Suspension Status */}
+
+
+
+
+
+
+ {user.isSuspended ? 'Suspended' : 'Active'}
+
+
+ {user.isSuspended ? 'User is suspended' : 'User is active'}
+
+
+
+
+
+ {updateSuspensionMutation.isPending
+ ? 'Updating...'
+ : user.isSuspended
+ ? 'Revoke Suspension'
+ : 'Suspend User'
+ }
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/users/index.tsx b/apps/admin-ui/app/(drawer)/users/index.tsx
new file mode 100644
index 0000000..b009f7a
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/users/index.tsx
@@ -0,0 +1,93 @@
+import React, { useState } from 'react';
+import { View, TouchableOpacity } from 'react-native';
+import { Image } from 'expo-image';
+import { useRouter } from 'expo-router';
+import { AppContainer, MyText, tw, MyFlatList, MyTextInput } from 'common-ui';
+import { trpc } from '@/src/trpc-client';
+import Ionicons from '@expo/vector-icons/Ionicons';
+
+interface UserItemProps {
+ item: any;
+ onPress: (userId: string) => void;
+}
+
+const UserItem: React.FC = ({ item, onPress }) => (
+ onPress(item.id)}
+ >
+ {item.image ? (
+
+ ) : (
+
+
+
+ )}
+
+ {item.name}
+ {item.email}
+ {item.mobile}
+
+
+);
+
+export default function Users() {
+ const router = useRouter();
+ const [search, setSearch] = useState('');
+
+ const {
+ data,
+ isLoading,
+ fetchNextPage,
+ hasNextPage,
+ refetch,
+ } = trpc.admin.staffUser.getUsers.useInfiniteQuery(
+ { search },
+ {
+ getNextPageParam: (lastPage) => lastPage.nextCursor,
+ }
+ );
+
+ const users = data?.pages.flatMap(page => page.users) || [];
+
+ const handleUserPress = (userId: string) => {
+ router.push(`/user-details/${userId}`);
+ };
+
+ return (
+
+
+
+
+
+
+ }
+ keyExtractor={(item) => item.id.toString()}
+ onRefresh={refetch}
+ onEndReached={() => {
+ if (hasNextPage) {
+ fetchNextPage();
+ }
+ }}
+ onEndReachedThreshold={0.5}
+ ListEmptyComponent={
+
+ No users found
+
+ }
+ />
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/vendor-snippets/_layout.tsx b/apps/admin-ui/app/(drawer)/vendor-snippets/_layout.tsx
new file mode 100644
index 0000000..578ff56
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/vendor-snippets/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router';
+
+export default function Layout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/vendor-snippets/index.tsx b/apps/admin-ui/app/(drawer)/vendor-snippets/index.tsx
new file mode 100644
index 0000000..cd7e94b
--- /dev/null
+++ b/apps/admin-ui/app/(drawer)/vendor-snippets/index.tsx
@@ -0,0 +1,307 @@
+import React, { useState } from 'react';
+import { View, ScrollView, TouchableOpacity, Alert, Dimensions, Share } from 'react-native';
+import { theme, AppContainer, MyText, tw, useManualRefresh, useMarkDataFetchers, MyTouchableOpacity } from 'common-ui';
+import { trpc, trpcClient } from '../../../src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { Ionicons } from "@expo/vector-icons";
+import dayjs from "dayjs";
+import { LinearGradient } from "expo-linear-gradient";
+import { useRouter } from 'expo-router';
+
+import VendorSnippetForm from '../../../components/VendorSnippetForm';
+import SnippetOrdersView from '../../../components/SnippetOrdersView';
+import { SnippetMenu } from '../../../components/SnippetMenu';
+
+interface VendorSnippet {
+ id: number;
+ snippetCode: string;
+ slotId: number;
+ productIds: number[];
+ validTill: string | null;
+ createdAt: string;
+ accessUrl: string;
+ slot?: {
+ id: number;
+ deliveryTime: string;
+ freezeTime: string;
+ isActive: boolean;
+ deliverySequence?: unknown;
+ };
+}
+
+const SnippetItem = ({
+ snippet,
+ onEdit,
+ onDelete,
+ onViewOrders,
+ index
+}: {
+ snippet: VendorSnippet;
+ onEdit: (snippet: VendorSnippet) => void;
+ onDelete: (id: number) => void;
+ onViewOrders: (snippetCode: string) => void;
+ index: number;
+}) => {
+ const isExpired = snippet.validTill && dayjs(snippet.validTill).isBefore(dayjs());
+
+ const handleCopyLink = async () => {
+ try {
+ await Share.share({
+ message: snippet.accessUrl,
+ });
+ } catch (error) {
+ Alert.alert('Error', 'Failed to share link');
+ }
+ };
+
+ return (
+
+
+ {/* Top Header: ID & Status */}
+
+
+
+
+
+
+
+ Identifier
+
+
+ {snippet.snippetCode}
+
+
+
+
+
+
+
+
+ {isExpired ? 'Expired' : 'Active'}
+
+
+
+
+
+
+ {/* Middle: Delivery Banner */}
+
+
+
+
+
+
+ {snippet.slot?.deliveryTime ? dayjs(snippet.slot.deliveryTime).format('ddd, MMM DD') : 'Schedule Pending'}
+
+
+ Time: {snippet.slot?.deliveryTime ? dayjs(snippet.slot.deliveryTime).format('hh:mm A') : 'N/A'}
+
+
+ {snippet.validTill && (
+
+ Expires
+
+ {dayjs(snippet.validTill).format('MMM DD')}
+
+
+ )}
+
+
+ {/* Stats & Actions */}
+
+
+
+
+ {snippet.productIds.length} Items
+
+
+
+ Share
+
+
+
+ router.push(`/(drawer)/slots/slot-details?slotId=${snippet.slotId}`)}
+ onPress={() => {}}
+ activeOpacity={0.7}
+ style={tw`flex-row items-center`}
+ >
+ View Slot
+
+
+
+
+
+ );
+};
+
+export default function VendorSnippets() {
+ // const { data: snippets, isLoading, error, refetch } = useVendorSnippets();
+ const { data: snippets, isLoading, error, refetch } = trpc.admin.vendorSnippets.getAll.useQuery();
+
+ const createSnippet = trpc.admin.vendorSnippets.create.useMutation();
+ const updateSnippet = trpc.admin.vendorSnippets.update.useMutation();
+ const deleteSnippet = trpc.admin.vendorSnippets.delete.useMutation();
+ // const createSnippet = useCreateVendorSnippet();
+ // const updateSnippet = useUpdateVendorSnippet();
+ // const deleteSnippet = useDeleteVendorSnippet();
+
+ const router = useRouter();
+
+ const [showCreateForm, setShowCreateForm] = useState(false);
+ const [editingSnippet, setEditingSnippet] = useState(null);
+ const [showOrdersView, setShowOrdersView] = useState(false);
+ const [ordersData, setOrdersData] = useState(null);
+
+
+ useManualRefresh(refetch);
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const handleCreate = () => {
+ setShowCreateForm(true);
+ setEditingSnippet(null);
+ };
+
+ const handleEdit = (snippet: VendorSnippet) => {
+ setEditingSnippet(snippet);
+ setShowCreateForm(true);
+ };
+
+ const handleDelete = (id: number) => {
+ deleteSnippet.mutate({ id }, {
+ onSuccess: () => {
+ refetch();
+ }
+ });
+ };
+
+ const handleViewOrders = async (snippetCode: string) => {
+ try {
+ const result = await trpcClient.admin.vendorSnippets.getOrdersBySnippet.query({ snippetCode });
+ if (result.success) {
+ setOrdersData({
+ orders: result.data,
+ snippetCode: snippetCode,
+ });
+ setShowOrdersView(true);
+ } else {
+ Alert.alert('Error', 'Failed to fetch orders');
+ }
+ } catch (error: any) {
+ Alert.alert('Error', error.message || 'Failed to fetch orders');
+ }
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading vendor snippets...
+
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Error loading snippets
+
+
+ );
+ }
+
+ if (showOrdersView && ordersData) {
+ return (
+ {
+ setShowOrdersView(false);
+ setOrdersData(null);
+ }}
+ />
+ );
+ }
+
+ if (showCreateForm) {
+ return (
+ {
+ setShowCreateForm(false);
+ setEditingSnippet(null);
+ }}
+ onSuccess={() => {
+ setShowCreateForm(false);
+ setEditingSnippet(null);
+ refetch();
+ }}
+ />
+ );
+ }
+
+ return (
+
+
+
+ {snippets && snippets.length === 0 ? (
+
+
+
+
+ No Snippets Yet
+
+ Start by creating your first vendor identifier using the button below.
+
+
+ ) : (
+ snippets?.map((snippet, index) => (
+
+
+ {index < snippets.length - 1 && (
+
+ )}
+
+ ))
+ )}
+
+
+ {/* Global Floating Action Button */}
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/_layout.tsx b/apps/admin-ui/app/_layout.tsx
new file mode 100644
index 0000000..4382da7
--- /dev/null
+++ b/apps/admin-ui/app/_layout.tsx
@@ -0,0 +1,23 @@
+import { QueryClientProvider } from "@tanstack/react-query";
+import queryClient from "../utils/queryClient";
+import { Stack } from "expo-router";
+import { StaffAuthProvider } from "@/components/context/staff-auth-context";
+import { trpc, trpcClient } from "@/src/trpc-client";
+import { SafeAreaView } from "react-native-safe-area-context";
+import { RefreshProvider } from '../../../packages/ui/src/lib/refresh-context';
+
+export default function Layout() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/admin-ui/app/index.tsx b/apps/admin-ui/app/index.tsx
new file mode 100644
index 0000000..01ac0aa
--- /dev/null
+++ b/apps/admin-ui/app/index.tsx
@@ -0,0 +1,27 @@
+import { Redirect } from 'expo-router';
+import { useStaffAuth } from '@/components/context/staff-auth-context';
+import { View, ActivityIndicator } from 'react-native';
+import { AppContainer } from 'common-ui';
+
+export default function Index() {
+ const { isLoggedIn, isLoading } = useStaffAuth() ;
+
+ // Show loading while checking auth
+ if (isLoading) {
+ return (
+
+
+
+
+
+ );
+ }
+
+ if(isLoggedIn){
+ return ;
+ }
+ else {
+ return ;
+ }
+
+}
\ No newline at end of file
diff --git a/apps/admin-ui/app/login.tsx b/apps/admin-ui/app/login.tsx
new file mode 100644
index 0000000..4e5e098
--- /dev/null
+++ b/apps/admin-ui/app/login.tsx
@@ -0,0 +1,91 @@
+import React, { useState } from "react";
+import { View, Alert } from "react-native";
+import { useRouter } from "expo-router";
+import MyTextInput from "common-ui/src/components/textinput";
+import MyButton from "common-ui/src/components/button";
+import AppContainer from "common-ui/src/components/app-container";
+import MyText from "common-ui/src/components/text";
+import { useStaffAuth } from "@/components/context/staff-auth-context";
+
+export default function LoginScreen() {
+ const [name, setName] = useState("");
+ const [password, setPassword] = useState("");
+ const { login, isLoggingIn, loginError } = useStaffAuth();
+ const router = useRouter();
+
+ const handleLogin = async () => {
+ if (!name.trim() || !password.trim()) {
+ Alert.alert("Error", "Please enter both name and password");
+ return;
+ }
+
+ try {
+ await login(name.trim(), password);
+ } catch (error) {
+ // Error is handled in the context
+ }
+ };
+
+ console.log('from the login page')
+
+
+ return (
+
+
+
+ Admin Login
+
+
+
+
+
+
+ {loginError && (
+
+ {loginError}
+
+ )}
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/assets/fonts/SpaceMono-Regular.ttf b/apps/admin-ui/assets/fonts/SpaceMono-Regular.ttf
new file mode 100755
index 0000000..28d7ff7
Binary files /dev/null and b/apps/admin-ui/assets/fonts/SpaceMono-Regular.ttf differ
diff --git a/apps/admin-ui/assets/images/adaptive-icon.png b/apps/admin-ui/assets/images/adaptive-icon.png
new file mode 100755
index 0000000..03d6f6b
Binary files /dev/null and b/apps/admin-ui/assets/images/adaptive-icon.png differ
diff --git a/apps/admin-ui/assets/images/farm2door-logo.png b/apps/admin-ui/assets/images/farm2door-logo.png
new file mode 100644
index 0000000..95f9b8b
Binary files /dev/null and b/apps/admin-ui/assets/images/farm2door-logo.png differ
diff --git a/apps/admin-ui/assets/images/favicon.png b/apps/admin-ui/assets/images/favicon.png
new file mode 100755
index 0000000..e75f697
Binary files /dev/null and b/apps/admin-ui/assets/images/favicon.png differ
diff --git a/apps/admin-ui/assets/images/icon.png b/apps/admin-ui/assets/images/icon.png
new file mode 100755
index 0000000..a0b1526
Binary files /dev/null and b/apps/admin-ui/assets/images/icon.png differ
diff --git a/apps/admin-ui/assets/images/partial-react-logo.png b/apps/admin-ui/assets/images/partial-react-logo.png
new file mode 100755
index 0000000..66fd957
Binary files /dev/null and b/apps/admin-ui/assets/images/partial-react-logo.png differ
diff --git a/apps/admin-ui/assets/images/react-logo.png b/apps/admin-ui/assets/images/react-logo.png
new file mode 100755
index 0000000..9d72a9f
Binary files /dev/null and b/apps/admin-ui/assets/images/react-logo.png differ
diff --git a/apps/admin-ui/assets/images/react-logo@2x.png b/apps/admin-ui/assets/images/react-logo@2x.png
new file mode 100755
index 0000000..2229b13
Binary files /dev/null and b/apps/admin-ui/assets/images/react-logo@2x.png differ
diff --git a/apps/admin-ui/assets/images/react-logo@3x.png b/apps/admin-ui/assets/images/react-logo@3x.png
new file mode 100755
index 0000000..a99b203
Binary files /dev/null and b/apps/admin-ui/assets/images/react-logo@3x.png differ
diff --git a/apps/admin-ui/assets/images/splash-icon.png b/apps/admin-ui/assets/images/splash-icon.png
new file mode 100755
index 0000000..03d6f6b
Binary files /dev/null and b/apps/admin-ui/assets/images/splash-icon.png differ
diff --git a/apps/admin-ui/assets/images/symbuyoteadmin.png b/apps/admin-ui/assets/images/symbuyoteadmin.png
new file mode 100644
index 0000000..a6c3c99
Binary files /dev/null and b/apps/admin-ui/assets/images/symbuyoteadmin.png differ
diff --git a/apps/admin-ui/components/AddressPlaceForm.tsx b/apps/admin-ui/components/AddressPlaceForm.tsx
new file mode 100644
index 0000000..89ea40f
--- /dev/null
+++ b/apps/admin-ui/components/AddressPlaceForm.tsx
@@ -0,0 +1,64 @@
+import React from 'react'
+import { Formik } from 'formik'
+import * as Yup from 'yup'
+import { View, Text, TouchableOpacity } from 'react-native'
+import { MyTextInput, BottomDropdown, tw } from 'common-ui'
+import { trpc } from '@/src/trpc-client'
+
+interface AddressPlaceFormProps {
+ onSubmit: (values: { placeName: string; zoneId: number | null }) => void
+ onClose: () => void
+}
+
+const AddressPlaceForm: React.FC = ({ onSubmit, onClose }) => {
+ const { data: zones } = trpc.admin.address.getZones.useQuery()
+
+ const validationSchema = Yup.object({
+ placeName: Yup.string().required('Place name is required'),
+ zoneId: Yup.number().optional(),
+ })
+
+ const zoneOptions = zones?.map(z => ({ label: z.zoneName, value: z.id })) || []
+
+ return (
+
+ Add Place
+ {
+ onSubmit(values)
+ onClose()
+ }}
+ >
+ {({ handleChange, setFieldValue, handleSubmit, values, errors, touched }) => (
+
+
+ setFieldValue('zoneId', value as number | undefined)}
+ placeholder="Select Zone"
+ />
+
+
+ Cancel
+
+ handleSubmit()}>
+ Create
+
+
+
+ )}
+
+
+ )
+}
+
+export default AddressPlaceForm
\ No newline at end of file
diff --git a/apps/admin-ui/components/AddressZoneForm.tsx b/apps/admin-ui/components/AddressZoneForm.tsx
new file mode 100644
index 0000000..db00ecd
--- /dev/null
+++ b/apps/admin-ui/components/AddressZoneForm.tsx
@@ -0,0 +1,51 @@
+import React from 'react'
+import { Formik } from 'formik'
+import * as Yup from 'yup'
+import { View, Text, TouchableOpacity } from 'react-native'
+import { MyTextInput, tw } from 'common-ui'
+
+interface AddressZoneFormProps {
+ onSubmit: (values: { zoneName: string }) => void
+ onClose: () => void
+}
+
+const AddressZoneForm: React.FC = ({ onSubmit, onClose }) => {
+ const validationSchema = Yup.object({
+ zoneName: Yup.string().required('Zone name is required'),
+ })
+
+ return (
+
+ Add Zone
+ {
+ onSubmit(values)
+ onClose()
+ }}
+ >
+ {({ handleChange, handleSubmit, values, errors, touched }) => (
+
+
+
+
+ Cancel
+
+ handleSubmit()}>
+ Create
+
+
+
+ )}
+
+
+ )
+}
+
+export default AddressZoneForm
\ No newline at end of file
diff --git a/apps/admin-ui/components/BannerForm.tsx b/apps/admin-ui/components/BannerForm.tsx
new file mode 100644
index 0000000..a95f4bd
--- /dev/null
+++ b/apps/admin-ui/components/BannerForm.tsx
@@ -0,0 +1,262 @@
+import React, { useState } from 'react';
+import { View, ScrollView, TouchableOpacity, Alert } from 'react-native';
+import { Formik, FormikHelpers } from 'formik';
+import * as Yup from 'yup';
+import { MyText, tw, MyTextInput, MyTouchableOpacity, ImageUploader, BottomDropdown } from 'common-ui';
+import { DropdownOption } from 'common-ui/src/components/bottom-dropdown';
+import { trpc } from '../src/trpc-client';
+import usePickImage from 'common-ui/src/components/use-pick-image';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+
+export interface BannerFormData {
+ name: string;
+ imageUrl: string;
+ description: string;
+ productIds: number[];
+ redirectUrl: string;
+ // serialNum removed - will be assigned automatically by backend
+}
+
+interface BannerFormProps {
+ initialValues: BannerFormData;
+ onSubmit: (values: BannerFormData, imageUrl?: string) => Promise | void;
+ onCancel: () => void;
+ submitButtonText?: string;
+ isSubmitting?: boolean;
+ existingImageUrl?: string;
+ mode?: 'create' | 'edit';
+}
+
+const validationSchema = Yup.object().shape({
+ name: Yup.string().trim().required('Banner name is required').max(255),
+ description: Yup.string().max(500),
+ productIds: Yup.array()
+ .of(Yup.number())
+ .optional(),
+ redirectUrl: Yup.string()
+ .url('Please enter a valid URL')
+ .optional(),
+ // serialNum validation removed - assigned automatically by backend
+});
+
+export default function BannerForm({
+ initialValues,
+ onSubmit,
+ onCancel,
+ submitButtonText = 'Create Banner',
+ isSubmitting = false,
+ existingImageUrl,
+ mode = 'create',
+}: BannerFormProps) {
+ const [selectedImages, setSelectedImages] = useState<{ blob: Blob; mimeType: string }[]>([]);
+ const [displayImages, setDisplayImages] = useState<{ uri?: string }[]>([]);
+
+ const generateUploadUrls = trpc.common.generateUploadUrls.useMutation();
+
+ // Fetch products for dropdown
+ const { data: productsData } = trpc.common.product.getAllProductsSummary.useQuery({});
+ const products = productsData?.products || [];
+
+ // Create product options for dropdown
+ const productOptions: DropdownOption[] = products.map(product => ({
+ label: `${product.name} (${product.price})`,
+ value: product.id,
+ }));
+
+
+ const handleImagePick = usePickImage({
+ setFile: async (assets: any) => {
+ if (!assets || (Array.isArray(assets) && assets.length === 0)) {
+ setSelectedImages([]);
+ setDisplayImages([]);
+ return;
+ }
+
+ const files = Array.isArray(assets) ? assets : [assets];
+ const blobPromises = files.map(async (asset) => {
+ const response = await fetch(asset.uri);
+ const blob = await response.blob();
+ return { blob, mimeType: asset.mimeType || 'image/jpeg' };
+ });
+
+ const blobArray = await Promise.all(blobPromises);
+ setSelectedImages(blobArray);
+ setDisplayImages(files.map(asset => ({ uri: asset.uri })));
+ },
+ multiple: false, // Single image for banners
+ });
+
+ const handleRemoveImage = (uri: string) => {
+ const index = displayImages.findIndex(img => img.uri === uri);
+ if (index !== -1) {
+ const newDisplay = displayImages.filter((_, i) => i !== index);
+ const newFiles = selectedImages.filter((_, i) => i !== index);
+ setDisplayImages(newDisplay);
+ setSelectedImages(newFiles);
+ }
+ };
+ const handleFormikSubmit = async (values: BannerFormData) => {
+ try {
+ let imageUrl: string | undefined;
+
+ if (selectedImages.length > 0) {
+ // Generate upload URLs
+ const mimeTypes = selectedImages.map(s => s.mimeType);
+ const { uploadUrls } = await generateUploadUrls.mutateAsync({
+ contextString: 'store', // Using 'store' for now
+ mimeTypes,
+ });
+
+ // Upload image
+ const uploadUrl = uploadUrls[0];
+ const { blob, mimeType } = selectedImages[0];
+
+ const uploadResponse = await fetch(uploadUrl, {
+ method: 'PUT',
+ body: blob,
+ headers: {
+ 'Content-Type': mimeType,
+ },
+ });
+
+ if (!uploadResponse.ok) {
+ throw new Error(`Upload failed with status ${uploadResponse.status}`);
+ }
+
+ imageUrl = uploadUrl;
+ }
+
+ // Call onSubmit with form values and imageUrl
+ await onSubmit(values, imageUrl);
+ } catch (error) {
+ console.error('Upload error:', error);
+ Alert.alert('Error', 'Failed to upload image');
+ }
+ };
+
+ return (
+
+ {({
+ handleChange,
+ handleBlur,
+ handleSubmit,
+ values,
+ errors,
+ touched,
+ isValid,
+ dirty,
+ setFieldValue,
+ }) => (
+
+
+
+ {errors.name && touched.name && (
+ {errors.name}
+ )}
+
+
+ Banner Image
+ {
+ // Handle removing existing image in edit mode
+ }}
+ allowMultiple={false}
+ />
+
+
+
+ {errors.description && touched.description && (
+ {errors.description}
+ )}
+
+
+ {
+ const selectedValues = Array.isArray(value) ? value : [value];
+ setFieldValue('productIds', selectedValues.map(v => Number(v)));
+ }}
+ placeholder="Select products for banner (optional)"
+ multiple={true}
+ />
+
+
+
+ {errors.redirectUrl && touched.redirectUrl && (
+ {errors.redirectUrl}
+ )}
+
+
+
+ {/* Action Buttons */}
+
+
+ Cancel
+
+
+ handleSubmit()}
+ disabled={isSubmitting || !isValid || !dirty}
+ style={tw`flex-1 rounded-lg py-4 items-center ${
+ isSubmitting || !isValid || !dirty
+ ? 'bg-blue-400'
+ : 'bg-blue-600'
+ }`}
+ >
+
+ {isSubmitting ? 'Saving...' : submitButtonText}
+
+
+
+
+
+ )}
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/components/CancelOrderDialog.tsx b/apps/admin-ui/components/CancelOrderDialog.tsx
new file mode 100644
index 0000000..c9805fe
--- /dev/null
+++ b/apps/admin-ui/components/CancelOrderDialog.tsx
@@ -0,0 +1,97 @@
+import React, { useState } from 'react';
+import { View, TouchableOpacity } from 'react-native';
+import { MyText, tw, BottomDialog, MyTextInput } from 'common-ui';
+import { trpc } from '@/src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { Alert } from 'react-native';
+
+interface CancelOrderDialogProps {
+ orderId: number;
+ open: boolean;
+ onClose: () => void;
+ onSuccess?: () => void;
+}
+
+export default function CancelOrderDialog({ orderId, open, onClose, onSuccess }: CancelOrderDialogProps) {
+ const [cancelReason, setCancelReason] = useState('');
+ const cancelOrderMutation = trpc.admin.order.cancelOrder.useMutation();
+
+ const handleCancel = () => {
+ if (!cancelReason.trim()) {
+ Alert.alert('Error', 'Please enter a cancellation reason');
+ return;
+ }
+
+ Alert.alert(
+ 'Cancel Order',
+ 'Are you sure you want to cancel this order? This action cannot be undone.',
+ [
+ { text: 'No', style: 'cancel' },
+ {
+ text: 'Yes, Cancel',
+ style: 'destructive',
+ onPress: () => {
+ cancelOrderMutation.mutate(
+ { orderId, reason: cancelReason },
+ {
+ onSuccess: () => {
+ onClose();
+ setCancelReason('');
+ onSuccess?.();
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to cancel order');
+ },
+ }
+ );
+ },
+ },
+ ]
+ );
+ };
+
+ return (
+
+
+
+
+
+
+
+ Cancel Order
+
+
+ This will cancel the order and mark it as cancelled by admin. A refund record will be created.
+
+
+
+
+
+
+
+ Keep Order
+
+
+
+ {cancelOrderMutation.isPending ? 'Cancelling...' : 'Cancel Order'}
+
+
+
+
+
+ );
+}
diff --git a/apps/admin-ui/components/FullOrderView.tsx b/apps/admin-ui/components/FullOrderView.tsx
new file mode 100644
index 0000000..0671492
--- /dev/null
+++ b/apps/admin-ui/components/FullOrderView.tsx
@@ -0,0 +1,197 @@
+import React from 'react';
+import { View, ScrollView, Dimensions } from 'react-native';
+import { Image } from 'expo-image';
+import { MyText, tw } from 'common-ui';
+import { trpc } from '../src/trpc-client';
+
+interface FullOrderViewProps {
+ orderId: number;
+}
+
+export const FullOrderView: React.FC = ({ orderId }) => {
+ const { data: order, isLoading, error } = trpc.admin.order.getFullOrder.useQuery({ orderId });
+
+ if (isLoading) {
+ return (
+
+ Loading order details...
+
+ );
+ }
+
+ if (error || !order) {
+ return (
+
+ Failed to load order details
+
+ );
+ }
+
+ const totalAmount = order.items.reduce((sum, item) => sum + item.amount, 0);
+
+ return (
+
+
+ Order #{order.readableId}
+
+ {/* Customer Information */}
+
+ Customer Details
+
+
+ Name:
+ {order.customerName}
+
+ {order.customerEmail && (
+
+ Email:
+ {order.customerEmail}
+
+ )}
+
+ Mobile:
+ {order.customerMobile}
+
+
+
+
+ {/* Delivery Address */}
+
+ Delivery Address
+
+ {order.address.line1}
+ {order.address.line2 && {order.address.line2}}
+
+ {order.address.city}, {order.address.state} - {order.address.pincode}
+
+ Phone: {order.address.phone}
+
+
+
+ {/* Order Details */}
+
+ Order Details
+
+
+ Order Date:
+
+ {new Date(order.createdAt).toLocaleDateString('en-IN', {
+ day: 'numeric',
+ month: 'short',
+ year: 'numeric',
+ hour: '2-digit',
+ minute: '2-digit'
+ })}
+
+
+
+ Payment Method:
+
+ {order.isCod ? 'Cash on Delivery' : 'Online Payment'}
+
+
+ {order.slotInfo && (
+
+ Delivery Slot:
+
+ {new Date(order.slotInfo.time).toLocaleDateString('en-IN', {
+ day: 'numeric',
+ month: 'short',
+ hour: '2-digit',
+ minute: '2-digit'
+ })}
+
+
+ )}
+
+
+
+ {/* Items */}
+
+ Items ({order.items.length})
+ {order.items.map((item, index) => (
+
+
+
+ {item.productName}
+
+
+ Qty: {item.quantity} {item.unit} × ₹{parseFloat(item.price.toString()).toFixed(2)}
+
+
+ ₹{item.amount.toFixed(2)}
+
+ ))}
+
+
+ {/* Payment Information */}
+ {(order.payment || order.paymentInfo) && (
+
+ Payment Information
+ {order.payment && (
+
+ Payment Details:
+
+ Status:
+ {order.payment.status}
+
+
+ Gateway:
+ {order.payment.gateway}
+
+
+ Order ID:
+ {order.payment.merchantOrderId}
+
+
+ )}
+ {order.paymentInfo && (
+
+ Payment Info:
+
+ Status:
+ {order.paymentInfo.status}
+
+
+ Gateway:
+ {order.paymentInfo.gateway}
+
+
+ Order ID:
+ {order.paymentInfo.merchantOrderId}
+
+
+ )}
+
+ )}
+
+ {/* User Notes */}
+ {order.userNotes && (
+
+ Customer Notes
+ {order.userNotes}
+
+ )}
+
+ {/* Admin Notes */}
+ {order.adminNotes && (
+
+ Admin Notes
+ {order.adminNotes}
+
+ )}
+
+ {/* Total */}
+
+
+ Total Amount
+ ₹{parseFloat(order.totalAmount.toString()).toFixed(2)}
+
+
+
+
+ );
+};
\ No newline at end of file
diff --git a/apps/admin-ui/components/HorizontalImageScroller.tsx b/apps/admin-ui/components/HorizontalImageScroller.tsx
new file mode 100755
index 0000000..b7afad8
--- /dev/null
+++ b/apps/admin-ui/components/HorizontalImageScroller.tsx
@@ -0,0 +1,45 @@
+import React from "react";
+import { ScrollView, View, StyleSheet } from "react-native";
+import { ImageViewerURI } from "common-ui";
+
+interface HorizontalImageScrollerProps {
+ urls: string[];
+ imageHeight?: number;
+ imageWidth?: number;
+}
+
+const HorizontalImageScroller: React.FC = ({
+ urls,
+ imageHeight = 128,
+ imageWidth = 128,
+}) => {
+ if (!urls || urls.length === 0) return null;
+
+
+ return (
+
+
+ {urls.map((url, idx) => (
+
+
+
+ ))}
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ marginVertical: 8,
+ },
+});
+
+export default HorizontalImageScroller;
diff --git a/apps/admin-ui/components/OrderNotesForm.tsx b/apps/admin-ui/components/OrderNotesForm.tsx
new file mode 100644
index 0000000..4315e70
--- /dev/null
+++ b/apps/admin-ui/components/OrderNotesForm.tsx
@@ -0,0 +1,80 @@
+import React, { useState } from 'react';
+import { View, TextInput, TouchableOpacity, Alert } from 'react-native';
+import { MyText, MyButton } from 'common-ui';
+import { trpc } from '../src/trpc-client';
+
+interface OrderNotesFormProps {
+ orderId: number;
+ initialNotes?: string;
+ onSuccess?: () => void;
+ onCancel?: () => void;
+}
+
+export const OrderNotesForm: React.FC = ({
+ orderId,
+ initialNotes = '',
+ onSuccess,
+ onCancel,
+}) => {
+ const [notes, setNotes] = useState(initialNotes);
+ const updateNotesMutation = trpc.admin.order.updateNotes.useMutation();
+
+ const handleSubmit = async () => {
+ if (!notes.trim()) {
+ Alert.alert('Error', 'Please enter some notes');
+ return;
+ }
+
+ try {
+ await updateNotesMutation.mutateAsync({
+ orderId,
+ adminNotes: notes.trim(),
+ });
+ Alert.alert('Success', 'Notes updated successfully');
+ onSuccess?.();
+ } catch (error) {
+ Alert.alert('Error', 'Failed to update notes');
+ }
+ };
+
+ return (
+
+
+ Add Order Notes
+
+
+
+
+
+
+
+
+
+ );
+};
\ No newline at end of file
diff --git a/apps/admin-ui/components/ProductGroupForm.tsx b/apps/admin-ui/components/ProductGroupForm.tsx
new file mode 100644
index 0000000..5bc2fe7
--- /dev/null
+++ b/apps/admin-ui/components/ProductGroupForm.tsx
@@ -0,0 +1,151 @@
+import React from 'react';
+import { View, TouchableOpacity, Alert, ScrollView } from 'react-native';
+import { useFormik } from 'formik';
+import { MyText, tw, MyTextInput, MyTouchableOpacity, theme, BottomDropdown } from 'common-ui';
+import { trpc } from '../src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+
+interface ProductGroup {
+ id: number;
+ groupName: string;
+ description: string | null;
+ createdAt: string;
+ products: any[];
+ productCount: number;
+}
+
+interface ProductGroupFormProps {
+ group?: ProductGroup | null;
+ onClose: () => void;
+ onSuccess: () => void;
+}
+
+const ProductGroupForm: React.FC = ({
+ group,
+ onClose,
+ onSuccess,
+}) => {
+ // Fetch products
+ const { data: productsData } = trpc.common.product.getAllProductsSummary.useQuery({});
+
+ const createGroup = trpc.admin.product.createGroup.useMutation();
+ const updateGroup = trpc.admin.product.updateGroup.useMutation();
+
+ const isEditing = !!group;
+
+ const products = productsData?.products || [];
+
+ const productOptions = products.map(product => ({
+ label: `${product.name}${product.shortDescription ? ` - ${product.shortDescription}` : ''}`,
+ value: product.id,
+ }));
+
+ const formik = useFormik({
+ initialValues: {
+ group_name: group?.groupName || '',
+ description: group?.description || '',
+ product_ids: group?.products?.map(p => p.id) || [],
+ },
+ validate: (values) => {
+ const errors: {[key: string]: string} = {};
+
+ if (!values.group_name.trim()) {
+ errors.group_name = 'Group name is required';
+ }
+
+ return errors;
+ },
+ onSubmit: async (values) => {
+ try {
+ if (isEditing) {
+ await updateGroup.mutateAsync({
+ id: group.id,
+ group_name: values.group_name,
+ description: values.description,
+ product_ids: values.product_ids,
+ });
+ } else {
+ await createGroup.mutateAsync({
+ group_name: values.group_name,
+ description: values.description,
+ product_ids: values.product_ids,
+ });
+ }
+ onSuccess();
+ } catch (error: any) {
+ Alert.alert('Error', error.message || 'Failed to save group');
+ }
+ },
+ });
+
+ return (
+
+ {/* Header */}
+
+
+ {isEditing ? 'Edit Product Group' : 'Create Product Group'}
+
+
+
+
+
+
+
+ {/* Group Name */}
+ formik.setFieldValue('group_name', text)}
+ style={{ marginBottom: 16 }}
+ />
+ {formik.errors.group_name && (
+ {formik.errors.group_name}
+ )}
+
+ {/* Description */}
+ formik.setFieldValue('description', text)}
+ style={{ marginBottom: 16 }}
+ />
+
+ {/* Products Selection */}
+ formik.setFieldValue('product_ids', value as number[])}
+ multiple={true}
+ placeholder="Select products"
+ style={{ marginBottom: 16 }}
+ />
+
+ {/* Actions */}
+
+
+ Cancel
+
+ formik.handleSubmit()}
+ disabled={createGroup.isPending || updateGroup.isPending}
+ style={tw`flex-1 bg-brand600 rounded-lg py-4 items-center`}
+ >
+
+ {createGroup.isPending || updateGroup.isPending ? 'Saving...' : 'Save'}
+
+
+
+
+
+ );
+};
+
+export default ProductGroupForm;
\ No newline at end of file
diff --git a/apps/admin-ui/components/SlotForm.tsx b/apps/admin-ui/components/SlotForm.tsx
new file mode 100644
index 0000000..9894084
--- /dev/null
+++ b/apps/admin-ui/components/SlotForm.tsx
@@ -0,0 +1,285 @@
+import React, { useState, useEffect, useMemo } from 'react';
+import { View, Text, TouchableOpacity, Alert } from 'react-native';
+import { Formik, FieldArray } from 'formik';
+import DateTimePickerMod from 'common-ui/src/components/date-time-picker';
+import { tw, MyTextInput } from 'common-ui';
+import { trpc } from '../src/trpc-client';
+import BottomDropdown, { DropdownOption } from 'common-ui/src/components/bottom-dropdown';
+
+interface VendorSnippet {
+ name: string;
+ groupIds: number[];
+ productIds: number[];
+ validTill?: string;
+}
+
+interface SlotFormProps {
+ onSlotAdded?: () => void;
+ initialDeliveryTime?: Date | null;
+ initialFreezeTime?: Date | null;
+ initialIsActive?: boolean;
+ slotId?: number;
+ initialProductIds?: number[];
+}
+
+export default function SlotForm({
+ onSlotAdded,
+ initialDeliveryTime,
+ initialFreezeTime,
+ initialIsActive = true,
+ slotId,
+ initialProductIds = [],
+}: SlotFormProps) {
+ const initialValues = {
+ deliveryTime: initialDeliveryTime || null,
+ freezeTime: initialFreezeTime || null,
+ selectedGroupIds: [] as number[],
+ selectedProductIds: initialProductIds,
+ vendorSnippetList: [] as VendorSnippet[],
+ };
+
+ const { mutate: createSlot, isPending: isCreating } = trpc.admin.slots.createSlot.useMutation();
+ const { mutate: updateSlot, isPending: isUpdating } = trpc.admin.slots.updateSlot.useMutation();
+
+ const isEditMode = !!slotId;
+ const isPending = isCreating || isUpdating;
+
+ // Fetch products and groups
+ const { data: productsData } = trpc.common.product.getAllProductsSummary.useQuery({});
+ const { data: groupsData } = trpc.admin.product.getGroups.useQuery();
+ const products = productsData?.products || [];
+
+
+
+
+
+
+
+ const handleFormSubmit = (values: typeof initialValues) => {
+ if (!values.deliveryTime || !values.freezeTime) {
+ Alert.alert('Error', 'Please fill all fields');
+ return;
+ }
+
+ const slotData = {
+ deliveryTime: values.deliveryTime.toISOString(),
+ freezeTime: values.freezeTime.toISOString(),
+ isActive: initialIsActive,
+ productIds: values.selectedProductIds,
+ vendorSnippets: values.vendorSnippetList.map(snippet => ({
+ name: snippet.name,
+ productIds: snippet.productIds,
+ validTill: snippet.validTill,
+ })),
+ };
+
+ console.log({snippetList: values.vendorSnippetList})
+
+ values.vendorSnippetList.forEach((snippet, index) => {
+ console.log({snippet})
+
+ });
+
+
+ if (isEditMode && slotId) {
+ updateSlot(
+ { id: slotId, ...slotData },
+ {
+ onSuccess: () => {
+ Alert.alert('Success', 'Slot updated successfully!');
+ onSlotAdded?.();
+ },
+ onError: (error: any) => {
+ console.log({msg: JSON.stringify(error.message)})
+
+ Alert.alert('Error', error.message || 'Failed to update slot');
+ },
+ }
+ );
+ } else {
+ createSlot(
+ slotData,
+ {
+ onSuccess: () => {
+ Alert.alert('Success', 'Slot created successfully!');
+ // Reset form
+ // Formik will handle reset
+ onSlotAdded?.();
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to create slot');
+ },
+ }
+ );
+ }
+ };
+
+ return (
+
+ {({ handleSubmit, values, setFieldValue }) => {
+ // Collect all product IDs from selected groups
+ const allGroupProductIds = (values?.selectedGroupIds || []).flatMap(groupId => {
+ const group = (groupsData?.groups || []).find(g => g.id === groupId);
+ return group?.products.map(p => p.id) || [];
+ });
+ // Remove duplicates
+ const groupProductIds = [...new Set(allGroupProductIds)];
+
+ const productOptions: DropdownOption[] = products.map(product => ({
+ label: `${product.name}${groupProductIds.includes(product.id) ? ' (from group)' : ''}`,
+ value: product.id.toString(),
+ disabled: groupProductIds.includes(product.id),
+ }));
+
+ const groupOptions: DropdownOption[] = (groupsData?.groups || []).map(group => ({
+ label: group.groupName,
+ value: group.id.toString(),
+ }));
+
+ return (
+
+
+ {isEditMode ? 'Edit Slot' : 'Create New Slot'}
+
+
+
+ Delivery Date & Time
+ setFieldValue('deliveryTime', value)} />
+
+
+
+ Freeze Date & Time
+ setFieldValue('freezeTime', value)} />
+
+
+
+ Select Product Groups (Optional)
+ id.toString())}
+ onValueChange={(value) => {
+ const selectedValues = Array.isArray(value) ? value : typeof value === 'string' ? [value] : [];
+ const groupIds = selectedValues.map(v => parseInt(v as string));
+ setFieldValue('selectedGroupIds', groupIds);
+
+ // Collect all products from selected groups
+ const allGroupProducts = groupIds.flatMap(groupId => {
+ const group = (groupsData?.groups || []).find(g => g.id === groupId);
+ return group?.products.map(p => p.id) || [];
+ });
+ // Remove duplicates
+ const uniqueProducts = [...new Set(allGroupProducts)];
+ setFieldValue('selectedProductIds', uniqueProducts);
+ }}
+ placeholder="Select product groups"
+ multiple={true}
+ />
+
+
+
+ Select Products (Optional)
+ id.toString())}
+ onValueChange={(value) => {
+ const selectedValues = Array.isArray(value) ? value : typeof value === 'string' ? [value] : [];
+ setFieldValue('selectedProductIds', selectedValues.map(v => Number(v)));
+ }}
+ placeholder="Select products for this slot"
+ multiple={true}
+ />
+
+
+ {/* Vendor Snippets */}
+
+ {({ push, remove }) => (
+
+ Vendor Snippets
+ {values.vendorSnippetList.map((snippet, index) => (
+
+
+ setFieldValue(`vendorSnippetList.${index}.name`, text)}
+ />
+
+
+
+
+ values.selectedGroupIds.includes(Number(option.value))
+ )}
+ value={snippet.groupIds?.map(id => id.toString()) || []}
+ onValueChange={(value) => {
+ const selectedValues = Array.isArray(value) ? value : [value];
+ const selectedGroupIds = selectedValues.map(v => parseInt(v as string));
+ setFieldValue(`vendorSnippetList.${index}.groupIds`, selectedGroupIds);
+
+ // Auto-populate products from selected groups
+ const allSnippetProducts = selectedGroupIds.flatMap(groupId => {
+ const group = (groupsData?.groups || []).find(g => g.id === groupId);
+ return group?.products.map(p => p.id) || [];
+ });
+ // Remove duplicates
+ const uniqueSnippetProducts = [...new Set(allSnippetProducts)];
+ setFieldValue(`vendorSnippetList.${index}.productIds`, uniqueSnippetProducts);
+ }}
+ placeholder="Select groups for snippet"
+ multiple={true}
+ />
+
+
+
+ values.selectedProductIds.includes(Number(option.value))
+ )}
+ value={snippet.productIds?.map(id => id.toString()) || []}
+ onValueChange={(value) => {
+ const selectedValues = Array.isArray(value) ? value : [value];
+ setFieldValue(`vendorSnippetList.${index}.productIds`, selectedValues.map(v => parseInt(v as string)));
+ }}
+ placeholder="Select products for snippet"
+ multiple={true}
+ />
+
+ remove(index)}
+ style={tw`bg-red-500 px-4 py-2 rounded-lg self-end`}
+ >
+ Remove Snippet
+
+
+ ))}
+ push({ name: '', groupIds: [], productIds: [], validTill: '' })}
+ style={tw`bg-blue-500 px-4 py-3 rounded-lg items-center`}
+ >
+ Add Vendor Snippet
+
+
+ )}
+
+
+ handleSubmit()}
+ disabled={isPending}
+ style={tw`${isPending ? 'bg-pink2' : 'bg-pink1'} p-3 rounded-lg items-center mt-6 pb-4`}
+ >
+
+ {isPending ? (isEditMode ? 'Updating...' : 'Creating...') : (isEditMode ? 'Update Slot' : 'Create Slot')}
+
+
+
+ )}}
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/components/SnippetMenu.tsx b/apps/admin-ui/components/SnippetMenu.tsx
new file mode 100644
index 0000000..6c90367
--- /dev/null
+++ b/apps/admin-ui/components/SnippetMenu.tsx
@@ -0,0 +1,145 @@
+import React, { useState } from 'react';
+import { View, TouchableOpacity, Alert, Clipboard } from 'react-native';
+import { Entypo } from '@expo/vector-icons';
+import { MyText, tw, BottomDialog } from 'common-ui';
+import { SuccessToast } from '../services/toaster';
+
+export interface SnippetMenuOption {
+ title: string;
+ icon: keyof typeof Entypo.glyphMap;
+ onPress: () => void;
+ disabled?: boolean;
+}
+
+export interface SnippetMenuProps {
+ snippet: {
+ id: number;
+ snippetCode: string;
+ accessUrl: string;
+ };
+ onEdit: (snippet: any) => void;
+ onDelete: (id: number) => void;
+ onViewOrders: (snippetCode: string) => void;
+ triggerStyle?: any;
+ iconSize?: number;
+ iconColor?: string;
+}
+
+export const SnippetMenu: React.FC = ({
+ snippet,
+ onEdit,
+ onDelete,
+ onViewOrders,
+ triggerStyle = tw`p-2 rounded-full bg-gray-50`,
+ iconSize = 16,
+ iconColor = '#6B7280',
+}) => {
+ const [isOpen, setIsOpen] = useState(false);
+
+ const handleOpenMenu = () => {
+ setIsOpen(true);
+ };
+
+ const handleCloseMenu = () => {
+ setIsOpen(false);
+ };
+
+ const handleViewOrders = () => {
+ setIsOpen(false);
+ onViewOrders(snippet.snippetCode);
+ };
+
+ const handleEdit = () => {
+ setIsOpen(false);
+ onEdit(snippet);
+ };
+
+ const handleDelete = () => {
+ setIsOpen(false);
+ Alert.alert(
+ 'Delete Snippet',
+ 'Are you sure you want to delete this vendor snippet?',
+ [
+ { text: 'Cancel', style: 'cancel' },
+ {
+ text: 'Delete',
+ style: 'destructive',
+ onPress: () => onDelete(snippet.id),
+ },
+ ]
+ );
+ };
+
+ const handleCopyUrl = async () => {
+ setIsOpen(false);
+ await Clipboard.setString(snippet.accessUrl);
+ SuccessToast('URL copied to clipboard');
+ };
+
+ const options: SnippetMenuOption[] = [
+ {
+ title: 'View Orders',
+ icon: 'eye',
+ onPress: handleViewOrders,
+ },
+ {
+ title: 'Edit',
+ icon: 'edit',
+ onPress: handleEdit,
+ },
+ {
+ title: 'Copy URL',
+ icon: 'link',
+ onPress: handleCopyUrl,
+ },
+ {
+ title: 'Delete',
+ icon: 'trash',
+ onPress: handleDelete,
+ },
+ ];
+
+ const handleOptionPress = (option: SnippetMenuOption) => {
+ if (option.disabled) return;
+ option.onPress();
+ };
+
+ return (
+ <>
+ {/* Menu Trigger */}
+
+
+
+
+ {/* Menu Dialog */}
+
+
+
+ Snippet Options
+
+
+ {options.map((option, index) => (
+ handleOptionPress(option)}
+ disabled={option.disabled}
+ >
+
+
+ {option.title}
+
+
+ ))}
+
+
+ >
+ );
+};
\ No newline at end of file
diff --git a/apps/admin-ui/components/SnippetOrdersView.tsx b/apps/admin-ui/components/SnippetOrdersView.tsx
new file mode 100644
index 0000000..f48b6ef
--- /dev/null
+++ b/apps/admin-ui/components/SnippetOrdersView.tsx
@@ -0,0 +1,158 @@
+import React from 'react';
+import { View, ScrollView, TouchableOpacity } from 'react-native';
+import { MyText, tw, AppContainer } from 'common-ui';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+
+interface OrderProduct {
+ productId: number;
+ productName: string;
+ quantity: number;
+ price: number;
+ unit: string;
+ subtotal: number;
+}
+
+interface SnippetOrder {
+ orderId: string;
+ orderDate: string;
+ customerName: string;
+ totalAmount: string;
+ slotInfo: {
+ time: string;
+ sequence: any[];
+ } | null;
+ products: OrderProduct[];
+ matchedProducts: number[];
+ snippetCode: string;
+}
+
+interface SnippetOrdersViewProps {
+ orders: SnippetOrder[];
+ snippetCode: string;
+ onClose: () => void;
+}
+
+const OrderCard: React.FC<{ order: SnippetOrder; index: number }> = ({ order, index }) => {
+ const orderDate = new Date(order.orderDate);
+ const slotTime = order.slotInfo ? new Date(order.slotInfo.time) : null;
+
+ return (
+
+ {/* Order Header */}
+
+
+ {order.orderId}
+ {order.customerName}
+
+
+ ₹{order.totalAmount}
+
+ {orderDate.toLocaleDateString()}
+
+
+
+
+ {/* Slot Info */}
+ {slotTime && (
+
+
+ Delivery: {slotTime.toLocaleString()}
+
+
+ )}
+
+ {/* Products */}
+
+ Products:
+ {order.products.map((product, index) => {
+ const isMatched = order.matchedProducts.includes(product.productId);
+ return (
+
+
+
+ {product.productName}
+ {isMatched && ' ⭐'}
+
+
+ {product.quantity} {product.unit} × ₹{product.price}
+
+
+
+ ₹{product.subtotal.toFixed(2)}
+
+
+ );
+ })}
+
+
+ {/* Matched Products Summary */}
+
+
+ Matched {order.matchedProducts.length} product(s) from snippet "{order.snippetCode}"
+
+
+
+ );
+};
+
+const SnippetOrdersView: React.FC = ({
+ orders,
+ snippetCode,
+ onClose,
+}) => {
+ const totalOrders = orders.length;
+ const totalRevenue = orders.reduce((sum, order) => sum + parseFloat(order.totalAmount), 0);
+
+ return (
+
+
+ {/* Header */}
+
+
+
+ Orders for "{snippetCode}"
+
+ {totalOrders} order{totalOrders !== 1 ? 's' : ''} • Total: ₹{totalRevenue.toFixed(2)}
+
+
+
+ ✕
+
+
+
+
+ {/* Orders List */}
+
+ {orders.length === 0 ? (
+
+
+ No matching orders
+
+ No orders found that match this snippet's criteria
+
+
+ ) : (
+
+ {orders.map((order, index) => (
+
+
+ {index < orders.length - 1 && (
+
+ )}
+
+ ))}
+
+ )}
+
+
+
+ );
+};
+
+export default SnippetOrdersView;
\ No newline at end of file
diff --git a/apps/admin-ui/components/StoreForm.tsx b/apps/admin-ui/components/StoreForm.tsx
new file mode 100644
index 0000000..03b8eb6
--- /dev/null
+++ b/apps/admin-ui/components/StoreForm.tsx
@@ -0,0 +1,226 @@
+import React, { forwardRef, useState, useEffect, useMemo } from 'react';
+import { View, TouchableOpacity, Alert } from 'react-native';
+import { Formik } from 'formik';
+import * as Yup from 'yup';
+import { MyTextInput, BottomDropdown, MyText, tw, ImageUploader } from 'common-ui';
+import { trpc } from '../src/trpc-client';
+import usePickImage from 'common-ui/src/components/use-pick-image';
+
+export interface StoreFormData {
+ name: string;
+ description: string;
+ imageUrl?: string;
+ owner: number;
+ products: number[];
+}
+
+export interface StoreFormRef {
+ // Add methods if needed
+}
+
+interface StoreFormProps {
+ mode: 'create' | 'edit';
+ initialValues: StoreFormData;
+ onSubmit: (values: StoreFormData) => void;
+ isLoading: boolean;
+ storeId?: number;
+}
+
+const validationSchema = Yup.object().shape({
+ name: Yup.string().required('Name is required'),
+ description: Yup.string(),
+ imageUrl: Yup.string(),
+ owner: Yup.number().required('Owner is required'),
+ products: Yup.array().of(Yup.number()),
+});
+
+const StoreForm = forwardRef((props, ref) => {
+ const { mode, initialValues, onSubmit, isLoading, storeId } = props;
+ const { data: staffData } = trpc.admin.staffUser.getStaff.useQuery();
+ const { data: productsData } = trpc.admin.product.getProducts.useQuery();
+
+ const [formInitialValues, setFormInitialValues] = useState(initialValues);
+ const [selectedImages, setSelectedImages] = useState<{ blob: Blob; mimeType: string }[]>([]);
+ const [displayImages, setDisplayImages] = useState<{ uri?: string }[]>([]);
+
+ // For edit mode, pre-select products belonging to this store
+ const initialSelectedProducts = useMemo(() => {
+ if (mode !== 'edit' || !productsData?.products) return [];
+ return productsData.products
+ .filter(p => p.storeId === storeId)
+ .map(p => p.id);
+ }, [mode, productsData?.products, storeId]);
+
+ useEffect(() => {
+ setFormInitialValues({
+ ...initialValues,
+ products: initialSelectedProducts,
+ });
+ }, [initialValues, initialSelectedProducts]);
+
+ const staffOptions = staffData?.staff.map(staff => ({
+ label: staff.name,
+ value: staff.id,
+ })) || [];
+
+ const productOptions = productsData?.products.map(product => ({
+ label: `${product.name} - ₹${product.price}`,
+ value: product.id,
+ disabled: product.storeId !== null && product.storeId !== storeId, // Disable if belongs to another store
+ })) || [];
+
+ const generateUploadUrls = trpc.common.generateUploadUrls.useMutation();
+
+ const handleImagePick = usePickImage({
+ setFile: async (assets: any) => {
+ if (!assets || (Array.isArray(assets) && assets.length === 0)) {
+ setSelectedImages([]);
+ setDisplayImages([]);
+ return;
+ }
+
+ const files = Array.isArray(assets) ? assets : [assets];
+ const blobPromises = files.map(async (asset) => {
+ const response = await fetch(asset.uri);
+ const blob = await response.blob();
+ return { blob, mimeType: asset.mimeType || 'image/jpeg' };
+ });
+
+ const blobArray = await Promise.all(blobPromises);
+ setSelectedImages(blobArray);
+ setDisplayImages(files.map(asset => ({ uri: asset.uri })));
+ },
+ multiple: false, // Single image for stores
+ });
+
+ const handleRemoveImage = (uri: string) => {
+ const index = displayImages.findIndex(img => img.uri === uri);
+ if (index !== -1) {
+ const newDisplay = displayImages.filter((_, i) => i !== index);
+ const newFiles = selectedImages.filter((_, i) => i !== index);
+ setDisplayImages(newDisplay);
+ setSelectedImages(newFiles);
+ }
+ };
+
+ return (
+
+ {({ handleChange, handleSubmit, values, setFieldValue, errors, touched }) => {
+ const submit = async () => {
+ try {
+ let imageUrl: string | undefined;
+
+ if (selectedImages.length > 0) {
+ // Generate upload URLs
+ const mimeTypes = selectedImages.map(s => s.mimeType);
+ const { uploadUrls } = await generateUploadUrls.mutateAsync({
+ contextString: 'store',
+ mimeTypes,
+ });
+
+ // Upload images
+ for (let i = 0; i < uploadUrls.length; i++) {
+ const uploadUrl = uploadUrls[i];
+ const { blob, mimeType } = selectedImages[i];
+
+ const uploadResponse = await fetch(uploadUrl, {
+ method: 'PUT',
+ body: blob,
+ headers: {
+ 'Content-Type': mimeType,
+ },
+ });
+
+ if (!uploadResponse.ok) {
+ throw new Error(`Upload failed with status ${uploadResponse.status}`);
+ }
+ }
+
+ // Extract key from first upload URL
+ // const u = new URL(uploadUrls[0]);
+ // const rawKey = u.pathname.replace(/^\/+/, "");
+ // imageUrl = decodeURIComponent(rawKey);
+ imageUrl = uploadUrls[0];
+ }
+
+ // Submit form with imageUrl
+ onSubmit({ ...values, imageUrl });
+ } catch (error) {
+ console.error('Upload error:', error);
+ Alert.alert('Error', 'Failed to upload image');
+ }
+ };
+
+ return (
+
+
+
+ setFieldValue('owner', value)}
+ placeholder="Select owner"
+ error={!!(touched.owner && errors.owner)}
+ style={{ marginBottom: 16 }}
+ />
+ setFieldValue('products', value)}
+ placeholder="Select products"
+ multiple
+ style={{ marginBottom: 16 }}
+ />
+
+ Store Image
+ setFormInitialValues({ ...formInitialValues, imageUrl: undefined })}
+ allowMultiple={false}
+ />
+
+
+
+ {generateUploadUrls.isPending ? 'Uploading...' : isLoading ? (mode === 'create' ? 'Creating...' : 'Updating...') : (mode === 'create' ? 'Create Store' : 'Update Store')}
+
+
+
+ );
+ }}
+
+ );
+});
+
+StoreForm.displayName = 'StoreForm';
+
+export default StoreForm;
\ No newline at end of file
diff --git a/apps/admin-ui/components/TabNavigation.tsx b/apps/admin-ui/components/TabNavigation.tsx
new file mode 100755
index 0000000..02ec64c
--- /dev/null
+++ b/apps/admin-ui/components/TabNavigation.tsx
@@ -0,0 +1,37 @@
+import React from 'react';
+import { View, TouchableOpacity } from 'react-native';
+import { MyText , tw } from "common-ui";
+
+interface TabNavigationProps {
+ tabs: { key: string; title: string }[];
+ activeTab: string;
+ onTabChange: (tabKey: string) => void;
+}
+
+const TabNavigation: React.FC = ({ tabs, activeTab, onTabChange }) => {
+ return (
+
+ {tabs.map((tab) => (
+ onTabChange(tab.key)}
+ >
+
+ {tab.title}
+
+
+ ))}
+
+ );
+};
+
+export default TabNavigation;
\ No newline at end of file
diff --git a/apps/admin-ui/components/VendorSnippetForm.tsx b/apps/admin-ui/components/VendorSnippetForm.tsx
new file mode 100644
index 0000000..cbea7b7
--- /dev/null
+++ b/apps/admin-ui/components/VendorSnippetForm.tsx
@@ -0,0 +1,220 @@
+import React, { useState, useEffect } from 'react';
+import { View, TouchableOpacity, Alert, ScrollView } from 'react-native';
+import { useFormik } from 'formik';
+import { MyText, tw, DatePicker, MyTextInput } from 'common-ui';
+import BottomDropdown from 'common-ui/src/components/bottom-dropdown';
+import { trpc } from '../src/trpc-client';
+
+
+interface VendorSnippet {
+ id: number;
+ snippetCode: string;
+ slotId: number;
+ productIds: number[];
+ validTill: string | null;
+ createdAt: string;
+}
+
+interface VendorSnippetFormProps {
+ snippet?: VendorSnippet | null;
+ onClose: () => void;
+ onSuccess: () => void;
+}
+
+const VendorSnippetForm: React.FC = ({
+ snippet,
+ onClose,
+ onSuccess,
+}) => {
+
+ // Fetch slots and products
+ const { data: slotsData } = trpc.user.slots.getSlots.useQuery();
+ const { data: productsData } = trpc.common.product.getAllProductsSummary.useQuery({});
+
+ const createSnippet = trpc.admin.vendorSnippets.create.useMutation();
+ const updateSnippet = trpc.admin.vendorSnippets.update.useMutation();
+
+ const isEditing = !!snippet;
+
+ const formik = useFormik({
+ initialValues: {
+ snippetCode: snippet?.snippetCode || '',
+ slotId: snippet?.slotId?.toString() || '',
+ productIds: snippet?.productIds?.map(id => id.toString()) || [],
+ validTill: snippet?.validTill ? new Date(snippet.validTill) : null,
+ },
+ validate: (values) => {
+ const errors: {[key: string]: string} = {};
+
+ if (!values.snippetCode.trim()) {
+ errors.snippetCode = 'Snippet code is required';
+ }
+
+ if (!values.slotId) {
+ errors.slotId = 'Slot selection is required';
+ }
+
+ if (values.productIds.length === 0) {
+ errors.productIds = 'At least one product must be selected';
+ }
+
+ return errors;
+ },
+ onSubmit: async (values) => {
+ try {
+ const submitData = {
+ snippetCode: values.snippetCode,
+ slotId: parseInt(values.slotId),
+ productIds: values.productIds.map(id => parseInt(id)),
+ validTill: values.validTill?.toISOString(),
+ };
+
+ if (isEditing && snippet) {
+ await updateSnippet.mutateAsync({
+ id: snippet.id,
+ updates: submitData,
+ });
+ Alert.alert('Success', 'Vendor snippet updated successfully');
+ } else {
+ await createSnippet.mutateAsync(submitData);
+ Alert.alert('Success', 'Vendor snippet created successfully');
+ }
+
+ onSuccess();
+ onClose();
+ } catch (error: any) {
+ Alert.alert('Error', error.message || 'Failed to save vendor snippet');
+ }
+ },
+ });
+
+ // Generate unique snippet code if creating new (only on mount)
+ useEffect(() => {
+ if (!isEditing && !formik.values.snippetCode) {
+ const timestamp = Date.now();
+ const random = Math.random().toString(36).substring(2, 8);
+ formik.setFieldValue('snippetCode', `VS_${timestamp}_${random}`.toUpperCase());
+ }
+ }, [isEditing]); // Removed formik.values.snippetCode from deps
+
+
+
+ const slotOptions = slotsData?.slots.map(slot => ({
+ label: new Date(slot.deliveryTime).toLocaleString(),
+ value: slot.id.toString(),
+ })) || [];
+
+ const productOptions = productsData?.products.map(product => ({
+ label: `${product.name} (${product.unit})`,
+ value: product.id.toString(),
+ })) || [];
+
+ const selectedProductLabels = formik.values.productIds
+ .map(id => productOptions.find(opt => opt.value === id)?.label)
+ .filter(Boolean)
+ .join(', ');
+
+ return (
+
+
+
+
+ {isEditing ? 'Edit Vendor Snippet' : 'Create Vendor Snippet'}
+
+
+ ✕
+
+
+
+
+
+
+ {/* Snippet Code */}
+
+
+ {formik.errors.snippetCode && formik.touched.snippetCode && (
+ {formik.errors.snippetCode}
+ )}
+
+
+ {/* Slot Selection */}
+
+ Delivery Slot
+ formik.setFieldValue('slotId', value)}
+ placeholder="Choose a delivery slot"
+ />
+ {formik.errors.slotId && formik.touched.slotId && (
+ {formik.errors.slotId}
+ )}
+
+
+ {/* Product Selection */}
+
+ Products
+ formik.setFieldValue('productIds', values)}
+ multiple={true}
+ placeholder="Select products"
+ />
+ {formik.values.productIds.length > 0 && (
+
+ Selected: {selectedProductLabels}
+
+ )}
+ {formik.errors.productIds && formik.touched.productIds && (
+ {formik.errors.productIds}
+ )}
+
+
+ {/* Valid Till Date */}
+
+ Valid Till (Optional)
+ formik.setFieldValue('validTill', date)}
+ placeholder="Select expiry date"
+ showLabel={false}
+ />
+
+ Leave empty for no expiry
+
+
+
+
+
+ {/* Submit Button */}
+
+ formik.handleSubmit()}
+ disabled={formik.isSubmitting}
+ style={tw`bg-blue-500 py-3 rounded-lg ${formik.isSubmitting ? 'opacity-50' : ''}`}
+ >
+
+ {formik.isSubmitting
+ ? 'Saving...'
+ : isEditing ? 'Update Snippet' : 'Create Snippet'
+ }
+
+
+
+
+ );
+};
+
+export default VendorSnippetForm;
\ No newline at end of file
diff --git a/apps/admin-ui/components/app-container.tsx b/apps/admin-ui/components/app-container.tsx
new file mode 100755
index 0000000..50e2b54
--- /dev/null
+++ b/apps/admin-ui/components/app-container.tsx
@@ -0,0 +1,3 @@
+import { AppContainer } from "common-ui";
+
+export default AppContainer;
\ No newline at end of file
diff --git a/apps/admin-ui/components/context/auth-context.tsx b/apps/admin-ui/components/context/auth-context.tsx
new file mode 100755
index 0000000..ed365b9
--- /dev/null
+++ b/apps/admin-ui/components/context/auth-context.tsx
@@ -0,0 +1,270 @@
+// import React, {
+// createContext,
+// useContext,
+// useEffect,
+// useState,
+// ReactNode,
+// } from "react";
+// import {
+// getJWT,
+// deleteJWT,
+// getRoles,
+// saveJWT,
+// saveRoles,
+// saveUserId,
+// getUserId,
+// } from "../../hooks/useJWT";
+// import { useFocusEffect, usePathname, useRouter } from "expo-router";
+// import queryClient from "@/utils/queryClient";
+// import { DeviceEventEmitter } from "react-native";
+// import { FORCE_LOGOUT_EVENT, SESSION_EXPIRED_MSG } from "common-ui/src/lib/const-strs";
+// import { useLogin, useLogout } from "@/api-hooks/auth.api";
+// import {
+// useUserResponsibilities,
+// UserResponsibilities,
+// } from "@/api-hooks/user.api";
+// import { InfoToast, SuccessToast } from "@/services/toaster";
+// import { useNotification } from "@/services/notif-service/notif-context";
+
+// interface LoginFormInputs {
+// login: string;
+// password: string;
+// useUsername?: boolean;
+// expoPushToken?: string | null;
+// }
+
+// interface AuthContextType {
+// isLoggedIn: boolean;
+// setIsLoggedIn: (value: boolean) => void;
+// logout: ({
+// isSessionExpired,
+// }: {
+// isSessionExpired?: boolean;
+// }) => Promise;
+// responsibilities: UserResponsibilities | null;
+// responsibilitiesLoading: boolean;
+// responsibilitiesError: Error | null;
+// roles: string[] | null;
+// setRoles: (roles: string[] | null) => void;
+// refreshRoles: () => Promise;
+// loginFunc: (payload: LoginFormInputs) => Promise;
+// userId: number | null;
+// isLoggingIn: boolean;
+// loginError?: string;
+// }
+
+// const defaultResponsibilities: UserResponsibilities = {
+// hospitalAdminFor: null,
+// secretaryFor: [],
+// };
+
+// export const AuthContext = createContext(
+// undefined
+// );
+
+// export const AuthProvider = ({ children }: { children: ReactNode }) => {
+// const { mutate: loginApi, isPending: isLoggingIn, error: loginError } = useLogin();
+// const [isLoggedIn, setIsLoggedIn] = useState(false);
+// const [roles, setRoles] = useState(null);
+// const [userId, setUserId] = useState(null);
+
+// const refreshRoles = async () => {
+// const r = await getRoles();
+// setRoles(r);
+// };
+
+
+
+// useEffect(() => {
+// refreshRoles();
+// }, []);
+// const { mutate: logoutApi } = useLogout();
+// const router = useRouter();
+// const [responsibilitiesError, setResponsibilitiesError] =
+// useState(null);
+
+// const {
+// data: responsibilities,
+// isLoading: responsibilitiesLoading,
+// isFetching: responsibilitiesFetching,
+// refetch: refetchResponsibilities,
+// error: queryError,
+// } = useUserResponsibilities(userId);
+
+
+// React.useEffect(() => {
+// (async () => {
+// const token = await getJWT();
+
+// setIsLoggedIn(!!token);
+// if (!token) {
+// if (!pathname.includes("login")) {
+// router.replace("/login" as any);
+// }
+// } else {
+// refetchResponsibilities();
+// router.replace("/(drawer)/dashboard");
+// const userId = await getUserId();
+// setUserId(userId ? parseInt(userId) : null);
+// }
+// })();
+// }, []);
+
+// const pathname = usePathname();
+
+
+// const logout = async ({
+// isSessionExpired,
+// }: {
+// isSessionExpired?: boolean;
+// }) => {
+
+// const pageConditon =
+// pathname.includes("/login") ||
+// pathname.includes("/signup") ||
+// pathname === "/";
+
+// if (!isSessionExpired) {
+// logoutApi({} as any, {
+// onSuccess: () => {},
+// onSettled: () => {
+
+// if (!pageConditon) {
+// router.replace({
+// pathname: "/login" as any,
+// params: isSessionExpired ? { message: SESSION_EXPIRED_MSG } : {},
+// });
+// }
+// deleteJWT();
+// },
+// });
+// setIsLoggedIn(false);
+// } else {
+// deleteJWT();
+// setIsLoggedIn(false);
+// InfoToast("Session expired. Please log in again.");
+// if (!pageConditon) {
+// router.replace({
+// pathname: "/login" as any,
+// params: { message: SESSION_EXPIRED_MSG },
+// });
+// }
+// }
+// queryClient.clear();
+// };
+
+// const loginFunc = async (data: LoginFormInputs) => {
+// loginApi(data, {
+// onSuccess: async (result) => {
+
+// // refetchUserId();
+// // await refetchUserData();
+
+// await saveUserId(result.user.id.toString());
+// setUserId(result.user.id);
+
+// await saveJWT(result.token);
+
+// // Update login state in auth context
+// setIsLoggedIn(true);
+
+// // Handle roles if available
+// if (result.user.roles) {
+// await saveRoles(result.user.roles);
+// await refreshRoles();
+// }
+// await refetchResponsibilities();
+
+// // Clear the 'message' search param from the URL after login
+// router.replace({
+// pathname: "/(drawer)/dashboard",
+// params: {},
+// });
+// },
+// onError: (e: any) => {
+// // setError("login", {
+// // type: "manual",
+// // message: e.message || "Login failed",
+// // });
+// },
+// });
+// };
+
+// React.useEffect(() => {
+// const subscription = DeviceEventEmitter.addListener(
+// FORCE_LOGOUT_EVENT,
+// () => {
+// logout({ isSessionExpired: true });
+// }
+// );
+
+// return () => {
+// subscription.remove();
+// };
+// }, []);
+
+
+// return (
+//
+// {children}
+//
+// );
+// };
+
+// export const useAuth = () => {
+// const context = useContext(AuthContext);
+// if (!context) {
+// throw new Error("useAuth must be used within an AuthProvider");
+// }
+// return context;
+// };
+
+// /**
+// * Hook to check if the current user is a hospital admin
+// * @param hospitalId Hospital ID to check against
+// * @returns Boolean indicating if user is admin for that hospital
+// */
+// export const useIsHospitalAdmin = (hospitalId?: number | string): boolean => {
+// const { responsibilities } = useAuth();
+
+// // If no hospitalId provided, return false
+// if (hospitalId === undefined) {
+// return false;
+// }
+
+// // Check if user is admin for the specified hospital
+// return responsibilities?.hospitalAdminFor === hospitalId;
+// };
+
+// /**
+// * Hook to check if the current user is a secretary for a specific doctor
+// * @param doctorId Doctor ID to check against
+// * @returns Boolean indicating if user is a secretary for that doctor
+// */
+// export const useIsDoctorSecretary = (doctorId?: number): boolean => {
+// const { responsibilities } = useAuth();
+
+// // If no doctorId provided, return false
+// if (doctorId === undefined) {
+// return false;
+// }
+
+// // Check if user is a secretary for the specified doctor
+// return responsibilities?.secretaryFor?.includes(doctorId) || false;
+// };
diff --git a/apps/admin-ui/components/context/roles-context.tsx b/apps/admin-ui/components/context/roles-context.tsx
new file mode 100755
index 0000000..e8936d5
--- /dev/null
+++ b/apps/admin-ui/components/context/roles-context.tsx
@@ -0,0 +1,43 @@
+import React, { createContext, useContext, useEffect, useState, ReactNode } from "react";
+import { AuthContext } from "./auth-context";
+import { ROLE_NAMES } from "common-ui";
+// import { getRoles, saveRoles, deleteRoles } from "../../hooks/useJWT";
+// import { ROLE_NAMES } from "../../lib/constants";
+
+// interface RolesContextType {
+// roles: string[] | null;
+// setRoles: (roles: string[] | null) => void;
+// refreshRoles: () => Promise;
+// }
+
+// const RolesContext = createContext(undefined);
+
+// export const RolesProvider = ({ children }: { children: ReactNode }) => {
+// const [roles, setRoles] = useState(null);
+
+// const refreshRoles = async () => {
+// const r = await getRoles();
+// setRoles(r);
+// };
+
+// useEffect(() => {
+// refreshRoles();
+// }, []);
+
+// return (
+//
+// {children}
+//
+// );
+// };
+
+export const useRoles = () => {
+ const ctx = useContext(AuthContext);
+ if (!ctx) throw new Error("useRoles must be used within a RolesProvider");
+ return ctx.roles;
+};
+
+export const useIsAdmin = () => {
+ const roles = useRoles();
+ return roles?.includes(ROLE_NAMES.ADMIN);
+}
diff --git a/apps/admin-ui/components/context/staff-auth-context.tsx b/apps/admin-ui/components/context/staff-auth-context.tsx
new file mode 100644
index 0000000..fc14804
--- /dev/null
+++ b/apps/admin-ui/components/context/staff-auth-context.tsx
@@ -0,0 +1,116 @@
+import React, { createContext, useContext, useEffect, useState, ReactNode } from "react";
+import { useRouter, usePathname } from "expo-router";
+import queryClient from "@/utils/queryClient";
+import { DeviceEventEmitter } from "react-native";
+import { FORCE_LOGOUT_EVENT } from "common-ui/src/lib/const-strs";
+import { trpc } from "@/src/trpc-client";
+import { saveJWT, getJWT, deleteJWT } from "@/hooks/useJWT";
+
+interface Staff {
+ id: number;
+ name: string;
+}
+
+interface StaffAuthContextType {
+ isLoggedIn: boolean;
+ isLoading: boolean;
+ staff: Staff | null;
+ login: (name: string, password: string) => Promise;
+ logout: () => void;
+ isLoggingIn: boolean;
+ loginError: string | null;
+}
+
+const StaffAuthContext = createContext(undefined);
+
+export const StaffAuthProvider = ({ children }: { children: ReactNode }) => {
+ const [isLoggedIn, setIsLoggedIn] = useState(false);
+ const [isLoading, setIsLoading] = useState(true);
+ const [staff, setStaff] = useState(null);
+ const [loginError, setLoginError] = useState(null);
+
+ const loginMutation = trpc.admin.staffUser.login.useMutation();
+ const router = useRouter();
+ const pathname = usePathname();
+
+ useEffect(() => {
+ const checkAuth = async () => {
+ const token = await getJWT();
+ if (token) {
+ // TODO: Optionally decode token to get staff info
+ setIsLoggedIn(true);
+ // For now, assume staff info is not needed beyond login state
+ } else {
+ setIsLoggedIn(false);
+ if (!pathname.includes("login")) {
+ router.replace("/login" as any);
+ }
+ }
+ setIsLoading(false);
+ };
+
+ checkAuth();
+ }, []);
+
+ const login = async (name: string, password: string) => {
+ setLoginError(null);
+ loginMutation.mutate(
+ { name, password },
+ {
+ onSuccess: async (data) => {
+ await saveJWT(data.token);
+ setStaff(data.staff);
+ setIsLoggedIn(true);
+ router.replace("/(drawer)/dashboard");
+ },
+ onError: (error: any) => {
+ setLoginError(error.message || "Login failed");
+ },
+ }
+ );
+ };
+
+ const logout = async () => {
+ await deleteJWT();
+ setIsLoggedIn(false);
+ setStaff(null);
+ queryClient.clear();
+ router.replace("/login" as any);
+ };
+
+ useEffect(() => {
+ const subscription = DeviceEventEmitter.addListener(FORCE_LOGOUT_EVENT, () => {
+ console.log('force logout event received');
+
+ logout();
+ });
+
+ return () => {
+ subscription.remove();
+ };
+ }, []);
+
+ return (
+
+ {children}
+
+ );
+};
+
+export const useStaffAuth = () => {
+ const context = useContext(StaffAuthContext);
+ if (!context) {
+ throw new Error("useStaffAuth must be used within a StaffAuthProvider");
+ }
+ return context;
+};
\ No newline at end of file
diff --git a/apps/admin-ui/components/dashboard-header.tsx b/apps/admin-ui/components/dashboard-header.tsx
new file mode 100755
index 0000000..000f7c4
--- /dev/null
+++ b/apps/admin-ui/components/dashboard-header.tsx
@@ -0,0 +1,115 @@
+import React from 'react';
+import { View, TouchableOpacity, Animated, Easing } from 'react-native';
+import { SafeAreaView } from 'react-native-safe-area-context';
+import { MyText , tw , colors } from "common-ui";
+import { Ionicons } from '@expo/vector-icons';
+import { useThemeColor } from '@/hooks/useThemeColor';
+import { IconButton } from 'react-native-paper';
+
+interface DashboardHeaderProps {
+ onMenuPress: () => void;
+ onNotificationsPress: () => void;
+ onProfilePress: () => void;
+ onRefreshPress?: () => void;
+ refreshing?: boolean;
+}
+
+const DashboardHeader: React.FC = ({
+ onMenuPress,
+ onNotificationsPress,
+ onProfilePress,
+ onRefreshPress,
+ refreshing = false
+}) => {
+ const accentColor = useThemeColor({ light: '#4f46e5', dark: '#818cf8' }, 'tint');
+
+ // For the refresh animation
+ const spinAnim = React.useRef(new Animated.Value(0)).current;
+
+ // Update animation when refreshing prop changes
+ React.useEffect(() => {
+ let animation: Animated.CompositeAnimation | null = null;
+
+ if (refreshing) {
+ animation = Animated.loop(
+ Animated.timing(spinAnim, {
+ toValue: 1,
+ duration: 1000,
+ easing: Easing.linear,
+ useNativeDriver: true,
+ })
+ );
+ animation.start();
+ } else {
+ spinAnim.stopAnimation();
+ spinAnim.setValue(0);
+ }
+
+ return () => {
+ if (animation) {
+ animation.stop();
+ }
+ };
+ }, [refreshing]);
+
+ const spin = spinAnim.interpolate({
+ inputRange: [0, 1],
+ outputRange: ['0deg', '360deg'],
+ });
+
+ return (
+
+
+ {/* Menu Button */}
+
+
+
+
+ {/* Logo/App Name */}
+
+ HealthPetal
+
+
+ {/* Right Actions */}
+
+ {/* Refresh Button */}
+ {onRefreshPress && (
+
+
+
+ )}
+
+ {/* Notifications */}
+
+
+ {/* Notification Badge */}
+
+
+
+ {/* Profile */}
+
+
+
+
+
+
+ );
+};
+
+export default DashboardHeader;
\ No newline at end of file
diff --git a/apps/admin-ui/components/date-time-picker.tsx b/apps/admin-ui/components/date-time-picker.tsx
new file mode 100755
index 0000000..ca43829
--- /dev/null
+++ b/apps/admin-ui/components/date-time-picker.tsx
@@ -0,0 +1,278 @@
+// import { useTheme } from "@/hooks/theme-context";
+import { MaterialCommunityIcons } from "@expo/vector-icons";
+import DateTimePicker, {
+ AndroidNativeProps,
+ DateTimePickerAndroid,
+ DateTimePickerEvent,
+} from "@react-native-community/datetimepicker";
+import React, { useState } from "react";
+import {
+ Modal,
+ Platform,
+ StyleSheet,
+ Text,
+ TouchableOpacity,
+ View,
+} from "react-native";
+
+import { useTheme, MyText } from "common-ui";
+
+interface Props {
+ value: Date | null;
+ setValue: (date: Date | null) => void;
+ showLabels?: boolean; // Optional prop to control label visibility
+ timeOnly?: boolean; // Optional prop to show only time picker
+}
+
+type Mode = "date" | "time" | "datetime";
+
+function DateTimePickerMod(props: Props) {
+ const { value, setValue, showLabels = true, timeOnly = false } = props;
+ const [show, setShow] = useState(false);
+ const [mode, setMode] = useState("date");
+
+ const onChange = (event: DateTimePickerEvent, selectedDate?: Date) => {
+ const currentDate = selectedDate || value;
+ if (Platform.OS === "ios") setShow(false);
+ setValue(currentDate);
+ };
+
+ const showMode = (currentMode: Mode) => {
+ if (Platform.OS === "android") {
+ DateTimePickerAndroid.open({
+ value: value || new Date(),
+ onChange: onChange,
+ mode: currentMode,
+ is24Hour: true,
+ display: "default",
+ } as AndroidNativeProps);
+ } else {
+ setShow(true);
+ setMode(currentMode);
+ }
+ };
+ const showDatepicker = () => {
+ showMode("date");
+ };
+
+ const showTimepicker = () => {
+ showMode("time");
+ };
+ const { theme } = useTheme();
+
+ return (
+
+ {timeOnly ? (
+
+ {showLabels && Select Time}
+
+
+ {value?.toLocaleTimeString([], {
+ hour: "2-digit",
+ minute: "2-digit",
+ }) || "Select Time"}
+
+
+
+
+ ) : (
+
+
+ {showLabels && Select Date}
+
+ {value?.toLocaleDateString() || "Select Date"}
+
+
+
+
+
+ {showLabels && Select Time}
+
+
+ {value?.toLocaleTimeString([], {
+ hour: "2-digit",
+ minute: "2-digit",
+ }) || "Select Time"}
+
+
+
+
+
+ )}
+ {/* Conditional rendering for iOS, as it uses the declarative API */}
+ {show && Platform.OS === "ios" && (
+ setShow(false)}
+ >
+
+
+
+ setShow(false)}
+ style={styles.doneButton}
+ >
+ Done
+
+
+
+
+ )}
+
+ );
+}
+
+export default DateTimePickerMod;
+
+const styles = StyleSheet.create({
+ container: {
+ // flex: 1, // Remove flex to avoid taking up extra space
+ justifyContent: "center",
+ alignItems: "flex-start",
+ padding: 0, // Reduce padding for compactness
+ marginBottom: 16, // Add margin for spacing in forms
+ },
+ iconRow: {
+ flexDirection: "row",
+ alignItems: "center",
+ justifyContent: "center",
+ marginBottom: 20,
+ },
+ iconRowSingleLine: {
+ flexDirection: "row",
+ alignItems: "center",
+ justifyContent: "center",
+ marginBottom: 0,
+ },
+ iconNoBg: {
+ backgroundColor: "transparent",
+ borderRadius: 0,
+ padding: 0,
+ elevation: 0,
+ },
+ spacerHorizontal: {
+ width: 30,
+ },
+ spacerHorizontalSmall: {
+ width: 8,
+ },
+ spacer: {
+ height: 20, // Add some space between buttons
+ },
+ selectedText: {
+ marginTop: 30,
+ fontSize: 18,
+ fontWeight: "bold",
+ textAlign: "center",
+ },
+ timeTextContainer: {
+ justifyContent: "center",
+ alignItems: "center",
+ },
+ timeText: {
+ fontSize: 15,
+ fontWeight: "500",
+ color: "#333",
+ marginLeft: 2,
+ },
+ dateText: {
+ fontSize: 15,
+ fontWeight: "500",
+ color: "#333",
+ marginLeft: 2,
+ marginRight: 2,
+ },
+
+ modalOverlay: {
+ flex: 1,
+ justifyContent: "center",
+ alignItems: "center",
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
+ },
+ pickerContainer: {
+ width: "80%",
+ backgroundColor: "white",
+ borderRadius: 10,
+ padding: 20,
+ elevation: 5,
+ },
+ doneButton: {
+ marginTop: 10,
+ backgroundColor: "#007bff",
+ borderRadius: 5,
+ padding: 10,
+ alignItems: "center",
+ },
+ doneButtonText: {
+ color: "white",
+ fontWeight: "bold",
+ },
+});
diff --git a/apps/admin-ui/components/day-account-view.tsx b/apps/admin-ui/components/day-account-view.tsx
new file mode 100755
index 0000000..686d9e7
--- /dev/null
+++ b/apps/admin-ui/components/day-account-view.tsx
@@ -0,0 +1,77 @@
+import React from 'react';
+import { View } from 'react-native';
+import { MyText , tw } from "common-ui";
+import { Ionicons } from '@expo/vector-icons';
+
+// Define the types
+export interface DoctorWiseCount {
+ doctorName: string;
+ doctorId: number;
+ fee: number;
+ issuedTokens: number;
+ totalAmount: number;
+}
+
+export interface DayAccountData {
+ doctorWiseCount: DoctorWiseCount[];
+ date: string;
+ totalAmount: number;
+ settled: boolean;
+}
+
+interface DayAccountViewProps {
+ dayData: DayAccountData;
+}
+
+const DayAccountView: React.FC = ({ dayData }) => {
+ return (
+
+
+
+ {dayData.date}
+
+
+
+ ₹{dayData.totalAmount}
+
+ {dayData.settled ? (
+
+
+ Settled
+
+ ) : (
+
+
+ Pending
+
+ )}
+
+
+
+
+ {dayData.doctorWiseCount.map((doctor, idx) => (
+
+
+
+ {doctor.doctorName}
+
+
+ ₹{doctor.fee} × {doctor.issuedTokens} tokens
+
+
+
+ ₹{doctor.totalAmount}
+
+
+ ))}
+
+
+ );
+};
+
+export default DayAccountView;
\ No newline at end of file
diff --git a/apps/admin-ui/components/ui/IconSymbol.ios.tsx b/apps/admin-ui/components/ui/IconSymbol.ios.tsx
new file mode 100755
index 0000000..9177f4d
--- /dev/null
+++ b/apps/admin-ui/components/ui/IconSymbol.ios.tsx
@@ -0,0 +1,32 @@
+import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols';
+import { StyleProp, ViewStyle } from 'react-native';
+
+export function IconSymbol({
+ name,
+ size = 24,
+ color,
+ style,
+ weight = 'regular',
+}: {
+ name: SymbolViewProps['name'];
+ size?: number;
+ color: string;
+ style?: StyleProp;
+ weight?: SymbolWeight;
+}) {
+ return (
+
+ );
+}
diff --git a/apps/admin-ui/components/ui/IconSymbol.tsx b/apps/admin-ui/components/ui/IconSymbol.tsx
new file mode 100755
index 0000000..b7ece6b
--- /dev/null
+++ b/apps/admin-ui/components/ui/IconSymbol.tsx
@@ -0,0 +1,41 @@
+// Fallback for using MaterialIcons on Android and web.
+
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { SymbolWeight, SymbolViewProps } from 'expo-symbols';
+import { ComponentProps } from 'react';
+import { OpaqueColorValue, type StyleProp, type TextStyle } from 'react-native';
+
+type IconMapping = Record['name']>;
+type IconSymbolName = keyof typeof MAPPING;
+
+/**
+ * Add your SF Symbols to Material Icons mappings here.
+ * - see Material Icons in the [Icons Directory](https://icons.expo.fyi).
+ * - see SF Symbols in the [SF Symbols](https://developer.apple.com/sf-symbols/) app.
+ */
+const MAPPING = {
+ 'house.fill': 'home',
+ 'paperplane.fill': 'send',
+ 'chevron.left.forwardslash.chevron.right': 'code',
+ 'chevron.right': 'chevron-right',
+} as IconMapping;
+
+/**
+ * An icon component that uses native SF Symbols on iOS, and Material Icons on Android and web.
+ * This ensures a consistent look across platforms, and optimal resource usage.
+ * Icon `name`s are based on SF Symbols and require manual mapping to Material Icons.
+ */
+export function IconSymbol({
+ name,
+ size = 24,
+ color,
+ style,
+}: {
+ name: IconSymbolName;
+ size?: number;
+ color: string | OpaqueColorValue;
+ style?: StyleProp;
+ weight?: SymbolWeight;
+}) {
+ return ;
+}
diff --git a/apps/admin-ui/components/ui/TabBarBackground.ios.tsx b/apps/admin-ui/components/ui/TabBarBackground.ios.tsx
new file mode 100755
index 0000000..495b2d4
--- /dev/null
+++ b/apps/admin-ui/components/ui/TabBarBackground.ios.tsx
@@ -0,0 +1,19 @@
+import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
+import { BlurView } from 'expo-blur';
+import { StyleSheet } from 'react-native';
+
+export default function BlurTabBarBackground() {
+ return (
+
+ );
+}
+
+export function useBottomTabOverflow() {
+ return useBottomTabBarHeight();
+}
diff --git a/apps/admin-ui/components/ui/TabBarBackground.tsx b/apps/admin-ui/components/ui/TabBarBackground.tsx
new file mode 100755
index 0000000..70d1c3c
--- /dev/null
+++ b/apps/admin-ui/components/ui/TabBarBackground.tsx
@@ -0,0 +1,6 @@
+// This is a shim for web and Android where the tab bar is generally opaque.
+export default undefined;
+
+export function useBottomTabOverflow() {
+ return 0;
+}
diff --git a/apps/admin-ui/constants/Colors.ts b/apps/admin-ui/constants/Colors.ts
new file mode 100755
index 0000000..14e6784
--- /dev/null
+++ b/apps/admin-ui/constants/Colors.ts
@@ -0,0 +1,26 @@
+/**
+ * Below are the colors that are used in the app. The colors are defined in the light and dark mode.
+ * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
+ */
+
+const tintColorLight = '#0a7ea4';
+const tintColorDark = '#fff';
+
+export const Colors = {
+ light: {
+ text: '#11181C',
+ background: '#fff',
+ tint: tintColorLight,
+ icon: '#687076',
+ tabIconDefault: '#687076',
+ tabIconSelected: tintColorLight,
+ },
+ dark: {
+ text: '#ECEDEE',
+ background: '#151718',
+ tint: tintColorDark,
+ icon: '#9BA1A6',
+ tabIconDefault: '#9BA1A6',
+ tabIconSelected: tintColorDark,
+ },
+};
diff --git a/apps/admin-ui/eas.json b/apps/admin-ui/eas.json
new file mode 100755
index 0000000..ec2e587
--- /dev/null
+++ b/apps/admin-ui/eas.json
@@ -0,0 +1,22 @@
+{
+ "cli": {
+ "version": ">= 16.17.4",
+ "appVersionSource": "remote"
+ },
+ "build": {
+ "development": {
+ "developmentClient": true,
+ "distribution": "internal"
+ },
+ "preview": {
+ "distribution": "internal",
+ "channel": "preview"
+ },
+ "production": {
+ "autoIncrement": true
+ }
+ },
+ "submit": {
+ "production": {}
+ }
+}
diff --git a/apps/admin-ui/eslint.config.js b/apps/admin-ui/eslint.config.js
new file mode 100755
index 0000000..5025da6
--- /dev/null
+++ b/apps/admin-ui/eslint.config.js
@@ -0,0 +1,10 @@
+// https://docs.expo.dev/guides/using-eslint/
+const { defineConfig } = require('eslint/config');
+const expoConfig = require('eslint-config-expo/flat');
+
+module.exports = defineConfig([
+ expoConfig,
+ {
+ ignores: ['dist/*'],
+ },
+]);
diff --git a/apps/admin-ui/hooks/useColorScheme.ts b/apps/admin-ui/hooks/useColorScheme.ts
new file mode 100755
index 0000000..17e3c63
--- /dev/null
+++ b/apps/admin-ui/hooks/useColorScheme.ts
@@ -0,0 +1 @@
+export { useColorScheme } from 'react-native';
diff --git a/apps/admin-ui/hooks/useColorScheme.web.ts b/apps/admin-ui/hooks/useColorScheme.web.ts
new file mode 100755
index 0000000..7eb1c1b
--- /dev/null
+++ b/apps/admin-ui/hooks/useColorScheme.web.ts
@@ -0,0 +1,21 @@
+import { useEffect, useState } from 'react';
+import { useColorScheme as useRNColorScheme } from 'react-native';
+
+/**
+ * To support static rendering, this value needs to be re-calculated on the client side for web
+ */
+export function useColorScheme() {
+ const [hasHydrated, setHasHydrated] = useState(false);
+
+ useEffect(() => {
+ setHasHydrated(true);
+ }, []);
+
+ const colorScheme = useRNColorScheme();
+
+ if (hasHydrated) {
+ return colorScheme;
+ }
+
+ return 'light';
+}
diff --git a/apps/admin-ui/hooks/useCurrentUserId.ts b/apps/admin-ui/hooks/useCurrentUserId.ts
new file mode 100755
index 0000000..7f92190
--- /dev/null
+++ b/apps/admin-ui/hooks/useCurrentUserId.ts
@@ -0,0 +1,13 @@
+import React, { useEffect, useState } from 'react';
+import { getCurrentUserId } from '@/utils/getCurrentUserId';
+
+export function useCurrentUserId(): {userId:number|null, refetchUserId: () => void} {
+ const [userId, setUserId] = useState(null);
+ const refetchUserId = React.useCallback(() => {
+ getCurrentUserId().then(setUserId);
+ },[])
+ useEffect(() => {
+ getCurrentUserId().then(setUserId);
+ }, []);
+ return {userId,refetchUserId};
+}
diff --git a/apps/admin-ui/hooks/useHideDrawerHeader.ts b/apps/admin-ui/hooks/useHideDrawerHeader.ts
new file mode 100755
index 0000000..c277ec2
--- /dev/null
+++ b/apps/admin-ui/hooks/useHideDrawerHeader.ts
@@ -0,0 +1,26 @@
+import { useFocusEffect, useNavigation } from "expo-router";
+import React from "react";
+
+
+function useHideDrawerHeader() {
+
+ const navigation = useNavigation();
+ useFocusEffect(() => {
+ let drawerNav = navigation.getParent();
+ const drawerNavList:any = [];
+ // Collect all parent navigators
+ while (drawerNav) {
+ drawerNavList.push(drawerNav);
+ drawerNav = drawerNav.getParent();
+ }
+
+ drawerNavList.at(-3)?.setOptions({ headerShown: false });
+
+ return () => {
+ drawerNavList.at(-3)?.setOptions({ headerShown: true });
+ };
+ });
+ return null;
+}
+
+export default useHideDrawerHeader;
diff --git a/apps/admin-ui/hooks/useJWT.ts b/apps/admin-ui/hooks/useJWT.ts
new file mode 100755
index 0000000..03a9246
--- /dev/null
+++ b/apps/admin-ui/hooks/useJWT.ts
@@ -0,0 +1,49 @@
+// import { StorageService } from '@/lib/StorageService';
+import {StorageService} from 'common-ui';
+
+export const JWT_KEY = 'jwt_token';
+export const ROLES_KEY = 'user_roles';
+export const USER_ID_KEY = 'userId';
+
+export async function saveUserId(userId:string) {
+ await StorageService.setItem(USER_ID_KEY, userId);
+}
+
+export async function getUserId() {
+ return await StorageService.getItem(USER_ID_KEY);
+}
+
+export async function saveJWT(token: string) {
+ await StorageService.setItem(JWT_KEY, token);
+}
+
+export async function getJWT() {
+ return await StorageService.getItem(JWT_KEY);
+}
+
+export async function deleteJWT() {
+ await StorageService.removeItem(JWT_KEY);
+}
+
+export async function saveRoles(roles: string[]) {
+ await StorageService.setItem(ROLES_KEY, JSON.stringify(roles));
+}
+
+export async function getRoles(): Promise {
+ const jwt = await getJWT();
+ if (!jwt) {
+ StorageService.removeItem(ROLES_KEY);
+ return null;
+ }
+ const rolesStr = await StorageService.getItem(ROLES_KEY);
+ if (!rolesStr) return null;
+ try {
+ return JSON.parse(rolesStr);
+ } catch {
+ return null;
+ }
+}
+
+export async function deleteRoles() {
+ await StorageService.removeItem(ROLES_KEY);
+}
diff --git a/apps/admin-ui/hooks/usePhonepeSdk.ts b/apps/admin-ui/hooks/usePhonepeSdk.ts
new file mode 100755
index 0000000..0ba4f0a
--- /dev/null
+++ b/apps/admin-ui/hooks/usePhonepeSdk.ts
@@ -0,0 +1,31 @@
+import { usePhonepeCreds } from '@/api-hooks/payment.api';
+import { useEffect } from 'react';
+import PhonePePaymentSDK from 'react-native-phonepe-pg';
+
+export function usePhonepeSdk() {
+ const { data: creds, isLoading, isError } = usePhonepeCreds();
+
+ useEffect(() => {
+ if (creds && creds.clientId && creds.clientVersion) {
+ PhonePePaymentSDK.init('SANDBOX', creds.clientId, creds.clientId, true);
+ }
+ }, [creds]);
+
+ const startTransaction = async (orderId: string, token: string) => {
+ try {
+ const request = {
+ orderId,
+ token,
+ merchantId: creds?.merchantId,
+ paymentMode: { type: 'PAY_PAGE' }
+ };
+ const stringReq = JSON.stringify(request);
+ const response = await PhonePePaymentSDK.startTransaction(stringReq, null);
+ return response;
+ } catch (error) {
+ throw error;
+ }
+ };
+
+ return { startTransaction, isLoading, isError, creds };
+}
diff --git a/apps/admin-ui/hooks/useThemeColor.ts b/apps/admin-ui/hooks/useThemeColor.ts
new file mode 100755
index 0000000..0608e73
--- /dev/null
+++ b/apps/admin-ui/hooks/useThemeColor.ts
@@ -0,0 +1,21 @@
+/**
+ * Learn more about light and dark modes:
+ * https://docs.expo.dev/guides/color-schemes/
+ */
+
+import { Colors } from '@/constants/Colors';
+import { useColorScheme } from '@/hooks/useColorScheme';
+
+export function useThemeColor(
+ props: { light?: string; dark?: string },
+ colorName: keyof typeof Colors.light & keyof typeof Colors.dark
+) {
+ const theme = useColorScheme() ?? 'light';
+ const colorFromProps = props[theme];
+
+ if (colorFromProps) {
+ return colorFromProps;
+ } else {
+ return Colors[theme][colorName];
+ }
+}
diff --git a/apps/admin-ui/metro.config.js b/apps/admin-ui/metro.config.js
new file mode 100755
index 0000000..f7ac395
--- /dev/null
+++ b/apps/admin-ui/metro.config.js
@@ -0,0 +1,27 @@
+// Learn more on how to setup config for the app: https://docs.expo.dev/guides/config-plugins/#metro-config
+const { getDefaultConfig } = require('expo/metro-config');
+const path = require('path');
+
+// Find the project root and workspace root
+const projectRoot = __dirname;
+const workspaceRoot = path.resolve(projectRoot, '../..'); // Adjust this path as needed
+
+const config = getDefaultConfig(projectRoot);
+
+// 1. Watch all files within the monorepo
+config.watchFolders = [workspaceRoot];
+
+// 2. Let Metro know where to resolve modules from
+config.resolver.nodeModulesPaths = [
+ path.resolve(workspaceRoot, 'node_modules'),
+ path.resolve(projectRoot, 'node_modules'),
+];
+
+// 3. Force Metro to resolve (sub)dependencies only from the top-level `node_modules`
+config.resolver.disableHierarchicalLookup = true;
+
+// 4. Ensure Metro correctly resolves the entry point for expo-router
+// This is crucial for web builds in a monorepo with expo-router
+config.resolver.entryExts = ['js', 'jsx', 'ts', 'tsx', 'mjs', 'cjs'];
+
+module.exports = config;
diff --git a/apps/admin-ui/package.json b/apps/admin-ui/package.json
new file mode 100644
index 0000000..ad57921
--- /dev/null
+++ b/apps/admin-ui/package.json
@@ -0,0 +1,79 @@
+{
+ "name": "admin-ui",
+ "main": "expo-router/entry",
+ "version": "1.0.0",
+ "scripts": {
+ "start": "expo start",
+ "reset-project": "node ./scripts/reset-project.js",
+ "android": "expo run:android",
+ "ios": "expo run:ios",
+ "web": "expo start --web",
+ "lint": "expo lint"
+ },
+ "dependencies": {
+ "@expo/vector-icons": "^14.1.0",
+ "@react-native-community/datetimepicker": "8.4.1",
+ "@react-native-picker/picker": "2.11.1",
+ "@react-navigation/bottom-tabs": "^7.3.10",
+ "@react-navigation/drawer": "^7.3.9",
+ "@react-navigation/elements": "^2.3.8",
+ "@react-navigation/material-top-tabs": "^7.4.11",
+ "@react-navigation/native": "^7.1.6",
+ "@tanstack/react-query": "^5.85.9",
+ "@trpc/client": "^11.6.0",
+ "@trpc/react-query": "^11.6.0",
+ "axios": "^1.11.0",
+ "buffer": "^6.0.3",
+ "dayjs": "^1.11.18",
+ "expo": "~53.0.22",
+ "expo-blur": "~14.1.5",
+ "expo-constants": "~17.1.7",
+ "expo-device": "~7.1.4",
+ "expo-document-picker": "~13.1.6",
+ "expo-font": "~13.3.2",
+ "expo-haptics": "~14.1.4",
+ "expo-image": "~2.4.0",
+ "expo-image-picker": "~16.1.4",
+ "expo-linear-gradient": "~14.1.5",
+ "expo-linking": "~7.1.7",
+ "expo-location": "^19.0.8",
+ "expo-notifications": "~0.31.4",
+ "expo-router": "~5.1.5",
+ "expo-secure-store": "~14.2.4",
+ "expo-splash-screen": "~0.30.10",
+ "expo-status-bar": "~2.2.3",
+ "expo-symbols": "~0.4.5",
+ "expo-system-ui": "~5.0.11",
+ "expo-updates": "~0.28.17",
+ "expo-web-browser": "~14.2.0",
+ "formik": "^2.4.6",
+ "jwt-decode": "^4.0.0",
+ "react": "19.0.0",
+ "react-dom": "19.0.0",
+ "react-hook-form": "^7.62.0",
+ "react-native": "0.79.6",
+ "react-native-draggable-flatlist": "^4.0.3",
+ "react-native-element-dropdown": "^2.12.4",
+ "react-native-gesture-handler": "~2.24.0",
+ "react-native-pager-view": "6.7.1",
+ "react-native-paper": "^5.14.5",
+ "react-native-reanimated": "~3.17.4",
+ "react-native-safe-area-context": "5.4.0",
+ "react-native-screens": "~4.11.1",
+ "react-native-tab-view": "^4.1.3",
+ "react-native-toast-message": "^2.3.3",
+ "react-native-web": "~0.20.0",
+ "react-native-webview": "13.13.5",
+ "twrnc": "^4.9.1",
+ "yup": "^1.7.0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.25.2",
+ "@types/react": "~19.0.10",
+ "@types/react-native-razorpay": "^2.2.6",
+ "eslint": "^9.25.0",
+ "eslint-config-expo": "~9.2.0",
+ "typescript": "~5.8.3"
+ },
+ "private": true
+}
diff --git a/apps/admin-ui/scripts/reset-project.js b/apps/admin-ui/scripts/reset-project.js
new file mode 100755
index 0000000..51dff15
--- /dev/null
+++ b/apps/admin-ui/scripts/reset-project.js
@@ -0,0 +1,112 @@
+#!/usr/bin/env node
+
+/**
+ * This script is used to reset the project to a blank state.
+ * It deletes or moves the /app, /components, /hooks, /scripts, and /constants directories to /app-example based on user input and creates a new /app directory with an index.tsx and _layout.tsx file.
+ * You can remove the `reset-project` script from package.json and safely delete this file after running it.
+ */
+
+const fs = require("fs");
+const path = require("path");
+const readline = require("readline");
+
+const root = process.cwd();
+const oldDirs = ["app", "components", "hooks", "constants", "scripts"];
+const exampleDir = "app-example";
+const newAppDir = "app";
+const exampleDirPath = path.join(root, exampleDir);
+
+const indexContent = `import { Text, View } from "react-native";
+
+export default function Index() {
+ return (
+
+ Edit app/index.tsx to edit this screen.
+
+ );
+}
+`;
+
+const layoutContent = `import { Stack } from "expo-router";
+
+export default function RootLayout() {
+ return ;
+}
+`;
+
+const rl = readline.createInterface({
+ input: process.stdin,
+ output: process.stdout,
+});
+
+const moveDirectories = async (userInput) => {
+ try {
+ if (userInput === "y") {
+ // Create the app-example directory
+ await fs.promises.mkdir(exampleDirPath, { recursive: true });
+ console.log(`📁 /${exampleDir} directory created.`);
+ }
+
+ // Move old directories to new app-example directory or delete them
+ for (const dir of oldDirs) {
+ const oldDirPath = path.join(root, dir);
+ if (fs.existsSync(oldDirPath)) {
+ if (userInput === "y") {
+ const newDirPath = path.join(root, exampleDir, dir);
+ await fs.promises.rename(oldDirPath, newDirPath);
+ console.log(`➡️ /${dir} moved to /${exampleDir}/${dir}.`);
+ } else {
+ await fs.promises.rm(oldDirPath, { recursive: true, force: true });
+ console.log(`❌ /${dir} deleted.`);
+ }
+ } else {
+ console.log(`➡️ /${dir} does not exist, skipping.`);
+ }
+ }
+
+ // Create new /app directory
+ const newAppDirPath = path.join(root, newAppDir);
+ await fs.promises.mkdir(newAppDirPath, { recursive: true });
+ console.log("\n📁 New /app directory created.");
+
+ // Create index.tsx
+ const indexPath = path.join(newAppDirPath, "index.tsx");
+ await fs.promises.writeFile(indexPath, indexContent);
+ console.log("📄 app/index.tsx created.");
+
+ // Create _layout.tsx
+ const layoutPath = path.join(newAppDirPath, "_layout.tsx");
+ await fs.promises.writeFile(layoutPath, layoutContent);
+ console.log("📄 app/_layout.tsx created.");
+
+ console.log("\n✅ Project reset complete. Next steps:");
+ console.log(
+ `1. Run \`npx expo start\` to start a development server.\n2. Edit app/index.tsx to edit the main screen.${
+ userInput === "y"
+ ? `\n3. Delete the /${exampleDir} directory when you're done referencing it.`
+ : ""
+ }`
+ );
+ } catch (error) {
+ console.error(`❌ Error during script execution: ${error.message}`);
+ }
+};
+
+rl.question(
+ "Do you want to move existing files to /app-example instead of deleting them? (Y/n): ",
+ (answer) => {
+ const userInput = answer.trim().toLowerCase() || "y";
+ if (userInput === "y" || userInput === "n") {
+ moveDirectories(userInput).finally(() => rl.close());
+ } else {
+ console.log("❌ Invalid input. Please enter 'Y' or 'N'.");
+ rl.close();
+ }
+ }
+);
diff --git a/apps/admin-ui/services/axios-admin-ui.ts b/apps/admin-ui/services/axios-admin-ui.ts
new file mode 100644
index 0000000..5fac5e4
--- /dev/null
+++ b/apps/admin-ui/services/axios-admin-ui.ts
@@ -0,0 +1,59 @@
+import axiosParent from 'axios';
+import { FORCE_LOGOUT_EVENT } from 'common-ui/src/lib/const-strs';
+import { DeviceEventEmitter } from 'react-native'
+import { getJWT } from '@/hooks/useJWT';
+import { BASE_API_URL } from 'common-ui';
+
+// export const API_BASE_URL = 'http://192.168.100.95:4000'; // Change to your API base URL
+// const API_BASE_URL = 'https://www.technocracy.ovh/mf'; // Change to your API base URL
+// const API_BASE_URL = 'http://10.195.26.42:4000'; // Change to your API base URL
+// const API_BASE_URL = 'http://localhost:4000/api/mobile/'; // Change to your API base URL
+// const API_BASE_URL = 'https://car-safar.com/api/mobile/'; // Change to your API base URL
+
+const axios = axiosParent.create({
+ baseURL: BASE_API_URL + '/api/v1',
+ timeout: 60000,
+ // headers: {
+ // 'Content-Type': 'application/json',
+ // },
+});
+
+
+axios.interceptors.request.use(
+ async (config) => {
+ const token = await getJWT();
+
+ if (token) {
+ config.headers = config.headers || {};
+ config.headers['Authorization'] = `Bearer ${token}`;
+ }
+ return config;
+ },
+ (error) => Promise.reject(error)
+);
+
+axios.interceptors.response.use(
+ (response) => response,
+ (error) => {
+
+ const status = error?.status;
+ const msg = error.response?.data?.error;
+
+ if (status === 401 && msg.startsWith('Access denied')) {
+ // Handle unauthorized access
+ DeviceEventEmitter.emit(FORCE_LOGOUT_EVENT);
+ }
+ const message = error?.response?.data?.error;
+
+ if (msg) {
+ // Optionally, you can attach the message to the error object or throw a new error
+ const err = new Error(msg);
+ // Optionally attach the original error for debugging
+ (err as any).original = error;
+ return Promise.reject(err);
+ }
+ return Promise.reject(error);
+ }
+);
+
+export default axios;
diff --git a/apps/admin-ui/services/notif-service/notif-checker.tsx b/apps/admin-ui/services/notif-service/notif-checker.tsx
new file mode 100755
index 0000000..40cd786
--- /dev/null
+++ b/apps/admin-ui/services/notif-service/notif-checker.tsx
@@ -0,0 +1,71 @@
+import {useAddPushToken, useHasPushToken } from "@/api-hooks/user.api";
+import React from "react";
+import { useNotification } from "./notif-context";
+import { BottomDialog } from "common-ui";
+import { MyText } from "common-ui";
+import { View, Linking } from "react-native";
+import { tw } from "common-ui";
+import { MyButton } from "common-ui";
+import { useAuth } from "@/components/context/auth-context";
+
+interface Props {}
+
+function NotifChecker(props: Props) {
+ const {} = props;
+ const [showPermissionDialog, setShowPermissionDialog] = React.useState(false);
+
+ const {isLoggedIn} = useAuth();
+ const { data: hasPushToken, isLoading, isError } = useHasPushToken({enabled: isLoggedIn});
+ const { mutate: addPushToken } = useAddPushToken();
+ const { notifPermission, expoPushToken } = useNotification();
+ React.useEffect(() => {
+ if(isLoggedIn && !hasPushToken && notifPermission =='granted') {
+ addPushToken(expoPushToken!);
+ }
+ },[isLoggedIn, hasPushToken])
+
+ React.useEffect(() => {
+ if (notifPermission === "denied") {
+ setShowPermissionDialog(true);
+ }
+ }, [notifPermission]);
+
+ return (
+ <>
+ setShowPermissionDialog(false)}
+ >
+
+
+ Notification Permission Denied
+
+
+ It seems you have denied notification permissions. Please enable
+ them in your device settings.
+
+
+ setShowPermissionDialog(false)}
+ style={tw`flex-1`}
+ >
+ Cancel
+
+ {
+ Linking.openSettings();
+ }}
+ style={tw`flex-1`}
+ >
+ Settings
+
+
+
+
+ >
+ );
+}
+
+export default NotifChecker;
diff --git a/apps/admin-ui/services/notif-service/notif-context.tsx b/apps/admin-ui/services/notif-service/notif-context.tsx
new file mode 100755
index 0000000..6998774
--- /dev/null
+++ b/apps/admin-ui/services/notif-service/notif-context.tsx
@@ -0,0 +1,111 @@
+import React, {
+ createContext,
+ useContext,
+ useState,
+ useEffect,
+ useRef,
+ ReactNode,
+} from "react";
+import * as Notifications from "expo-notifications";
+import { registerForPushNotificationsAsync } from "./notif-register";
+import { useRouter } from "expo-router";
+import { NotificationToast } from "../toaster";
+import { NOTIF_PERMISSION_DENIED } from "common-ui/src/lib/const-strs";
+
+interface NotificationContextType {
+ expoPushToken: string | null;
+ notification: Notifications.Notification | null;
+ error: Error | null;
+ notifPermission: 'pending' | 'granted' | 'denied'
+}
+
+export const NotificationContext = createContext<
+ NotificationContextType | undefined
+>(undefined);
+
+export const useNotification = () => {
+ const context = useContext(NotificationContext);
+ if (context === undefined) {
+ throw new Error(
+ "useNotification must be used within a NotificationProvider"
+ );
+ }
+ return context;
+};
+
+interface NotificationProviderProps {
+ children: ReactNode;
+}
+
+export const NotificationProvider: React.FC = ({
+ children,
+}) => {
+ const [expoPushToken, setExpoPushToken] = useState(null);
+ const [notification, setNotification] =
+ useState(null);
+ const [error, setError] = useState(null);
+ const [notifPermission, setNotifPermission] = React.useState("pending");
+
+ const notificationListener = useRef(null);
+ const responseListener = useRef(null);
+ const router = useRouter();
+
+ useEffect(() => {
+ registerForPushNotificationsAsync()
+ .then((token) => {
+ setExpoPushToken(token);
+ setNotifPermission("granted");
+ })
+ .catch((errorRaw) => {
+
+ const err = String(errorRaw).slice(7); //remove the "Error: " string component in beginning
+
+ if (err === NOTIF_PERMISSION_DENIED) {
+ setNotifPermission("denied");
+ }
+ });
+
+ notificationListener.current =
+ Notifications.addNotificationReceivedListener((notification) => {
+ setNotification(notification);
+ // Show a visible toast when app is in foreground
+ const content = notification.request?.content;
+ if (content) {
+ NotificationToast(
+ content.title || "Notification",
+ content.body || "",
+ content.data || {}
+ );
+ }
+ });
+
+ responseListener.current =
+ Notifications.addNotificationResponseReceivedListener((response) => {
+ const data = response.notification.request.content.data;
+ if (data && data.doctorId) {
+ router.push(`/(drawer)/dashboard`);
+ } else if (data && data.tokenId) {
+ router.push(`/(drawer)/dashboard`);
+ }
+ });
+
+ return () => {
+ if (notificationListener.current) {
+ Notifications.removeNotificationSubscription(
+ notificationListener.current
+ );
+ }
+ if (responseListener.current) {
+ Notifications.removeNotificationSubscription(responseListener.current);
+ }
+ };
+ }, []);
+
+ return (
+
+ {children}
+
+ );
+};
diff --git a/apps/admin-ui/services/notif-service/notif-register.ts b/apps/admin-ui/services/notif-service/notif-register.ts
new file mode 100755
index 0000000..dc317f6
--- /dev/null
+++ b/apps/admin-ui/services/notif-service/notif-register.ts
@@ -0,0 +1,51 @@
+import * as Notifications from "expo-notifications";
+import * as Device from "expo-device";
+import Constants from "expo-constants";
+import { Platform } from "react-native";
+import { NOTIF_PERMISSION_DENIED } from "common-ui/src/lib/const-strs";
+
+export async function registerForPushNotificationsAsync() {
+ if (Platform.OS === "android") {
+ await Notifications.setNotificationChannelAsync("default", {
+ name: "default",
+ importance: Notifications.AndroidImportance.MAX,
+ vibrationPattern: [0, 250, 250, 250],
+ lightColor: "#FF231F7C",
+ });
+ }
+
+ if (Device.isDevice) {
+ const { status: existingStatus } =
+ await Notifications.getPermissionsAsync();
+ let finalStatus = existingStatus;
+ if (existingStatus !== "granted") {
+ const { status } = await Notifications.requestPermissionsAsync();
+ finalStatus = status;
+ }
+
+ if (finalStatus !== "granted") {
+ throw new Error(
+ NOTIF_PERMISSION_DENIED
+ );
+ }
+ const projectId =
+ Constants?.expoConfig?.extra?.eas?.projectId ??
+ Constants?.easConfig?.projectId;
+ if (!projectId) {
+ throw new Error("Project ID not found");
+ }
+ try {
+ const pushTokenString = (
+ await Notifications.getExpoPushTokenAsync({
+ projectId,
+ })
+ ).data;
+ console.log(pushTokenString);
+ return pushTokenString;
+ } catch (e: unknown) {
+ throw new Error(`${e}`);
+ }
+ } else {
+ throw new Error("Must use physical device for push notifications");
+ }
+}
\ No newline at end of file
diff --git a/apps/admin-ui/services/toaster.tsx b/apps/admin-ui/services/toaster.tsx
new file mode 100755
index 0000000..55e6697
--- /dev/null
+++ b/apps/admin-ui/services/toaster.tsx
@@ -0,0 +1,57 @@
+import Toast from "react-native-toast-message";
+import React from "react";
+import { useRouter } from "expo-router";
+
+export function InfoToast(message: string) {
+ Toast.show({
+ type: "info",
+ text1: message,
+ position: "top",
+ visibilityTime: 10000,
+ onPress: () => {
+ Toast.hide();
+ },
+ });
+}
+
+export function ErrorToast(message: string) {
+ Toast.show({
+ type: "error",
+ text1: message,
+ position: "top",
+ onPress: () => {
+ Toast.hide();
+ },
+ });
+}
+
+export function SuccessToast(message: string) {
+ Toast.show({
+ type: "success",
+ text1: message,
+ position: "top",
+ onPress: () => {
+ Toast.hide();
+ },
+ });
+}
+
+export function NotificationToast(title: string, subtitle: string, data: any) {
+ const router = useRouter();
+ Toast.show({
+ type: "info",
+ text1: title,
+ text2: subtitle,
+ position: "top",
+ onPress: () => {
+ if (data && data.rideId) {
+ // router.push(`/(drawer)/dashboard/ride-details?id=${data.rideId}`);
+ } else if (data && data.carId) {
+ // router.push(`/(drawer)/my-cars/car-details?id=${data.carId}`);
+ }
+ Toast.hide();
+ },
+ });
+}
+
+export default Toast;
diff --git a/apps/admin-ui/src/api-hooks/banner.api.ts b/apps/admin-ui/src/api-hooks/banner.api.ts
new file mode 100644
index 0000000..70bddb3
--- /dev/null
+++ b/apps/admin-ui/src/api-hooks/banner.api.ts
@@ -0,0 +1,26 @@
+// Types
+export interface Banner {
+ id: number;
+ name: string;
+ imageUrl: string;
+ description?: string;
+ productId?: number;
+ redirectUrl?: string;
+ serialNum: number;
+ isActive: boolean;
+ createdAt: string;
+ lastUpdated: string;
+}
+
+export interface CreateBannerPayload {
+ name: string;
+ imageUrl: string;
+ description?: string;
+ productId?: number;
+ redirectUrl?: string;
+ serialNum: number;
+}
+
+export interface UpdateBannerPayload extends Partial {
+ isActive?: boolean;
+}
\ No newline at end of file
diff --git a/apps/admin-ui/src/api-hooks/product.api.ts b/apps/admin-ui/src/api-hooks/product.api.ts
new file mode 100644
index 0000000..bdb42ed
--- /dev/null
+++ b/apps/admin-ui/src/api-hooks/product.api.ts
@@ -0,0 +1,111 @@
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+import axios from '../../services/axios-admin-ui';
+
+// Types
+export interface CreateProductPayload {
+ name: string;
+ shortDescription?: string;
+ longDescription?: string;
+ unitId: number;
+ storeId: number;
+ price: number;
+ marketPrice?: number;
+ incrementStep?: number;
+ productQuantity?: number;
+ isOutOfStock?: boolean;
+ deals?: {
+ quantity: number;
+ price: number;
+ validTill: string;
+ }[];
+}
+
+export interface UpdateProductPayload {
+ name: string;
+ shortDescription?: string;
+ longDescription?: string;
+ unitId: number;
+ storeId: number;
+ price: number;
+ marketPrice?: number;
+ incrementStep?: number;
+ productQuantity?: number;
+ isOutOfStock?: boolean;
+ deals?: {
+ quantity: number;
+ price: number;
+ validTill: string;
+ }[];
+}
+
+export interface Product {
+ id: number;
+ name: string;
+ shortDescription?: string | null;
+ longDescription?: string;
+ unitId: number;
+ storeId: number;
+ price: number;
+ marketPrice?: number;
+ productQuantity?: number;
+ isOutOfStock?: boolean;
+ images?: string[];
+ createdAt: string;
+ unit?: {
+ id: number;
+ shortNotation: string;
+ fullName: string;
+ };
+ deals?: {
+ id: number;
+ quantity: string;
+ price: string;
+ validTill: string;
+ }[];
+}
+
+export interface CreateProductResponse {
+ product: Product;
+ deals?: any[];
+ message: string;
+}
+
+// API functions
+const createProductApi = async (formData: FormData): Promise => {
+ const response = await axios.post('/av/products', formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+ return response.data;
+};
+
+const updateProductApi = async ({ id, formData }: { id: number; formData: FormData }): Promise => {
+ const response = await axios.put(`/av/products/${id}`, formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+ return response.data;
+};
+
+// Hooks
+export const useCreateProduct = () => {
+ const queryClient = useQueryClient();
+ return useMutation({
+ mutationFn: createProductApi,
+ onSuccess: () => {
+ queryClient.invalidateQueries({ queryKey: ['products'] });
+ },
+ });
+};
+
+export const useUpdateProduct = () => {
+ const queryClient = useQueryClient();
+ return useMutation({
+ mutationFn: updateProductApi,
+ onSuccess: () => {
+ queryClient.invalidateQueries({ queryKey: ['products'] });
+ },
+ });
+};
diff --git a/apps/admin-ui/src/api-hooks/tag.api.ts b/apps/admin-ui/src/api-hooks/tag.api.ts
new file mode 100644
index 0000000..a0cea0b
--- /dev/null
+++ b/apps/admin-ui/src/api-hooks/tag.api.ts
@@ -0,0 +1,116 @@
+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import axios from '../../services/axios-admin-ui';
+
+// Types
+export interface CreateTagPayload {
+ tagName: string;
+ tagDescription?: string;
+ imageUrl?: string;
+ isDashboardTag: boolean;
+}
+
+export interface UpdateTagPayload {
+ tagName: string;
+ tagDescription?: string;
+ imageUrl?: string;
+ isDashboardTag: boolean;
+}
+
+export interface Tag {
+ id: number;
+ tagName: string;
+ tagDescription: string | null;
+ imageUrl: string | null;
+ isDashboardTag: boolean;
+ createdAt?: string;
+}
+
+export interface CreateTagResponse {
+ tag: Tag;
+ message: string;
+}
+
+export interface GetTagsResponse {
+ tags: Tag[];
+ message: string;
+}
+
+// API functions
+const createTagApi = async (formData: FormData): Promise => {
+ const response = await axios.post('/av/product-tags', formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+ return response.data;
+};
+
+const updateTagApi = async ({ id, formData }: { id: number; formData: FormData }): Promise => {
+ const response = await axios.put(`/av/product-tags/${id}`, formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+ return response.data;
+};
+
+const deleteTagApi = async (id: number): Promise<{ message: string }> => {
+ const response = await axios.delete(`/av/product-tags/${id}`);
+ return response.data;
+};
+
+const getTagsApi = async (): Promise => {
+ const response = await axios.get('/av/product-tags');
+ return response.data;
+};
+
+const getTagApi = async (id: number): Promise<{ tag: Tag }> => {
+ const response = await axios.get(`/av/product-tags/${id}`);
+ return response.data;
+};
+
+// Hooks
+export const useCreateTag = () => {
+ const queryClient = useQueryClient();
+ return useMutation({
+ mutationFn: createTagApi,
+ onSuccess: () => {
+ queryClient.invalidateQueries({ queryKey: ['tags'] });
+ },
+ });
+};
+
+export const useUpdateTag = () => {
+ const queryClient = useQueryClient();
+ return useMutation({
+ mutationFn: updateTagApi,
+ onSuccess: () => {
+ queryClient.invalidateQueries({ queryKey: ['tags'] });
+ },
+ });
+};
+
+export const useDeleteTag = () => {
+ const queryClient = useQueryClient();
+ return useMutation({
+ mutationFn: deleteTagApi,
+ onSuccess: () => {
+ queryClient.invalidateQueries({ queryKey: ['tags'] });
+ },
+ });
+};
+
+export const useGetTags = () => {
+ return useQuery({
+ queryKey: ['tags'],
+ queryFn: getTagsApi,
+ });
+};
+
+export const useGetTag = (id: number) => {
+ return useQuery({
+ queryKey: ['tags', id],
+ queryFn: () => getTagApi(id),
+ enabled: !!id,
+ });
+};
\ No newline at end of file
diff --git a/apps/admin-ui/src/components/CouponForm.tsx b/apps/admin-ui/src/components/CouponForm.tsx
new file mode 100644
index 0000000..0568404
--- /dev/null
+++ b/apps/admin-ui/src/components/CouponForm.tsx
@@ -0,0 +1,385 @@
+import React, { useState, useEffect } from 'react';
+import { View, Text, TouchableOpacity, FlatList } from 'react-native';
+import { Formik } from 'formik';
+import * as Yup from 'yup';
+import { MyTextInput, MyButton, tw, AppContainer , DateTimePickerMod, Checkbox, BottomDialog, MyText } from 'common-ui';
+import { trpc } from '../trpc-client';
+
+import { CreateCouponPayload } from 'common-ui/shared-types';
+
+const USERS_PAGE_SIZE = 10;
+
+interface CouponFormProps {
+ onSubmit: (values: CreateCouponPayload & { isReservedCoupon?: boolean }) => void;
+ isLoading: boolean;
+ initialValues?: Partial;
+}
+
+const couponValidationSchema = Yup.object().shape({
+ isReservedCoupon: Yup.boolean().optional(),
+ couponCode: Yup.string()
+ .required('Coupon code is required')
+ .min(3, 'Coupon code must be at least 3 characters')
+ .max(50, 'Coupon code cannot exceed 50 characters')
+ .matches(/^[A-Z0-9_-]+$/, 'Coupon code can only contain uppercase letters, numbers, underscores, and hyphens'),
+ discountPercent: Yup.number()
+ .min(0, 'Must be positive')
+ .max(100, 'Cannot exceed 100%')
+ .optional(),
+ flatDiscount: Yup.number()
+ .min(0, 'Must be positive')
+ .optional(),
+ minOrder: Yup.number().min(0, 'Must be positive').optional(),
+ maxValue: Yup.number().min(0, 'Must be positive').optional(),
+ validTill: Yup.date().optional(),
+ maxLimitForUser: Yup.number().min(1, 'Must be at least 1').optional(),
+ exclusiveApply: Yup.boolean().optional(),
+ isUserBased: Yup.boolean(),
+ isApplyForAll: Yup.boolean(),
+ applicableUsers: Yup.array().of(Yup.number()).optional(),
+}).test('discount-validation', 'Must provide exactly one discount type with valid value', function(value) {
+ const { discountPercent, flatDiscount } = value;
+ const hasPercent = discountPercent !== undefined && discountPercent > 0;
+ const hasFlat = flatDiscount !== undefined && flatDiscount > 0;
+
+ if (hasPercent && hasFlat) {
+ return this.createError({ message: 'Cannot have both percentage and flat discount' });
+ }
+ if (!hasPercent && !hasFlat) {
+ return this.createError({ message: 'Must provide either percentage or flat discount' });
+ }
+ return true;
+});
+
+export default function CouponForm({ onSubmit, isLoading, initialValues }: CouponFormProps) {
+
+ // User dropdown states
+ const [userSearchQuery, setUserSearchQuery] = useState('');
+ const [userOffset, setUserOffset] = useState(0);
+ const [allUsers, setAllUsers] = useState<{ id: number; name: string; mobile: string | null }[]>([]);
+ const [hasMoreUsers, setHasMoreUsers] = useState(true);
+ const [usersDropdownOpen, setUsersDropdownOpen] = useState(false);
+
+ const { data: usersData, isFetching: isFetchingUsers } = trpc.admin.coupon.getUsersMiniInfo.useQuery(
+ { search: userSearchQuery, limit: USERS_PAGE_SIZE, offset: userOffset },
+ { enabled: usersDropdownOpen }
+ );
+
+ useEffect(() => {
+ if (usersData?.users) {
+ if (userOffset === 0) {
+ setAllUsers(usersData.users);
+ } else {
+ setAllUsers(prev => [...prev, ...usersData.users]);
+ }
+ setHasMoreUsers(usersData.users.length === USERS_PAGE_SIZE);
+ }
+ }, [usersData, userOffset]);
+
+ useEffect(() => {
+ setUserOffset(0);
+ setHasMoreUsers(true);
+ }, [userSearchQuery]);
+
+ useEffect(() => {
+ if (usersDropdownOpen) {
+ setUserOffset(0);
+ setAllUsers([]);
+ setHasMoreUsers(true);
+ setUserSearchQuery('');
+ }
+ }, [usersDropdownOpen]);
+
+
+
+ // User search functionality will be inside Formik
+
+ const defaultValues: CreateCouponPayload & { isReservedCoupon?: boolean } = {
+ couponCode: '',
+ isUserBased: false,
+ isApplyForAll: false,
+ targetUsers: [],
+ discountPercent: undefined,
+ flatDiscount: undefined,
+ minOrder: undefined,
+ maxValue: undefined,
+ validTill: undefined,
+ maxLimitForUser: undefined,
+ productIds: undefined,
+ applicableUsers: [],
+ applicableProducts: [],
+ exclusiveApply: false,
+ isReservedCoupon: false,
+ };
+
+ return (
+
+ {({ values, errors, touched, setFieldValue, handleSubmit }) => {
+
+
+ const toggleUserSelection = (userId: number) => {
+ const current = values.applicableUsers || [];
+ const newSelection = current.includes(userId)
+ ? current.filter(id => id !== userId)
+ : [...current, userId];
+ console.log('Toggling user:', userId, 'New selection:', newSelection);
+ setFieldValue('applicableUsers', newSelection);
+ };
+
+ const isReserved = (values as any).isReservedCoupon;
+
+ return (
+
+ {/* Is Reserved Coupon Checkbox */}
+
+ setFieldValue('isReservedCoupon', !(values as any).isReservedCoupon)}
+ />
+ Is Reserved Coupon
+
+
+ {/* Coupon Code */}
+
+ setFieldValue('couponCode', text.toUpperCase())}
+ keyboardType="default"
+ autoCapitalize="characters"
+ error={!!(touched.couponCode && errors.couponCode)}
+ />
+
+
+ {/* Discount Type Selection */}
+
+ Discount Type *
+
+
+
+ {
+ setFieldValue('discountPercent', values.discountPercent || 0);
+ setFieldValue('flatDiscount', undefined);
+ }}
+ style={tw`flex-1 p-3 border rounded-lg mr-2 ${
+ values.discountPercent !== undefined ? 'border-blue-500' : 'border-gray-300'
+ }`}
+ >
+ Percentage
+
+
+ {
+ setFieldValue('flatDiscount', values.flatDiscount || 0);
+ setFieldValue('discountPercent', undefined);
+ }}
+ style={tw`flex-1 p-3 border rounded-lg ${
+ values.flatDiscount !== undefined ? 'border-blue-500' : 'border-gray-300'
+ }`}
+ >
+ Flat Amount
+
+
+
+ {/* Discount Value */}
+ {values.discountPercent !== undefined && (
+
+ setFieldValue('discountPercent', parseFloat(text) || 0)}
+ keyboardType="numeric"
+ error={!!(touched.discountPercent && errors.discountPercent)}
+ />
+
+ )}
+
+ {values.flatDiscount !== undefined && (
+
+ setFieldValue('flatDiscount', parseFloat(text) || 0)}
+ keyboardType="numeric"
+ error={!!(touched.flatDiscount && errors.flatDiscount)}
+ />
+
+ )}
+
+ {/* Minimum Order */}
+
+ setFieldValue('minOrder', parseFloat(text) || undefined)}
+ keyboardType="numeric"
+ error={!!(touched.minOrder && errors.minOrder)}
+ />
+
+
+ {/* Maximum Discount Value */}
+
+ setFieldValue('maxValue', parseFloat(text) || undefined)}
+ keyboardType="numeric"
+ error={!!(touched.maxValue && errors.maxValue)}
+ />
+
+
+ {/* Validity Period */}
+
+ Valid Till
+ {
+
+ setFieldValue('validTill', date?.toISOString())
+ }}
+ />
+
+
+ {/* Usage Limit */}
+
+ setFieldValue('maxLimitForUser', parseInt(text) || undefined)}
+ keyboardType="numeric"
+ error={!!(touched.maxLimitForUser && errors.maxLimitForUser)}
+ />
+
+
+ {/* Exclusive Apply */}
+
+ Exclusive Apply
+ setFieldValue('exclusiveApply', !values.exclusiveApply)}
+ style={tw`flex-row items-center`}
+ >
+
+ {values.exclusiveApply && ✓}
+
+ Exclusive coupon (cannot be combined with other coupons)
+
+
+
+ {/* Target Audience */}
+
+ Target Audience {isReserved ? '(Disabled for Reserved Coupons)' : ''}
+
+
+
+ {
+ setFieldValue('isApplyForAll', true);
+ setFieldValue('isUserBased', false);
+ setFieldValue('targetUsers', []);
+ }}
+ style={tw`flex-1 p-3 border rounded-lg mr-2 ${
+ values.isApplyForAll ? 'border-blue-500' : 'border-gray-300'
+ } ${isReserved ? 'opacity-50' : ''}`}
+ >
+ All Users
+
+
+ {
+ setFieldValue('isUserBased', true);
+ setFieldValue('isApplyForAll', false);
+ }}
+ style={tw`flex-1 p-3 border rounded-lg ${
+ values.isUserBased ? 'border-blue-500' : 'border-gray-300'
+ } ${isReserved ? 'opacity-50' : ''}`}
+ >
+ Specific User
+
+
+
+ {/* Applicable User Selection */}
+
+ Applicable Users (Optional)
+ setUsersDropdownOpen(true)}
+ style={tw`border border-gray-300 rounded p-3 bg-white ${isReserved ? 'opacity-50' : ''}`}
+ >
+
+ {values.applicableUsers?.length ? `${values.applicableUsers.length} users selected` : 'Select users...'}
+
+
+
+
+ setUsersDropdownOpen(false)}>
+
+ Select Applicable Users
+
+ item.id.toString()}
+ renderItem={({ item }) => (
+ toggleUserSelection(item.id)}
+ style={tw`flex-row items-center p-3 border-b border-gray-200`}
+ >
+ toggleUserSelection(item.id)}
+ />
+ {item.mobile} - {item.name}
+
+ )}
+ onEndReached={() => {
+ if (hasMoreUsers && !isFetchingUsers) {
+ setUserOffset(prev => prev + USERS_PAGE_SIZE);
+ }
+ }}
+ onEndReachedThreshold={0.5}
+ ListFooterComponent={isFetchingUsers ? Loading... : null}
+ style={tw`max-h-60`}
+ />
+ setUsersDropdownOpen(false)}
+ style={tw`mt-4 bg-blue-500 p-3 rounded`}
+ >
+ Done
+
+
+
+
+
+
+
+
+ {/* Submit Button */}
+ handleSubmit()}
+ loading={isLoading}
+ disabled={isLoading}
+ >
+ Create Coupon
+
+
+ );
+ }}
+
+ );
+}
\ No newline at end of file
diff --git a/apps/admin-ui/src/components/ProductForm.tsx b/apps/admin-ui/src/components/ProductForm.tsx
new file mode 100644
index 0000000..1502214
--- /dev/null
+++ b/apps/admin-ui/src/components/ProductForm.tsx
@@ -0,0 +1,374 @@
+import React, { useState, useEffect, useCallback, forwardRef, useImperativeHandle } from 'react';
+import { View, TouchableOpacity } from 'react-native';
+import { Image } from 'expo-image';
+import { Formik, FieldArray } from 'formik';
+import * as Yup from 'yup';
+import { MyTextInput, BottomDropdown, MyText, ImageUploader, ImageGalleryWithDelete, useTheme, DatePicker, tw, useFocusCallback, Checkbox } from 'common-ui';
+import usePickImage from 'common-ui/src/components/use-pick-image';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { trpc } from '../trpc-client';
+import { useGetTags } from '../api-hooks/tag.api';
+
+interface ProductFormData {
+ name: string;
+ shortDescription: string;
+ longDescription: string;
+ unitId: number;
+ storeId: number;
+ price: string;
+ marketPrice: string;
+ isSuspended: boolean;
+ isFlashAvailable: boolean;
+ flashPrice: string;
+ deals: Deal[];
+ tagIds: number[];
+ productQuantity: number;
+}
+
+interface Deal {
+ quantity: string;
+ price: string;
+ validTill: Date | null;
+}
+
+export interface ProductFormRef {
+ clearImages: () => void;
+}
+
+interface ProductFormProps {
+ mode: 'create' | 'edit';
+ initialValues: ProductFormData;
+ onSubmit: (values: ProductFormData, images?: { uri?: string }[], imagesToDelete?: string[]) => void;
+ isLoading: boolean;
+ existingImages?: string[];
+}
+
+const unitOptions = [
+ { label: 'Kg', value: 1 },
+ { label: 'Litre', value: 2 },
+ { label: 'Dozen', value: 3 },
+ { label: 'Unit Piece', value: 4 },
+];
+
+
+
+const ProductForm = forwardRef(({
+ mode,
+ initialValues,
+ onSubmit,
+ isLoading,
+ existingImages = []
+}, ref) => {
+ const { theme } = useTheme();
+ const [images, setImages] = useState<{ uri?: string }[]>([]);
+ const [existingImagesState, setExistingImagesState] = useState(existingImages);
+
+ const { data: storesData } = trpc.common.getStoresSummary.useQuery();
+ const storeOptions = storesData?.stores.map(store => ({
+ label: store.name,
+ value: store.id,
+ })) || [];
+
+ const { data: tagsData } = useGetTags();
+ const tagOptions = tagsData?.tags.map(tag => ({
+ label: tag.tagName,
+ value: tag.id.toString(),
+ })) || [];
+
+ // Initialize existing images state when existingImages prop changes
+ useEffect(() => {
+ console.log('changing existing imaes statte')
+
+ setExistingImagesState(existingImages);
+ }, [existingImages]);
+
+ const pickImage = usePickImage({
+ setFile: (files) => setImages(prev => [...prev, ...files]),
+ multiple: true,
+ });
+
+ // Calculate which existing images were deleted
+ const deletedImages = existingImages.filter(img => !existingImagesState.includes(img));
+
+ return (
+ onSubmit(values, images, deletedImages)}
+ enableReinitialize
+ >
+ {({ handleChange, handleSubmit, values, setFieldValue, resetForm }) => {
+ // Clear form when screen comes into focus
+ const clearForm = useCallback(() => {
+ setImages([]);
+ setExistingImagesState([]);
+ resetForm();
+ }, [resetForm]);
+
+ useFocusCallback(clearForm);
+
+ // Update ref with current clearForm function
+ useImperativeHandle(ref, () => ({
+ clearImages: clearForm,
+ }), [clearForm]);
+
+ const submit = () => handleSubmit();
+
+ return (
+
+
+
+
+
+ {mode === 'create' && (
+ setImages(prev => prev.filter(img => img.uri !== uri))}
+ />
+ )}
+
+ {mode === 'edit' && existingImagesState.length > 0 && (
+
+ Current Images
+
+
+ )}
+
+ {mode === 'edit' && (
+
+ Add New Images
+ setImages(prev => prev.filter(img => img.uri !== uri))}
+ />
+
+ )}
+
+ handleChange('unitId')(value+'')}
+ onValueChange={(value) => setFieldValue('unitId', value)}
+ placeholder="Select unit"
+ style={{ marginBottom: 16 }}
+ />
+ {
+ // if(text)
+ // setFieldValue('productQuantity', text);
+ // else
+ setFieldValue('productQuantity', text);
+ // if (text === '' || text === null || text === undefined) {
+ // setFieldValue('productQuantity', 1);
+ // } else {
+ // const num = parseFloat(text);
+ // setFieldValue('productQuantity', isNaN(num) ? 1 : num);
+ // }
+ }}
+ style={{ marginBottom: 16 }}
+ />
+ setFieldValue('storeId', value)}
+ placeholder="Select store"
+ style={{ marginBottom: 16 }}
+ />
+ id.toString())}
+ options={tagOptions}
+ onValueChange={(value) => setFieldValue('tagIds', (value as string[]).map(id => parseInt(id)))}
+ multiple={true}
+ placeholder="Select tags"
+ style={{ marginBottom: 16 }}
+ />
+
+
+
+
+
+
+ setFieldValue('isSuspended', !values.isSuspended)}
+ style={tw`mr-3`}
+ />
+ Suspend Product
+
+
+
+ {
+ setFieldValue('isFlashAvailable', !values.isFlashAvailable);
+ if (values.isFlashAvailable) setFieldValue('flashPrice', ''); // Clear price when disabled
+ }}
+ style={tw`mr-3`}
+ />
+ Flash Available
+
+
+ {values.isFlashAvailable && (
+
+ )}
+
+ {/*
+ {({ push, remove, form }) => (
+
+
+
+
+ Special Package Deals
+
+ (Optional)
+
+ {(form.values.deals || []).map((deal: any, index: number) => (
+
+
+
+
+
+
+
+
+
+
+
+
+ form.setFieldValue(`deals.${index}.validTill`, date)}
+ showLabel={true}
+ placeholder="Valid Till"
+ />
+
+
+ remove(index)}
+ style={tw`bg-red-500 p-3 rounded-lg shadow-md flex-row items-center justify-center`}
+ >
+
+ Remove
+
+
+
+
+
+ ))}
+
+ {(form.values.deals || []).length === 0 && (
+
+
+
+ No package deals added yet
+
+
+ Add special pricing for bulk purchases
+
+
+ )}
+
+ push({ quantity: '', price: '', validTill: null })}
+ style={tw`bg-green-500 px-4 py-2 rounded-lg shadow-lg flex-row items-center justify-center mt-4`}
+ >
+
+ Add Package Deal
+
+
+ )}
+ */}
+
+
+
+ {isLoading ? (mode === 'create' ? 'Creating...' : 'Updating...') : (mode === 'create' ? 'Create Product' : 'Update Product')}
+
+
+
+ );
+ }}
+
+ );
+});
+
+ProductForm.displayName = 'ProductForm';
+
+export default ProductForm;
\ No newline at end of file
diff --git a/apps/admin-ui/src/components/TagForm.tsx b/apps/admin-ui/src/components/TagForm.tsx
new file mode 100644
index 0000000..b35a9ad
--- /dev/null
+++ b/apps/admin-ui/src/components/TagForm.tsx
@@ -0,0 +1,141 @@
+import React, { useState, useEffect, forwardRef, useCallback } from 'react';
+import { View, TouchableOpacity } from 'react-native';
+import { Image } from 'expo-image';
+import { Formik } from 'formik';
+import * as Yup from 'yup';
+import { MyTextInput, MyText, Checkbox, ImageUploader, tw, useFocusCallback } from 'common-ui';
+import usePickImage from 'common-ui/src/components/use-pick-image';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+
+interface TagFormData {
+ tagName: string;
+ tagDescription: string;
+ isDashboardTag: boolean;
+}
+
+interface TagFormProps {
+ mode: 'create' | 'edit';
+ initialValues: TagFormData;
+ existingImageUrl?: string;
+ onSubmit: (values: TagFormData, image?: { uri?: string }) => void;
+ isLoading: boolean;
+}
+
+const TagForm = forwardRef(({
+ mode,
+ initialValues,
+ existingImageUrl = '',
+ onSubmit,
+ isLoading,
+}, ref) => {
+ const [image, setImage] = useState<{ uri?: string } | null>(null);
+ const [isDashboardTagChecked, setIsDashboardTagChecked] = useState(Boolean(initialValues.isDashboardTag));
+
+ // Update checkbox when initial values change
+ useEffect(() => {
+ setIsDashboardTagChecked(Boolean(initialValues.isDashboardTag));
+ existingImageUrl && setImage({uri:existingImageUrl})
+ }, [initialValues.isDashboardTag]);
+
+ const pickImage = usePickImage({
+ setFile: (files) => {
+
+ setImage(files || null)
+ },
+ multiple: false,
+ });
+
+
+ const validationSchema = Yup.object().shape({
+ tagName: Yup.string()
+ .required('Tag name is required')
+ .min(1, 'Tag name must be at least 1 character')
+ .max(100, 'Tag name must be less than 100 characters'),
+ tagDescription: Yup.string()
+ .max(500, 'Description must be less than 500 characters'),
+ });
+
+ return (
+ onSubmit(values, image || undefined)}
+ enableReinitialize
+ >
+ {({ handleChange, handleSubmit, values, setFieldValue, errors, touched, setFieldValue: formikSetFieldValue, resetForm }) => {
+ // Clear form when screen comes into focus
+ const clearForm = useCallback(() => {
+ setImage(null);
+
+ setIsDashboardTagChecked(false);
+ resetForm();
+ }, [resetForm]);
+
+ useFocusCallback(clearForm);
+
+ return (
+
+
+
+
+
+ {/* Image Upload Section */}
+
+
+ Tag Image {mode === 'edit' ? '(Upload new to replace)' : '(Optional)'}
+
+
+
+ setImage(null)}
+ />
+
+
+ {/* Dashboard Tag Checkbox */}
+
+ {
+ const newValue = !isDashboardTagChecked;
+ setIsDashboardTagChecked(newValue);
+ formikSetFieldValue('isDashboardTag', newValue);
+ }}
+ />
+ Mark as Dashboard Tag
+
+
+ handleSubmit()}
+ disabled={isLoading}
+ style={tw`px-4 py-3 rounded-lg shadow-lg items-center ${isLoading ? 'bg-gray-400' : 'bg-blue-500'}`}
+ >
+
+ {isLoading ? (mode === 'create' ? 'Creating...' : 'Updating...') : (mode === 'create' ? 'Create Tag' : 'Update Tag')}
+
+
+
+ );
+ }}
+
+ );
+});
+
+TagForm.displayName = 'TagForm';
+
+export default TagForm;
\ No newline at end of file
diff --git a/apps/admin-ui/src/components/TagMenu.tsx b/apps/admin-ui/src/components/TagMenu.tsx
new file mode 100644
index 0000000..197d917
--- /dev/null
+++ b/apps/admin-ui/src/components/TagMenu.tsx
@@ -0,0 +1,119 @@
+import React, { useState } from 'react';
+import { View, TouchableOpacity, Alert } from 'react-native';
+import { Entypo } from '@expo/vector-icons';
+import { MyText, tw, BottomDialog } from 'common-ui';
+import { useRouter } from 'expo-router';
+import { useDeleteTag } from '../api-hooks/tag.api';
+
+export interface TagMenuProps {
+ tagId: number;
+ onDeleteSuccess?: () => void;
+ triggerStyle?: any;
+ iconSize?: number;
+ iconColor?: string;
+}
+
+export const TagMenu: React.FC = ({
+ tagId,
+ onDeleteSuccess,
+ triggerStyle = tw`p-2 rounded-full bg-gray-50`,
+ iconSize = 16,
+ iconColor = '#6B7280',
+}) => {
+ const [isOpen, setIsOpen] = useState(false);
+ const router = useRouter();
+ const { mutate: deleteTag, isPending: isDeleting } = useDeleteTag();
+
+ const handleOpenMenu = () => {
+ setIsOpen(true);
+ };
+
+ const handleCloseMenu = () => {
+ setIsOpen(false);
+ };
+
+ const handleEditTag = () => {
+ setIsOpen(false);
+ router.push(`/(drawer)/edit-tag?tagId=${tagId}`);
+ };
+
+ const handleDeleteTag = () => {
+ setIsOpen(false);
+ Alert.alert(
+ 'Delete Tag',
+ 'Are you sure you want to delete this tag? This action cannot be undone.',
+ [
+ { text: 'Cancel', style: 'cancel' },
+ {
+ text: 'Delete',
+ style: 'destructive',
+ onPress: () => performDelete(),
+ }
+ ]
+ );
+ };
+
+ const performDelete = () => {
+ deleteTag(tagId, {
+ onSuccess: () => {
+ Alert.alert('Success', 'Tag deleted successfully');
+ onDeleteSuccess?.();
+ },
+ onError: (error: any) => {
+ const errorMessage = error.message || 'Failed to delete tag';
+ Alert.alert('Error', errorMessage);
+ },
+ });
+ };
+
+ const options = [
+ {
+ title: 'Edit Tag',
+ icon: 'edit' as keyof typeof Entypo.glyphMap,
+ onPress: handleEditTag,
+ },
+ {
+ title: 'Delete Tag',
+ icon: 'trash' as keyof typeof Entypo.glyphMap,
+ onPress: handleDeleteTag,
+ },
+ ];
+
+ return (
+ <>
+ {/* Menu Trigger */}
+
+
+
+
+ {/* Menu Dialog */}
+
+
+
+ Tag Options
+
+
+ {options.map((option, index) => (
+
+
+
+ {option.title}
+
+
+ ))}
+
+
+ >
+ );
+};
\ No newline at end of file
diff --git a/apps/admin-ui/src/trpc-client.ts b/apps/admin-ui/src/trpc-client.ts
new file mode 100644
index 0000000..de7535a
--- /dev/null
+++ b/apps/admin-ui/src/trpc-client.ts
@@ -0,0 +1,37 @@
+import { createTRPCProxyClient, httpBatchLink, TRPCClientError } from '@trpc/client';
+import { createTRPCReact } from '@trpc/react-query';
+import {AppRouter} from '../../backend/src/trpc/router'
+import { BASE_API_URL } from 'common-ui';
+import { getJWT } from '@/hooks/useJWT';
+import { FORCE_LOGOUT_EVENT } from 'common-ui/src/lib/const-strs';
+import { DeviceEventEmitter } from 'react-native';
+
+// Create tRPC React hooks without strict typing for now
+export const trpc = createTRPCReact();
+
+// Create tRPC client for direct usage
+export const trpcClient = createTRPCProxyClient({
+ links: [
+ httpBatchLink({
+ url: BASE_API_URL+'/api/trpc',
+ headers: async () => {
+ const token = await getJWT();
+ return token ? { Authorization: `Bearer ${token}` } : {};
+ },
+ fetch: async (url, options) => {
+ const response = await fetch(url, options);
+ if (response.status === 401) {
+ const data = await response.clone().json().catch(() => ({}));
+ let code = '';
+ if(data[0]?.error || data?.error) {
+ code = data[0]?.error?.message || data?.error?.message
+ }
+ if (code === 'UNAUTHORIZED') {
+ DeviceEventEmitter.emit(FORCE_LOGOUT_EVENT);
+ }
+ }
+ return response;
+ },
+ }),
+ ],
+});
\ No newline at end of file
diff --git a/apps/admin-ui/tsconfig.json b/apps/admin-ui/tsconfig.json
new file mode 100755
index 0000000..95f05c9
--- /dev/null
+++ b/apps/admin-ui/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "extends": "expo/tsconfig.base",
+ "compilerOptions": {
+ "strict": true,
+ "paths": {
+ "@/*": [
+ "./*"
+ ],
+ "shared-types": ["../shared-types"],
+ "common-ui": ["../../packages/ui"],
+ "common-ui/*": ["../../packages/ui/*"]
+ },
+ "moduleSuffixes": [".ios", ".android", ".native", ".web", ""]
+ },
+ "include": [
+ "**/*.ts",
+ "**/*.tsx",
+ ".expo/types/**/*.ts",
+ "expo-env.d.ts"
+ ]
+}
diff --git a/apps/admin-ui/utils/getCurrentUserId.ts b/apps/admin-ui/utils/getCurrentUserId.ts
new file mode 100755
index 0000000..d2a8af4
--- /dev/null
+++ b/apps/admin-ui/utils/getCurrentUserId.ts
@@ -0,0 +1,14 @@
+import {jwtDecode} from 'jwt-decode';
+import { getJWT } from '@/hooks/useJWT';
+
+export async function getCurrentUserId(): Promise {
+ const token = await getJWT();
+ if (!token) return null;
+ try {
+ const decoded: any = jwtDecode(token);
+ // Adjust this if your JWT uses a different field for user id
+ return decoded.id || decoded.userId || null;
+ } catch {
+ return null;
+ }
+}
diff --git a/apps/admin-ui/utils/queryClient.ts b/apps/admin-ui/utils/queryClient.ts
new file mode 100755
index 0000000..c725dcf
--- /dev/null
+++ b/apps/admin-ui/utils/queryClient.ts
@@ -0,0 +1,10 @@
+import { QueryClient } from '@tanstack/react-query';
+
+const queryClient = new QueryClient({
+ defaultOptions: {
+ queries: {
+ retry: 3,
+ }
+ }
+});
+export default queryClient;
diff --git a/apps/admin-ui/withPhonepe.js b/apps/admin-ui/withPhonepe.js
new file mode 100755
index 0000000..a678b70
--- /dev/null
+++ b/apps/admin-ui/withPhonepe.js
@@ -0,0 +1,28 @@
+const { withProjectBuildGradle } = require("@expo/config-plugins");
+
+const withPhonePeRepository = (config) => {
+ return withProjectBuildGradle(config, (mod) => {
+ // Check if the maven repository already exists to prevent duplicates
+ if (
+ mod.modResults.contents.includes(
+ "https://phonepe.mycloudrepo.io/public/repositories/phonepe-intentsdk-android"
+ )
+ ) {
+ return mod;
+ }
+
+ // Use a regular expression to find the allprojects repositories block
+ const allprojectsRegex = /allprojects\s*\{\s*repositories\s*\{/s;
+
+ mod.modResults.contents = mod.modResults.contents.replace(
+ allprojectsRegex,
+ (match) => {
+ return `${match}\n maven { url "https://phonepe.mycloudrepo.io/public/repositories/phonepe-intentsdk-android" }`;
+ }
+ );
+
+ return mod;
+ });
+};
+
+module.exports = withPhonePeRepository;
diff --git a/apps/backend/.dockerignore b/apps/backend/.dockerignore
new file mode 100755
index 0000000..e61f512
--- /dev/null
+++ b/apps/backend/.dockerignore
@@ -0,0 +1,19 @@
+node_modules
+npm-debug.log
+.git
+.gitignore
+README.md
+.env
+.nyc_output
+coverage
+.nyc_output
+.coverage
+.vscode
+.DS_Store
+logs
+*.log
+dist
+build
+*.md
+docker-compose.yml
+docker-compose.yaml
\ No newline at end of file
diff --git a/apps/backend/.env b/apps/backend/.env
new file mode 100755
index 0000000..c9f78c2
--- /dev/null
+++ b/apps/backend/.env
@@ -0,0 +1,31 @@
+
+# DATABASE_URL=postgresql://postgres:postgres_shafi_password@57.128.212.174:6432/meatfarmer #technocracy
+DATABASE_URL=postgres://postgres:postgres_shafi_password@5.223.55.14:6432/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
+# REDIS_URL=redis://default:redis_shafi_password@57.128.212.174:6379
+REDIS_URL=redis://default:redis_shafi_password@5.223.55.14: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
\ No newline at end of file
diff --git a/apps/backend/.env.example b/apps/backend/.env.example
new file mode 100755
index 0000000..28aca25
--- /dev/null
+++ b/apps/backend/.env.example
@@ -0,0 +1,22 @@
+# Database
+DATABASE_URL=postgres://postgres:h3alth_p3tal_db_p@ssw0rd@localhost:5432/health_petal
+
+# JWT
+JWT_SECRET=your-super-secret-jwt-key
+
+# AWS S3 (for profile pictures and hospital images)
+S3_ACCESS_KEY_ID=your-s3-access-key
+S3_SECRET_ACCESS_KEY=your-s3-secret-key
+S3_BUCKET_NAME=your-s3-bucket-name
+S3_REGION=your-s3-region
+S3_URL=your-s3-url
+
+# Expo (for push notifications)
+EXPO_ACCESS_TOKEN=your-expo-access-token
+
+# PhonePe Payment Gateway
+PHONE_PE_BASE_URL=https://api-preprod.phonepe.com/
+PHONE_PE_CLIENT_ID=your-phonepe-client-id
+PHONE_PE_CLIENT_VERSION=1
+PHONE_PE_CLIENT_SECRET=your-phonepe-client-secret
+PHONE_PE_MERCHANT_ID=your-phonepe-merchant-id
\ No newline at end of file
diff --git a/apps/backend/Dockerfile b/apps/backend/Dockerfile
new file mode 100755
index 0000000..fce5fd9
--- /dev/null
+++ b/apps/backend/Dockerfile
@@ -0,0 +1,70 @@
+# Dockerfile for backend service
+
+# 1. ---- Base Node image
+FROM node:20-slim AS base
+WORKDIR /app
+
+# 2. ---- Pruner ----
+# This stage creates a pruned version of the monorepo that only contains
+# the files and dependencies required to build the 'backend' and 'admin-ui' services.
+FROM base AS pruner
+WORKDIR /app
+# Install turbo globally
+RUN npm install -g turbo
+# Copy all files from the context
+COPY . .
+# Prune the monorepo for the 'backend' and 'admin-ui' scopes
+RUN turbo prune --scope=backend --scope=admin-ui --docker --scope=common-ui
+
+# 3. ---- Builder ----
+# This stage builds both the backend application and the admin-ui using the pruned files.
+FROM base AS builder
+WORKDIR /app
+
+# Copy the pruned source files, package.json files, and lockfile
+# to create a stand-alone build environment.
+COPY --from=pruner /app/out/full/ .
+COPY --from=pruner /app/out/json/ .
+COPY --from=pruner /app/out/package-lock.json .
+COPY --from=pruner /app/turbo.json .
+
+# Install all dependencies (including dev) to build the applications
+RUN npm install
+
+# Build the backend application
+RUN npx turbo build --filter=backend...
+
+# Build the admin-ui for web
+WORKDIR /app/apps/admin-ui
+RUN npx expo export --platform web --output-dir web-build
+# Return to the root for the next stage
+WORKDIR /app
+
+# 4. ---- Runner ----
+# This is the final, lean production image.
+FROM base AS runner
+WORKDIR /app
+
+# Set NODE_ENV to production
+ENV NODE_ENV=production
+
+# Copy pruned package files and install only production dependencies
+# The pruned output in /app/out/json contains the package.json files
+# in their original directory structure.
+COPY --from=pruner /app/out/json/ .
+COPY --from=pruner /app/out/package-lock.json ./package-lock.json
+RUN npm ci --production
+
+# Copy the built application from the builder stage
+# The builder stage contains the entire pruned monorepo with build artifacts.
+# We only copy the necessary built files.
+COPY --from=builder /app/apps/backend/dist ./apps/backend/dist
+
+# Copy the built admin-ui web files
+COPY --from=builder /app/apps/admin-ui/web-build ./apps/backend/public/admin-ui-web
+
+# The application in apps/backend/index.ts listens on port 4000
+EXPOSE 4000
+
+# The command to start the backend service
+CMD ["node", "apps/backend/dist/index.js"]
diff --git a/apps/backend/README.md b/apps/backend/README.md
new file mode 100755
index 0000000..f032dc0
--- /dev/null
+++ b/apps/backend/README.md
@@ -0,0 +1,97 @@
+# Health Petal Database
+
+This project contains the database schema, seed data, and related tools for the Health Petal application.
+
+## Setup
+
+1. Make sure PostgreSQL is installed and running on your machine
+2. Create a database named `health_petal`
+3. Configure your `.env` file with the correct database credentials (or use the default ones)
+
+## Database Schema
+
+The database schema includes the following tables:
+- profiles (users)
+- role_info
+- user_roles
+- hospital
+- specializations
+- hospital_specializations
+- hospital_employees
+- doctor_info
+- doctor_specializations
+- doctor_secretaries
+- doctor_availability
+- token_info
+- running_counter
+
+## Available Commands
+
+- `npm run migrate` - Generate SQL migration files
+- `npm run db:push` - Push schema changes to the database
+- `npm run db:seed` - Seed the database with mock data
+- `npm run docker:build` - Build Docker image for the backend
+
+## Getting Started
+
+1. First, install dependencies:
+ ```
+ npm install
+ ```
+
+2. Set up the database:
+ ```
+ # Create a PostgreSQL database
+ createdb health_petal
+
+ # Generate and push the schema
+ npm run migrate
+ npm run db:push
+
+ # Seed the database with test data
+ npm run db:seed
+ ```
+
+3. Verify the data:
+ ```sql
+ -- Connect to the database
+ psql health_petal
+
+ -- Check the tables
+ \dt
+
+ -- Check users
+ SELECT * FROM profiles;
+
+ -- Check doctors
+ SELECT p.name, p.email, d.qualifications, d.daily_token_count
+ FROM doctor_info d
+ JOIN profiles p ON d.user_id = p.id;
+
+ -- Check doctor specializations
+ SELECT p.name, s.name as specialization
+ FROM doctor_specializations ds
+ JOIN doctor_info d ON ds.doctor_id = d.id
+ JOIN profiles p ON d.user_id = p.id
+ JOIN specializations s ON ds.specialization_id = s.id;
+ ```
+
+## Docker
+
+This project includes Docker support for easy deployment:
+
+1. Build the Docker image:
+ ```
+ npm run docker:build
+ ```
+
+2. Run with Docker Compose (includes PostgreSQL database):
+ ```
+ docker-compose up -d
+ ```
+
+The Docker Compose setup includes:
+- PostgreSQL database with the correct schema
+- Backend application with all environment variables configured
+
+Note: For production deployment, make sure to update the environment variables in docker-compose.yml with your actual values.
diff --git a/apps/backend/assets/demo.txt b/apps/backend/assets/demo.txt
new file mode 100755
index 0000000..5d1cdef
--- /dev/null
+++ b/apps/backend/assets/demo.txt
@@ -0,0 +1,6 @@
+I have a mobile app meant for online shopping. People can shop for meat, fruits and dry fruits.
+my major colors are #F83758 and #fff0f6. I want just an info web site. I want the website
+to tell people that we sell the trust of local and the convenience of online. I want to highlight
+the process of selling. the steps are Find products, select a delivery slot, and get order delivered
+I want the site to be a jolly and fun theme one baked primarily in the colors I've given. Make
+it a node js app with pug and a statically rendered home page.
\ No newline at end of file
diff --git a/apps/backend/assets/farm2door-logo.png b/apps/backend/assets/farm2door-logo.png
new file mode 100644
index 0000000..95f9b8b
Binary files /dev/null and b/apps/backend/assets/farm2door-logo.png differ
diff --git a/apps/backend/assets/signed-url-cache.json b/apps/backend/assets/signed-url-cache.json
new file mode 100644
index 0000000..f7830f5
--- /dev/null
+++ b/apps/backend/assets/signed-url-cache.json
@@ -0,0 +1 @@
+{"originalToSigned":{},"signedToOriginal":{}}
\ No newline at end of file
diff --git a/apps/backend/docker-compose.yml b/apps/backend/docker-compose.yml
new file mode 100755
index 0000000..c99e65e
--- /dev/null
+++ b/apps/backend/docker-compose.yml
@@ -0,0 +1,45 @@
+version: '3.8'
+
+services:
+ db:
+ image: postgres:15
+ container_name: health_petal_db
+ restart: always
+ environment:
+ POSTGRES_DB: health_petal
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: h3alth_p3tal_db_p@ssw0rd
+ ports:
+ - "5432:5432"
+ volumes:
+ - postgres_data:/var/lib/postgresql/data
+
+ backend:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ container_name: health_petal_backend
+ restart: always
+ ports:
+ - "4000:4000"
+ environment:
+ - DATABASE_URL=postgres://postgres:h3alth_p3tal_db_p@ssw0rd@db:5432/health_petal
+ - JWT_SECRET=your-jwt-secret-here
+ - S3_ACCESS_KEY_ID=d94e2444086b740afa411a95a6d1abffe08dc69c
+ - S3_SECRET_ACCESS_KEY=VA5pi0NrnST7OG+zCqJIhSrhdRHwanFA+saJO5QoebQ=
+ - S3_BUCKET_NAME=health-petal
+ - S3_REGION=ap-hyderabad-1
+ - S3_URL=https://axwzpqa4dwjl.compat.objectstorage.ap-hyderabad-1.oraclecloud.com/
+ - EXPO_ACCESS_TOKEN=your-expo-access-token
+ - 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
+ depends_on:
+ - db
+ volumes:
+ - ./logs:/app/logs
+
+volumes:
+ postgres_data:
\ No newline at end of file
diff --git a/apps/backend/drizzle.config.ts b/apps/backend/drizzle.config.ts
new file mode 100755
index 0000000..0b5c1c9
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0000_colorful_tinkerer.sql b/apps/backend/drizzle/0000_colorful_tinkerer.sql
new file mode 100644
index 0000000..49fc610
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0001_busy_titania.sql b/apps/backend/drizzle/0001_busy_titania.sql
new file mode 100644
index 0000000..6d2f646
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0002_wandering_lifeguard.sql b/apps/backend/drizzle/0002_wandering_lifeguard.sql
new file mode 100644
index 0000000..e5b41f7
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0003_tricky_the_twelve.sql b/apps/backend/drizzle/0003_tricky_the_twelve.sql
new file mode 100644
index 0000000..986274b
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0004_lively_diamondback.sql b/apps/backend/drizzle/0004_lively_diamondback.sql
new file mode 100644
index 0000000..aeaf5c3
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0005_tricky_warhawk.sql b/apps/backend/drizzle/0005_tricky_warhawk.sql
new file mode 100644
index 0000000..0ae296b
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0006_outstanding_joystick.sql b/apps/backend/drizzle/0006_outstanding_joystick.sql
new file mode 100644
index 0000000..9c764dc
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0007_yellow_charles_xavier.sql b/apps/backend/drizzle/0007_yellow_charles_xavier.sql
new file mode 100644
index 0000000..4847280
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0008_nasty_mathemanic.sql b/apps/backend/drizzle/0008_nasty_mathemanic.sql
new file mode 100644
index 0000000..5bd2f03
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0009_peaceful_victor_mancha.sql b/apps/backend/drizzle/0009_peaceful_victor_mancha.sql
new file mode 100644
index 0000000..c0cb3f4
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0010_flimsy_reavers.sql b/apps/backend/drizzle/0010_flimsy_reavers.sql
new file mode 100644
index 0000000..dcef34c
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0011_watery_lady_mastermind.sql b/apps/backend/drizzle/0011_watery_lady_mastermind.sql
new file mode 100644
index 0000000..49f3b04
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0012_flawless_jubilee.sql b/apps/backend/drizzle/0012_flawless_jubilee.sql
new file mode 100644
index 0000000..f4fb56d
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0013_married_celestials.sql b/apps/backend/drizzle/0013_married_celestials.sql
new file mode 100644
index 0000000..0844f4f
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0014_blushing_switch.sql b/apps/backend/drizzle/0014_blushing_switch.sql
new file mode 100644
index 0000000..390e55b
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0015_sloppy_boomerang.sql b/apps/backend/drizzle/0015_sloppy_boomerang.sql
new file mode 100644
index 0000000..5def26e
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0016_eminent_thunderbolt_ross.sql b/apps/backend/drizzle/0016_eminent_thunderbolt_ross.sql
new file mode 100644
index 0000000..41056da
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0017_steady_moira_mactaggert.sql b/apps/backend/drizzle/0017_steady_moira_mactaggert.sql
new file mode 100644
index 0000000..c4b644c
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0018_simple_tomorrow_man.sql b/apps/backend/drizzle/0018_simple_tomorrow_man.sql
new file mode 100644
index 0000000..47e5e68
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0019_productive_mulholland_black.sql b/apps/backend/drizzle/0019_productive_mulholland_black.sql
new file mode 100644
index 0000000..4b6b5ef
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0020_narrow_charles_xavier.sql b/apps/backend/drizzle/0020_narrow_charles_xavier.sql
new file mode 100644
index 0000000..721e7bb
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0021_little_spot.sql b/apps/backend/drizzle/0021_little_spot.sql
new file mode 100644
index 0000000..7507a93
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0022_flippant_omega_sentinel.sql b/apps/backend/drizzle/0022_flippant_omega_sentinel.sql
new file mode 100644
index 0000000..054c0fc
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0023_sparkling_starjammers.sql b/apps/backend/drizzle/0023_sparkling_starjammers.sql
new file mode 100644
index 0000000..bdb19fb
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0024_typical_the_twelve.sql b/apps/backend/drizzle/0024_typical_the_twelve.sql
new file mode 100644
index 0000000..b266835
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0025_tricky_plazm.sql b/apps/backend/drizzle/0025_tricky_plazm.sql
new file mode 100644
index 0000000..1d6a3be
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0026_flippant_spiral.sql b/apps/backend/drizzle/0026_flippant_spiral.sql
new file mode 100644
index 0000000..96c1557
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0027_huge_iron_monger.sql b/apps/backend/drizzle/0027_huge_iron_monger.sql
new file mode 100644
index 0000000..12219b2
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0028_clever_anthem.sql b/apps/backend/drizzle/0028_clever_anthem.sql
new file mode 100644
index 0000000..b9824cf
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0029_short_king_cobra.sql b/apps/backend/drizzle/0029_short_king_cobra.sql
new file mode 100644
index 0000000..2c500d8
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0030_superb_exiles.sql b/apps/backend/drizzle/0030_superb_exiles.sql
new file mode 100644
index 0000000..8403b55
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0031_clean_the_hunter.sql b/apps/backend/drizzle/0031_clean_the_hunter.sql
new file mode 100644
index 0000000..30a5cd3
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0032_tricky_baron_zemo.sql b/apps/backend/drizzle/0032_tricky_baron_zemo.sql
new file mode 100644
index 0000000..ea4b980
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0033_brainy_skullbuster.sql b/apps/backend/drizzle/0033_brainy_skullbuster.sql
new file mode 100644
index 0000000..1bf156e
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0034_yummy_riptide.sql b/apps/backend/drizzle/0034_yummy_riptide.sql
new file mode 100644
index 0000000..a9a87a8
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0035_lyrical_spencer_smythe.sql b/apps/backend/drizzle/0035_lyrical_spencer_smythe.sql
new file mode 100644
index 0000000..4b96344
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0036_eager_naoko.sql b/apps/backend/drizzle/0036_eager_naoko.sql
new file mode 100644
index 0000000..b3ef0e6
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0037_pale_outlaw_kid.sql b/apps/backend/drizzle/0037_pale_outlaw_kid.sql
new file mode 100644
index 0000000..3e20dca
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0038_volatile_jean_grey.sql b/apps/backend/drizzle/0038_volatile_jean_grey.sql
new file mode 100644
index 0000000..7396d1f
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0039_last_silver_samurai.sql b/apps/backend/drizzle/0039_last_silver_samurai.sql
new file mode 100644
index 0000000..6a9292f
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0040_brief_albert_cleary.sql b/apps/backend/drizzle/0040_brief_albert_cleary.sql
new file mode 100644
index 0000000..3f24ba5
--- /dev/null
+++ b/apps/backend/drizzle/0040_brief_albert_cleary.sql
@@ -0,0 +1 @@
+DROP TABLE "mf"."order_cancellations" CASCADE;
\ No newline at end of file
diff --git a/apps/backend/drizzle/0041_fine_kronos.sql b/apps/backend/drizzle/0041_fine_kronos.sql
new file mode 100644
index 0000000..63e6b9c
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0042_organic_phil_sheldon.sql b/apps/backend/drizzle/0042_organic_phil_sheldon.sql
new file mode 100644
index 0000000..56b94be
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0043_natural_joystick.sql b/apps/backend/drizzle/0043_natural_joystick.sql
new file mode 100644
index 0000000..cee8424
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0044_rapid_meltdown.sql b/apps/backend/drizzle/0044_rapid_meltdown.sql
new file mode 100644
index 0000000..d58638e
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0045_puzzling_leader.sql b/apps/backend/drizzle/0045_puzzling_leader.sql
new file mode 100644
index 0000000..59cf3d2
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0046_old_aaron_stack.sql b/apps/backend/drizzle/0046_old_aaron_stack.sql
new file mode 100644
index 0000000..2341ca8
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0047_dark_lester.sql b/apps/backend/drizzle/0047_dark_lester.sql
new file mode 100644
index 0000000..58181e0
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0048_talented_stature.sql b/apps/backend/drizzle/0048_talented_stature.sql
new file mode 100644
index 0000000..f0fe03a
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0049_lowly_silverclaw.sql b/apps/backend/drizzle/0049_lowly_silverclaw.sql
new file mode 100644
index 0000000..202127f
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0050_fantastic_leopardon.sql b/apps/backend/drizzle/0050_fantastic_leopardon.sql
new file mode 100644
index 0000000..37e1f71
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0051_rapid_typhoid_mary.sql b/apps/backend/drizzle/0051_rapid_typhoid_mary.sql
new file mode 100644
index 0000000..c63f8c2
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0052_pretty_captain_britain.sql b/apps/backend/drizzle/0052_pretty_captain_britain.sql
new file mode 100644
index 0000000..9cbaf8b
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0053_volatile_salo.sql b/apps/backend/drizzle/0053_volatile_salo.sql
new file mode 100644
index 0000000..5903c0a
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0054_red_spyke.sql b/apps/backend/drizzle/0054_red_spyke.sql
new file mode 100644
index 0000000..50916eb
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0055_petite_fallen_one.sql b/apps/backend/drizzle/0055_petite_fallen_one.sql
new file mode 100644
index 0000000..0d33465
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0056_fancy_satana.sql b/apps/backend/drizzle/0056_fancy_satana.sql
new file mode 100644
index 0000000..d4a7c46
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0057_safe_earthquake.sql b/apps/backend/drizzle/0057_safe_earthquake.sql
new file mode 100644
index 0000000..2cc2635
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0058_motionless_next_avengers.sql b/apps/backend/drizzle/0058_motionless_next_avengers.sql
new file mode 100644
index 0000000..97b49fd
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0059_daily_spot.sql b/apps/backend/drizzle/0059_daily_spot.sql
new file mode 100644
index 0000000..a765b60
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0060_numerous_terror.sql b/apps/backend/drizzle/0060_numerous_terror.sql
new file mode 100644
index 0000000..9ab3740
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0061_calm_sir_ram.sql b/apps/backend/drizzle/0061_calm_sir_ram.sql
new file mode 100644
index 0000000..a7380ef
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0062_sloppy_sinister_six.sql b/apps/backend/drizzle/0062_sloppy_sinister_six.sql
new file mode 100644
index 0000000..7e24050
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0063_friendly_mandarin.sql b/apps/backend/drizzle/0063_friendly_mandarin.sql
new file mode 100644
index 0000000..d4945a8
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0064_milky_revanche.sql b/apps/backend/drizzle/0064_milky_revanche.sql
new file mode 100644
index 0000000..be63270
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0065_whole_spencer_smythe.sql b/apps/backend/drizzle/0065_whole_spencer_smythe.sql
new file mode 100644
index 0000000..4cf5c80
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/0066_gorgeous_karnak.sql b/apps/backend/drizzle/0066_gorgeous_karnak.sql
new file mode 100644
index 0000000..801b44f
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0000_snapshot.json b/apps/backend/drizzle/meta/0000_snapshot.json
new file mode 100644
index 0000000..272396a
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0001_snapshot.json b/apps/backend/drizzle/meta/0001_snapshot.json
new file mode 100644
index 0000000..9daa79e
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0002_snapshot.json b/apps/backend/drizzle/meta/0002_snapshot.json
new file mode 100644
index 0000000..0897a31
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0003_snapshot.json b/apps/backend/drizzle/meta/0003_snapshot.json
new file mode 100644
index 0000000..11a7c38
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0004_snapshot.json b/apps/backend/drizzle/meta/0004_snapshot.json
new file mode 100644
index 0000000..5c130b9
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0005_snapshot.json b/apps/backend/drizzle/meta/0005_snapshot.json
new file mode 100644
index 0000000..79fd286
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0006_snapshot.json b/apps/backend/drizzle/meta/0006_snapshot.json
new file mode 100644
index 0000000..2d7c1d0
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0007_snapshot.json b/apps/backend/drizzle/meta/0007_snapshot.json
new file mode 100644
index 0000000..90b1e24
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0008_snapshot.json b/apps/backend/drizzle/meta/0008_snapshot.json
new file mode 100644
index 0000000..3dcf5b6
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0009_snapshot.json b/apps/backend/drizzle/meta/0009_snapshot.json
new file mode 100644
index 0000000..4310e8f
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0010_snapshot.json b/apps/backend/drizzle/meta/0010_snapshot.json
new file mode 100644
index 0000000..e20c3ba
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0011_snapshot.json b/apps/backend/drizzle/meta/0011_snapshot.json
new file mode 100644
index 0000000..12de0b2
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0012_snapshot.json b/apps/backend/drizzle/meta/0012_snapshot.json
new file mode 100644
index 0000000..abce803
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0013_snapshot.json b/apps/backend/drizzle/meta/0013_snapshot.json
new file mode 100644
index 0000000..bfbe62f
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0014_snapshot.json b/apps/backend/drizzle/meta/0014_snapshot.json
new file mode 100644
index 0000000..04c1239
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0015_snapshot.json b/apps/backend/drizzle/meta/0015_snapshot.json
new file mode 100644
index 0000000..170c4ee
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0016_snapshot.json b/apps/backend/drizzle/meta/0016_snapshot.json
new file mode 100644
index 0000000..6a4e997
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0017_snapshot.json b/apps/backend/drizzle/meta/0017_snapshot.json
new file mode 100644
index 0000000..b82026d
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0018_snapshot.json b/apps/backend/drizzle/meta/0018_snapshot.json
new file mode 100644
index 0000000..9111837
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0019_snapshot.json b/apps/backend/drizzle/meta/0019_snapshot.json
new file mode 100644
index 0000000..59fa671
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0020_snapshot.json b/apps/backend/drizzle/meta/0020_snapshot.json
new file mode 100644
index 0000000..c5aea28
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0021_snapshot.json b/apps/backend/drizzle/meta/0021_snapshot.json
new file mode 100644
index 0000000..95a86ec
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0022_snapshot.json b/apps/backend/drizzle/meta/0022_snapshot.json
new file mode 100644
index 0000000..dd9b619
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0023_snapshot.json b/apps/backend/drizzle/meta/0023_snapshot.json
new file mode 100644
index 0000000..f8056fe
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0024_snapshot.json b/apps/backend/drizzle/meta/0024_snapshot.json
new file mode 100644
index 0000000..779931f
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0025_snapshot.json b/apps/backend/drizzle/meta/0025_snapshot.json
new file mode 100644
index 0000000..54583d5
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0026_snapshot.json b/apps/backend/drizzle/meta/0026_snapshot.json
new file mode 100644
index 0000000..b9b15b9
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0027_snapshot.json b/apps/backend/drizzle/meta/0027_snapshot.json
new file mode 100644
index 0000000..e543464
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0028_snapshot.json b/apps/backend/drizzle/meta/0028_snapshot.json
new file mode 100644
index 0000000..9a93c8a
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0029_snapshot.json b/apps/backend/drizzle/meta/0029_snapshot.json
new file mode 100644
index 0000000..7c51a75
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0030_snapshot.json b/apps/backend/drizzle/meta/0030_snapshot.json
new file mode 100644
index 0000000..364b7ef
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0031_snapshot.json b/apps/backend/drizzle/meta/0031_snapshot.json
new file mode 100644
index 0000000..2e1c678
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0032_snapshot.json b/apps/backend/drizzle/meta/0032_snapshot.json
new file mode 100644
index 0000000..5cda79b
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0033_snapshot.json b/apps/backend/drizzle/meta/0033_snapshot.json
new file mode 100644
index 0000000..7f9730b
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0034_snapshot.json b/apps/backend/drizzle/meta/0034_snapshot.json
new file mode 100644
index 0000000..9dc5b50
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0035_snapshot.json b/apps/backend/drizzle/meta/0035_snapshot.json
new file mode 100644
index 0000000..1ed4401
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0036_snapshot.json b/apps/backend/drizzle/meta/0036_snapshot.json
new file mode 100644
index 0000000..4061f92
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0037_snapshot.json b/apps/backend/drizzle/meta/0037_snapshot.json
new file mode 100644
index 0000000..330fefe
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0038_snapshot.json b/apps/backend/drizzle/meta/0038_snapshot.json
new file mode 100644
index 0000000..1552918
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0039_snapshot.json b/apps/backend/drizzle/meta/0039_snapshot.json
new file mode 100644
index 0000000..2c22a2e
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0040_snapshot.json b/apps/backend/drizzle/meta/0040_snapshot.json
new file mode 100644
index 0000000..5d1b499
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0041_snapshot.json b/apps/backend/drizzle/meta/0041_snapshot.json
new file mode 100644
index 0000000..2473612
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0042_snapshot.json b/apps/backend/drizzle/meta/0042_snapshot.json
new file mode 100644
index 0000000..d507d90
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0043_snapshot.json b/apps/backend/drizzle/meta/0043_snapshot.json
new file mode 100644
index 0000000..76061d8
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0044_snapshot.json b/apps/backend/drizzle/meta/0044_snapshot.json
new file mode 100644
index 0000000..d454b81
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0045_snapshot.json b/apps/backend/drizzle/meta/0045_snapshot.json
new file mode 100644
index 0000000..67f6827
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0046_snapshot.json b/apps/backend/drizzle/meta/0046_snapshot.json
new file mode 100644
index 0000000..8fb3db1
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0047_snapshot.json b/apps/backend/drizzle/meta/0047_snapshot.json
new file mode 100644
index 0000000..071ae13
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0048_snapshot.json b/apps/backend/drizzle/meta/0048_snapshot.json
new file mode 100644
index 0000000..cdff944
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0049_snapshot.json b/apps/backend/drizzle/meta/0049_snapshot.json
new file mode 100644
index 0000000..20199c7
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0050_snapshot.json b/apps/backend/drizzle/meta/0050_snapshot.json
new file mode 100644
index 0000000..f2854c0
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0051_snapshot.json b/apps/backend/drizzle/meta/0051_snapshot.json
new file mode 100644
index 0000000..e48c75b
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0052_snapshot.json b/apps/backend/drizzle/meta/0052_snapshot.json
new file mode 100644
index 0000000..93cf2a7
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0053_snapshot.json b/apps/backend/drizzle/meta/0053_snapshot.json
new file mode 100644
index 0000000..d86c845
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0054_snapshot.json b/apps/backend/drizzle/meta/0054_snapshot.json
new file mode 100644
index 0000000..5e5fce3
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0055_snapshot.json b/apps/backend/drizzle/meta/0055_snapshot.json
new file mode 100644
index 0000000..92fa7cd
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0056_snapshot.json b/apps/backend/drizzle/meta/0056_snapshot.json
new file mode 100644
index 0000000..671492d
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0057_snapshot.json b/apps/backend/drizzle/meta/0057_snapshot.json
new file mode 100644
index 0000000..1597d96
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0058_snapshot.json b/apps/backend/drizzle/meta/0058_snapshot.json
new file mode 100644
index 0000000..c2f4153
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0059_snapshot.json b/apps/backend/drizzle/meta/0059_snapshot.json
new file mode 100644
index 0000000..82b7445
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0060_snapshot.json b/apps/backend/drizzle/meta/0060_snapshot.json
new file mode 100644
index 0000000..bf00379
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0061_snapshot.json b/apps/backend/drizzle/meta/0061_snapshot.json
new file mode 100644
index 0000000..a4d9566
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0062_snapshot.json b/apps/backend/drizzle/meta/0062_snapshot.json
new file mode 100644
index 0000000..cbfb1bf
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0063_snapshot.json b/apps/backend/drizzle/meta/0063_snapshot.json
new file mode 100644
index 0000000..c901b9e
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0064_snapshot.json b/apps/backend/drizzle/meta/0064_snapshot.json
new file mode 100644
index 0000000..6a3d2c8
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0065_snapshot.json b/apps/backend/drizzle/meta/0065_snapshot.json
new file mode 100644
index 0000000..b03b2c2
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/0066_snapshot.json b/apps/backend/drizzle/meta/0066_snapshot.json
new file mode 100644
index 0000000..468009c
--- /dev/null
+++ b/apps/backend/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/apps/backend/drizzle/meta/_journal.json b/apps/backend/drizzle/meta/_journal.json
new file mode 100644
index 0000000..8cbaba1
--- /dev/null
+++ b/apps/backend/drizzle/meta/_journal.json
@@ -0,0 +1,475 @@
+{
+ "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
+ }
+ ]
+}
\ No newline at end of file
diff --git a/apps/backend/index.ts b/apps/backend/index.ts
new file mode 100755
index 0000000..6a37b28
--- /dev/null
+++ b/apps/backend/index.ts
@@ -0,0 +1,175 @@
+import 'dotenv/config';
+import express, { NextFunction, Request, Response } from "express";
+import cors from "cors";
+// import bodyParser from "body-parser";
+import multer from "multer";
+import path from "path";
+import fs from "fs";
+import { db } from './src/db/db_index';
+import { staffUsers, userDetails } from './src/db/schema';
+import { eq } from 'drizzle-orm';
+import mainRouter from './src/main-router';
+import initFunc from './src/lib/init';
+import { createExpressMiddleware } from '@trpc/server/adapters/express';
+import { appRouter } from './src/trpc/router';
+import { TRPCError } from '@trpc/server';
+import jwt from 'jsonwebtoken'
+import signedUrlCache from 'src/lib/signed-url-cache';
+import { seed } from 'src/db/seed';
+import './src/jobs/jobs-index';
+
+
+seed()
+initFunc()
+
+const app = express();
+
+app.use(cors({
+ origin: 'http://localhost:5174'
+}));
+
+
+signedUrlCache.loadFromDisk();
+
+app.use(express.json());
+app.use(express.urlencoded({ extended: true }));
+
+// Middleware to log all request URLs
+app.use((req, res, next) => {
+ const timestamp = new Date().toISOString();
+ console.log(`[${timestamp}] ${req.method} ${req.url}`);
+ next();
+});
+
+//cors middleware
+export function corsMiddleware(req: Request, res: Response, next: NextFunction) {
+ // Allow requests from any origin (for production, replace * with your domain)
+ res.header('Access-Control-Allow-Origin', '*');
+
+ // Allow specific headers clients can send
+ res.header(
+ 'Access-Control-Allow-Headers',
+ 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
+ );
+
+ // Allow specific HTTP methods
+ res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE, OPTIONS');
+
+ // Allow credentials if needed (optional)
+ // res.header('Access-Control-Allow-Credentials', 'true');
+
+ // Handle preflight (OPTIONS) requests quickly
+ if (req.method === 'OPTIONS') {
+ return res.sendStatus(204);
+ }
+
+ next();
+}
+
+
+app.use('/api/trpc', createExpressMiddleware({
+ router: appRouter,
+ createContext: async ({ req, res }) => {
+ let user = null;
+ let staffUser = null;
+ const authHeader = req.headers.authorization;
+
+ if (authHeader?.startsWith('Bearer ')) {
+ const token = authHeader.substring(7);
+ try {
+ const decoded = jwt.verify(token, process.env.JWT_SECRET || 'your-secret-key') as any;
+
+ // Check if this is a staff token (has staffId)
+ if (decoded.staffId) {
+ // This is a staff token, verify staff exists
+ const staff = await db.query.staffUsers.findFirst({
+ where: eq(staffUsers.id, decoded.staffId),
+ });
+
+ if (staff) {
+ user=staffUser
+ staffUser = {
+ id: staff.id,
+ name: staff.name,
+ };
+ }
+ } else {
+
+ // This is a regular user token
+ user = decoded;
+
+ // Check if user is suspended
+ const details = await db.query.userDetails.findFirst({
+ where: eq(userDetails.userId, user.userId),
+ });
+
+ if (details?.isSuspended) {
+ throw new TRPCError({
+ code: 'FORBIDDEN',
+ message: 'Account suspended',
+ });
+ }
+ }
+ } catch (err) {
+ // Invalid token, both user and staffUser remain null
+ }
+ }
+ return { req, res, user, staffUser };
+ },
+ onError({ error, path, type, ctx }) {
+ console.error('🚨 tRPC Error :', {
+ path,
+ type,
+ code: error.code,
+ message: error.message,
+ userId: ctx?.user?.userId,
+ stack: error.stack,
+ });
+},
+}));
+
+app.use('/api', mainRouter)
+
+const fallbackUiDirCandidates = [
+ path.resolve(__dirname, '../fallback-ui/dist'),
+ path.resolve(__dirname, '../../fallback-ui/dist'),
+ path.resolve(process.cwd(), '../fallback-ui/dist'),
+ path.resolve(process.cwd(), './apps/fallback-ui/dist')
+]
+
+const fallbackUiDir =
+ fallbackUiDirCandidates.find((candidate) => fs.existsSync(candidate)) ??
+ fallbackUiDirCandidates[0]
+
+
+const fallbackUiIndex = path.join(fallbackUiDir, 'index.html')
+// const fallbackUiMountPath = '/admin-web'
+const fallbackUiMountPath = '/';
+
+if (fs.existsSync(fallbackUiIndex)) {
+ app.use(fallbackUiMountPath, express.static(fallbackUiDir))
+ app.use('/mf'+fallbackUiMountPath, express.static(fallbackUiDir))
+ const fallbackUiRegex = new RegExp(
+ `^${fallbackUiMountPath.replace(/\//g, '\\/')}(?:\\/.*)?$`
+ )
+ app.get([fallbackUiMountPath, fallbackUiRegex], (req, res) => {
+ res.sendFile(fallbackUiIndex)
+ })
+ app.get(/.*/, (req,res) => {
+ res.sendFile(fallbackUiIndex)
+ })
+} else {
+ console.warn(`Fallback UI build not found at ${fallbackUiIndex}`)
+}
+
+// Global error handler
+app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {
+ console.error(err);
+ const status = err.statusCode || err.status || 500;
+ const message = err.message || 'Internal Server Error';
+ res.status(status).json({ message });
+});
+
+app.listen(4000, () => {
+ console.log("Server is running on http://localhost:4000/api/mobile/");
+});
diff --git a/apps/backend/package.json b/apps/backend/package.json
new file mode 100755
index 0000000..d785ad2
--- /dev/null
+++ b/apps/backend/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "backend",
+ "version": "1.0.0",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "migrate": "drizzle-kit generate:pg",
+ "build": "rimraf ./dist && tsc --project tsconfig.json",
+ "build2": "rimraf ./dist && tsc",
+ "db:push": "drizzle-kit push:pg",
+ "db:seed": "tsx src/db/seed.ts",
+ "dev2": "tsx watch index.ts",
+ "dev_node": "tsx watch index.ts",
+ "dev": "bun --watch index.ts",
+ "docker:build": "cd .. && docker buildx build --platform linux/amd64 -t mohdshafiuddin54/health_petal:latest --progress=plain -f backend/Dockerfile .",
+ "docker:push": "docker push mohdshafiuddin54/health_petal:latest"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC",
+ "description": "",
+ "dependencies": {
+ "@aws-sdk/client-s3": "^3.888.0",
+ "@aws-sdk/s3-request-presigner": "^3.888.0",
+ "@trpc/server": "^11.6.0",
+ "@turf/turf": "^7.2.0",
+ "@types/bcryptjs": "^2.4.6",
+ "@types/cors": "^2.8.19",
+ "@types/jsonwebtoken": "^9.0.10",
+ "@types/multer": "^2.0.0",
+ "axios": "^1.11.0",
+ "bcryptjs": "^3.0.2",
+ "bullmq": "^5.63.0",
+ "cors": "^2.8.5",
+ "dayjs": "^1.11.18",
+ "dotenv": "^17.2.1",
+ "drizzle-orm": "^0.44.5",
+ "expo-server-sdk": "^4.0.0",
+ "express": "^5.1.0",
+ "jsonwebtoken": "^9.0.2",
+ "multer": "^2.0.2",
+ "node-cron": "^4.2.1",
+ "pg": "^8.16.3",
+ "pg-sdk-node": "https://phonepe.mycloudrepo.io/public/repositories/phonepe-pg-sdk-node/releases/v2/phonepe-pg-sdk-node.tgz",
+ "razorpay": "^2.9.6",
+ "redis": "^5.9.0",
+ "zod": "^4.1.12"
+ },
+ "devDependencies": {
+ "@types/express": "^5.0.3",
+ "@types/node": "^24.5.2",
+ "@types/pg": "^8.15.5",
+ "drizzle-kit": "^0.31.4",
+ "rimraf": "^6.1.2",
+ "ts-node-dev": "^2.0.0",
+ "tsx": "^4.20.5",
+ "typescript": "^5.9.2"
+ }
+}
\ No newline at end of file
diff --git a/apps/backend/src/admin-apis/av-router.ts b/apps/backend/src/admin-apis/av-router.ts
new file mode 100755
index 0000000..b98e354
--- /dev/null
+++ b/apps/backend/src/admin-apis/av-router.ts
@@ -0,0 +1,19 @@
+import { Router } from "express";
+import { authenticateStaff } from "../middleware/staff-auth";
+import productRouter from "./product.router";
+import tagRouter from "./tag.router";
+
+const router = Router();
+
+// Apply staff authentication to all admin routes
+router.use(authenticateStaff);
+
+// Product routes
+router.use("/products", productRouter);
+
+// Tag routes
+router.use("/product-tags", tagRouter);
+
+const avRouter = router;
+
+export default avRouter;
\ No newline at end of file
diff --git a/apps/backend/src/admin-apis/product-tags.controller.ts b/apps/backend/src/admin-apis/product-tags.controller.ts
new file mode 100644
index 0000000..dfc24ad
--- /dev/null
+++ b/apps/backend/src/admin-apis/product-tags.controller.ts
@@ -0,0 +1,186 @@
+import { Request, Response } from "express";
+import { db } from "../db/db_index";
+import { productTagInfo } from "../db/schema";
+import { eq } from "drizzle-orm";
+import { ApiError } from "../lib/api-error";
+import { imageUploadS3, generateSignedUrlFromS3Url } from "../lib/s3-client";
+import { deleteS3Image } from "../lib/delete-image";
+
+/**
+ * Create a new product tag
+ */
+export const createTag = async (req: Request, res: Response) => {
+ const { tagName, tagDescription, isDashboardTag } = req.body;
+
+ if (!tagName) {
+ throw new ApiError("Tag name is required", 400);
+ }
+
+ // Check for duplicate tag name
+ const existingTag = await db.query.productTagInfo.findFirst({
+ where: eq(productTagInfo.tagName, tagName.trim()),
+ });
+
+ if (existingTag) {
+ throw new ApiError("A tag with this name already exists", 400);
+ }
+
+ let imageUrl: string | null = null;
+
+ // Handle image upload if file is provided
+ if (req.file) {
+ const key = `tags/${Date.now()}-${req.file.originalname}`;
+ imageUrl = await imageUploadS3(req.file.buffer, req.file.mimetype, key);
+ }
+
+ const [newTag] = await db
+ .insert(productTagInfo)
+ .values({
+ tagName: tagName.trim(),
+ tagDescription,
+ imageUrl,
+ isDashboardTag: isDashboardTag || false,
+ })
+ .returning();
+
+ return res.status(201).json({
+ tag: newTag,
+ message: "Tag created successfully",
+ });
+};
+
+/**
+ * Get all product tags
+ */
+export const getAllTags = async (req: Request, res: Response) => {
+ const tags = await db
+ .select()
+ .from(productTagInfo)
+ .orderBy(productTagInfo.tagName);
+
+ // Generate signed URLs for tag images
+ const tagsWithSignedUrls = await Promise.all(
+ tags.map(async (tag) => ({
+ ...tag,
+ imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,
+ }))
+ );
+
+ return res.status(200).json({
+ tags: tagsWithSignedUrls,
+ message: "Tags retrieved successfully",
+ });
+};
+
+/**
+ * Get a single product tag by ID
+ */
+export const getTagById = async (req: Request, res: Response) => {
+ const { id } = req.params;
+
+ const tag = await db.query.productTagInfo.findFirst({
+ where: eq(productTagInfo.id, parseInt(id)),
+ });
+
+ if (!tag) {
+ throw new ApiError("Tag not found", 404);
+ }
+
+ // Generate signed URL for tag image
+ const tagWithSignedUrl = {
+ ...tag,
+ imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,
+ };
+
+ return res.status(200).json({
+ tag: tagWithSignedUrl,
+ message: "Tag retrieved successfully",
+ });
+};
+
+/**
+ * Update a product tag
+ */
+export const updateTag = async (req: Request, res: Response) => {
+ const { id } = req.params;
+ const { tagName, tagDescription, isDashboardTag } = req.body;
+
+ // Get the current tag to check for existing image
+ const currentTag = await db.query.productTagInfo.findFirst({
+ where: eq(productTagInfo.id, parseInt(id)),
+ });
+
+ if (!currentTag) {
+ throw new ApiError("Tag not found", 404);
+ }
+
+ let imageUrl = currentTag.imageUrl;
+
+ // Handle image upload if new file is provided
+ if (req.file) {
+ // Delete old image if it exists
+ if (currentTag.imageUrl) {
+ try {
+ await deleteS3Image(currentTag.imageUrl);
+ } catch (error) {
+ console.error("Failed to delete old image:", error);
+ // Continue with update even if delete fails
+ }
+ }
+
+
+ // Upload new image
+ const key = `tags/${Date.now()}-${req.file.originalname}`;
+ console.log('file', key)
+ imageUrl = await imageUploadS3(req.file.buffer, req.file.mimetype, key);
+ }
+
+ const [updatedTag] = await db
+ .update(productTagInfo)
+ .set({
+ tagName: tagName?.trim(),
+ tagDescription,
+ imageUrl,
+ isDashboardTag,
+ })
+ .where(eq(productTagInfo.id, parseInt(id)))
+ .returning();
+
+ return res.status(200).json({
+ tag: updatedTag,
+ message: "Tag updated successfully",
+ });
+};
+
+/**
+ * Delete a product tag
+ */
+export const deleteTag = async (req: Request, res: Response) => {
+ const { id } = req.params;
+
+ // Check if tag exists
+ const tag = await db.query.productTagInfo.findFirst({
+ where: eq(productTagInfo.id, parseInt(id)),
+ });
+
+ if (!tag) {
+ throw new ApiError("Tag not found", 404);
+ }
+
+ // Delete image from S3 if it exists
+ if (tag.imageUrl) {
+ try {
+ await deleteS3Image(tag.imageUrl);
+ } catch (error) {
+ console.error("Failed to delete image from S3:", error);
+ // Continue with deletion even if image delete fails
+ }
+ }
+
+ // Note: This will fail if tag is still assigned to products due to foreign key constraint
+ await db.delete(productTagInfo).where(eq(productTagInfo.id, parseInt(id)));
+
+ return res.status(200).json({
+ message: "Tag deleted successfully",
+ });
+};
\ No newline at end of file
diff --git a/apps/backend/src/admin-apis/product.controller.ts b/apps/backend/src/admin-apis/product.controller.ts
new file mode 100644
index 0000000..14650fc
--- /dev/null
+++ b/apps/backend/src/admin-apis/product.controller.ts
@@ -0,0 +1,297 @@
+import { Request, Response } from "express";
+import { db } from "../db/db_index";
+import { productInfo, units, specialDeals, productTags } from "../db/schema";
+import { eq, inArray } from "drizzle-orm";
+import { ApiError } from "../lib/api-error";
+import { imageUploadS3, getOriginalUrlFromSignedUrl } from "../lib/s3-client";
+import { deleteS3Image } from "../lib/delete-image";
+import type { SpecialDeal } from "../db/types";
+
+type CreateDeal = {
+ quantity: number;
+ price: number;
+ validTill: string;
+};
+
+/**
+ * Create a new product
+ */
+export const createProduct = async (req: Request, res: Response) => {
+ const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, deals, tagIds } = req.body;
+
+ // Validate required fields
+ if (!name || !unitId || !storeId || !price) {
+ throw new ApiError("Name, unitId, storeId, and price are required", 400);
+ }
+
+ // Check for duplicate name
+ const existingProduct = await db.query.productInfo.findFirst({
+ where: eq(productInfo.name, name.trim()),
+ });
+
+ if (existingProduct) {
+ throw new ApiError("A product with this name already exists", 400);
+ }
+
+ // Check if unit exists
+ const unit = await db.query.units.findFirst({
+ where: eq(units.id, unitId),
+ });
+
+ if (!unit) {
+ throw new ApiError("Invalid unit ID", 400);
+ }
+
+ // Extract images from req.files
+ const images = (req.files as Express.Multer.File[])?.filter(item => item.fieldname === 'images');
+ let uploadedImageUrls: string[] = [];
+
+ if (images && Array.isArray(images)) {
+ const imageUploadPromises = images.map((file, index) => {
+ const key = `product-images/${Date.now()}-${index}`;
+ return imageUploadS3(file.buffer, file.mimetype, key);
+ });
+
+ uploadedImageUrls = await Promise.all(imageUploadPromises);
+ }
+
+ // Create product
+ const productData: any = {
+ name,
+ shortDescription,
+ longDescription,
+ unitId,
+ storeId,
+ price,
+ marketPrice,
+ incrementStep: incrementStep || 1,
+ productQuantity: productQuantity || 1,
+ isSuspended: isSuspended || false,
+ isFlashAvailable: isFlashAvailable || false,
+ images: uploadedImageUrls,
+ };
+
+ if (flashPrice) {
+ productData.flashPrice = parseFloat(flashPrice);
+ }
+
+ const [newProduct] = await db
+ .insert(productInfo)
+ .values(productData)
+ .returning();
+
+ // Handle deals if provided
+ let createdDeals: SpecialDeal[] = [];
+ if (deals && Array.isArray(deals)) {
+ const dealInserts = deals.map((deal: CreateDeal) => ({
+ productId: newProduct.id,
+ quantity: deal.quantity.toString(),
+ price: deal.price.toString(),
+ validTill: new Date(deal.validTill),
+ }));
+
+ createdDeals = await db
+ .insert(specialDeals)
+ .values(dealInserts)
+ .returning();
+ }
+
+ // Handle tag assignments if provided
+ if (tagIds && Array.isArray(tagIds)) {
+ const tagAssociations = tagIds.map((tagId: number) => ({
+ productId: newProduct.id,
+ tagId,
+ }));
+
+ await db.insert(productTags).values(tagAssociations);
+ }
+
+ return res.status(201).json({
+ product: newProduct,
+ deals: createdDeals,
+ message: "Product created successfully",
+ });
+};
+
+/**
+ * Update a product
+ */
+export const updateProduct = async (req: Request, res: Response) => {
+ const { id } = req.params;
+ const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, deals:dealsRaw, imagesToDelete:imagesToDeleteRaw, tagIds } = req.body;
+
+ console.log({productQuantity})
+
+ const deals = dealsRaw ? JSON.parse(dealsRaw) : null;
+ const imagesToDelete = imagesToDeleteRaw ? JSON.parse(imagesToDeleteRaw) : [];
+
+ if (!name || !unitId || !storeId || !price) {
+ throw new ApiError("Name, unitId, storeId, and price are required", 400);
+ }
+
+ // Check if unit exists
+ const unit = await db.query.units.findFirst({
+ where: eq(units.id, unitId),
+ });
+
+ if (!unit) {
+ throw new ApiError("Invalid unit ID", 400);
+ }
+
+ // Get current product to handle image updates
+ const currentProduct = await db.query.productInfo.findFirst({
+ where: eq(productInfo.id, parseInt(id)),
+ });
+
+ if (!currentProduct) {
+ throw new ApiError("Product not found", 404);
+ }
+
+ // Handle image deletions
+ let currentImages = (currentProduct.images as string[]) || [];
+ if (imagesToDelete && imagesToDelete.length > 0) {
+ // Convert signed URLs to original S3 URLs for comparison
+ const originalUrlsToDelete = imagesToDelete
+ .map((signedUrl: string) => getOriginalUrlFromSignedUrl(signedUrl))
+ .filter(Boolean); // Remove nulls
+
+ // Find which stored images match the ones to delete
+ const imagesToRemoveFromDb = currentImages.filter(storedUrl =>
+ originalUrlsToDelete.includes(storedUrl)
+ );
+
+ // Delete the matching images from S3
+ const deletePromises = imagesToRemoveFromDb.map(imageUrl => deleteS3Image(imageUrl));
+ await Promise.all(deletePromises);
+
+ // Remove deleted images from current images array
+ currentImages = currentImages.filter(img => !imagesToRemoveFromDb.includes(img));
+ }
+
+ // Extract new images from req.files
+ const images = (req.files as Express.Multer.File[])?.filter(item => item.fieldname === 'images');
+ let uploadedImageUrls: string[] = [];
+
+ if (images && Array.isArray(images)) {
+ const imageUploadPromises = images.map((file, index) => {
+ const key = `product-images/${Date.now()}-${index}`;
+ return imageUploadS3(file.buffer, file.mimetype, key);
+ });
+
+ uploadedImageUrls = await Promise.all(imageUploadPromises);
+ }
+
+ // Combine remaining current images with new uploaded images
+ const finalImages = [...currentImages, ...uploadedImageUrls];
+
+ const updateData: any = {
+ name,
+ shortDescription,
+ longDescription,
+ unitId,
+ storeId,
+ price,
+ marketPrice,
+ incrementStep: incrementStep || 1,
+ productQuantity: productQuantity || 1,
+ isSuspended: isSuspended || false,
+ images: finalImages.length > 0 ? finalImages : undefined,
+ };
+
+ if (isFlashAvailable !== undefined) {
+ updateData.isFlashAvailable = isFlashAvailable;
+ }
+
+ if (flashPrice !== undefined) {
+ updateData.flashPrice = flashPrice ? parseFloat(flashPrice) : null;
+ }
+
+ const [updatedProduct] = await db
+ .update(productInfo)
+ .set(updateData)
+ .where(eq(productInfo.id, parseInt(id)))
+ .returning();
+
+ if (!updatedProduct) {
+ throw new ApiError("Product not found", 404);
+ }
+
+ // Handle deals if provided
+ if (deals && Array.isArray(deals)) {
+ // Get existing deals
+ const existingDeals = await db.query.specialDeals.findMany({
+ where: eq(specialDeals.productId, parseInt(id)),
+ });
+
+ // Create maps for comparison
+ const existingDealsMap = new Map(existingDeals.map(deal => [`${deal.quantity}-${deal.price}`, deal]));
+ const newDealsMap = new Map(deals.map((deal: CreateDeal) => [`${deal.quantity}-${deal.price}`, deal]));
+
+ // Find deals to add, update, and remove
+ const dealsToAdd = deals.filter((deal: CreateDeal) => {
+ const key = `${deal.quantity}-${deal.price}`;
+ return !existingDealsMap.has(key);
+ });
+
+ const dealsToRemove = existingDeals.filter(deal => {
+ const key = `${deal.quantity}-${deal.price}`;
+ return !newDealsMap.has(key);
+ });
+
+ const dealsToUpdate = deals.filter((deal: CreateDeal) => {
+ const key = `${deal.quantity}-${deal.price}`;
+ const existing = existingDealsMap.get(key);
+ return existing && existing.validTill.toISOString().split('T')[0] !== deal.validTill;
+ });
+
+ // Remove old deals
+ if (dealsToRemove.length > 0) {
+ await db.delete(specialDeals).where(
+ inArray(specialDeals.id, dealsToRemove.map(deal => deal.id))
+ );
+ }
+
+ // Add new deals
+ if (dealsToAdd.length > 0) {
+ const dealInserts = dealsToAdd.map((deal: CreateDeal) => ({
+ productId: parseInt(id),
+ quantity: deal.quantity.toString(),
+ price: deal.price.toString(),
+ validTill: new Date(deal.validTill),
+ }));
+ await db.insert(specialDeals).values(dealInserts);
+ }
+
+ // Update existing deals
+ for (const deal of dealsToUpdate) {
+ const key = `${deal.quantity}-${deal.price}`;
+ const existingDeal = existingDealsMap.get(key);
+ if (existingDeal) {
+ await db.update(specialDeals)
+ .set({ validTill: new Date(deal.validTill) })
+ .where(eq(specialDeals.id, existingDeal.id));
+ }
+ }
+ }
+
+ // Handle tag assignments if provided
+ // if (tagIds && Array.isArray(tagIds)) {
+ if (tagIds && Boolean(tagIds)) {
+ // Remove existing tags
+ await db.delete(productTags).where(eq(productTags.productId, parseInt(id)));
+
+ const tagIdsArray = Array.isArray(tagIds) ? tagIds : [+tagIds]
+ // Add new tags
+ const tagAssociations = tagIdsArray.map((tagId: number) => ({
+ productId: parseInt(id),
+ tagId,
+ }));
+
+ await db.insert(productTags).values(tagAssociations);
+ }
+
+ return res.status(200).json({
+ product: updatedProduct,
+ message: "Product updated successfully",
+ });
+};
\ No newline at end of file
diff --git a/apps/backend/src/admin-apis/product.router.ts b/apps/backend/src/admin-apis/product.router.ts
new file mode 100644
index 0000000..faabd52
--- /dev/null
+++ b/apps/backend/src/admin-apis/product.router.ts
@@ -0,0 +1,11 @@
+import { Router } from "express";
+import { createProduct, updateProduct } from "./product.controller";
+import uploadHandler from '../lib/upload-handler';
+
+const router = Router();
+
+// Product routes
+router.post("/", uploadHandler.array('images'), createProduct);
+router.put("/:id", uploadHandler.array('images'), updateProduct);
+
+export default router;
\ No newline at end of file
diff --git a/apps/backend/src/admin-apis/tag.router.ts b/apps/backend/src/admin-apis/tag.router.ts
new file mode 100644
index 0000000..171ce7f
--- /dev/null
+++ b/apps/backend/src/admin-apis/tag.router.ts
@@ -0,0 +1,14 @@
+import { Router } from "express";
+import { createTag, getAllTags, getTagById, updateTag, deleteTag } from "./product-tags.controller";
+import uploadHandler from '../lib/upload-handler';
+
+const router = Router();
+
+// Tag routes
+router.post("/", uploadHandler.single('image'), createTag);
+router.get("/", getAllTags);
+router.get("/:id", getTagById);
+router.put("/:id", uploadHandler.single('image'), updateTag);
+router.delete("/:id", deleteTag);
+
+export default router;
\ No newline at end of file
diff --git a/apps/backend/src/common-apis/common-product.controller.ts b/apps/backend/src/common-apis/common-product.controller.ts
new file mode 100644
index 0000000..00161f8
--- /dev/null
+++ b/apps/backend/src/common-apis/common-product.controller.ts
@@ -0,0 +1,105 @@
+import { eq, gt, and, sql, inArray } from "drizzle-orm";
+import { Request, Response } from "express";
+import { db } from "../db/db_index";
+import { productInfo, units, productSlots, deliverySlotInfo, productTags } from "../db/schema";
+import { generateSignedUrlsFromS3Urls } from "../lib/s3-client";
+
+/**
+ * Get next delivery date for a product
+ */
+const getNextDeliveryDate = async (productId: number): Promise => {
+ const result = await db
+ .select({ deliveryTime: deliverySlotInfo.deliveryTime })
+ .from(productSlots)
+ .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))
+ .where(
+ and(
+ eq(productSlots.productId, productId),
+ eq(deliverySlotInfo.isActive, true),
+ gt(deliverySlotInfo.deliveryTime, sql`NOW()`)
+ )
+ )
+ .orderBy(deliverySlotInfo.deliveryTime)
+ .limit(1);
+
+
+ return result[0]?.deliveryTime || null;
+};
+
+/**
+ * Get all products summary for dropdown
+ */
+export const getAllProductsSummary = async (req: Request, res: Response) => {
+ try {
+ const { tagId } = req.query;
+ const tagIdNum = tagId ? parseInt(tagId as string) : null;
+
+ let productIds: number[] | null = null;
+
+ // If tagId is provided, get products that have this tag
+ if (tagIdNum) {
+ const taggedProducts = await db
+ .select({ productId: productTags.productId })
+ .from(productTags)
+ .where(eq(productTags.tagId, tagIdNum));
+
+ productIds = taggedProducts.map(tp => tp.productId);
+ }
+
+ let whereCondition = undefined;
+
+ // Filter by product IDs if tag filtering is applied
+ if (productIds && productIds.length > 0) {
+ whereCondition = inArray(productInfo.id, productIds);
+ } else if (tagIdNum) {
+ // If tagId was provided but no products found, return empty array
+ return res.status(200).json({
+ products: [],
+ count: 0,
+ });
+ }
+
+ const productsWithUnits = await db
+ .select({
+ id: productInfo.id,
+ name: productInfo.name,
+ shortDescription: productInfo.shortDescription,
+ price: productInfo.price,
+ marketPrice: productInfo.marketPrice,
+ images: productInfo.images,
+ isOutOfStock: productInfo.isOutOfStock,
+ unitShortNotation: units.shortNotation,
+ productQuantity: productInfo.productQuantity,
+ })
+ .from(productInfo)
+ .innerJoin(units, eq(productInfo.unitId, units.id))
+ .where(whereCondition);
+
+ // Generate signed URLs for product images
+ const formattedProducts = await Promise.all(
+ productsWithUnits.map(async (product) => {
+ const nextDeliveryDate = await getNextDeliveryDate(product.id);
+ return {
+ id: product.id,
+ name: product.name,
+ shortDescription: product.shortDescription,
+ price: product.price,
+ marketPrice: product.marketPrice,
+ unit: product.unitShortNotation,
+ productQuantity: product.productQuantity,
+ isOutOfStock: product.isOutOfStock,
+ nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,
+ images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),
+ };
+ })
+ );
+
+ return res.status(200).json({
+ products: formattedProducts,
+ count: formattedProducts.length,
+ });
+ } catch (error) {
+ console.error("Get products summary error:", error);
+ return res.status(500).json({ error: "Failed to fetch products summary" });
+ }
+};
diff --git a/apps/backend/src/common-apis/common-product.router.ts b/apps/backend/src/common-apis/common-product.router.ts
new file mode 100644
index 0000000..5d5b60c
--- /dev/null
+++ b/apps/backend/src/common-apis/common-product.router.ts
@@ -0,0 +1,10 @@
+import { Router } from "express";
+import { getAllProductsSummary } from "./common-product.controller";
+
+const router = Router();
+
+router.get("/summary", getAllProductsSummary);
+
+
+const commonProductsRouter= router;
+export default commonProductsRouter;
\ No newline at end of file
diff --git a/apps/backend/src/common-apis/common.router.ts b/apps/backend/src/common-apis/common.router.ts
new file mode 100644
index 0000000..7f5a9a9
--- /dev/null
+++ b/apps/backend/src/common-apis/common.router.ts
@@ -0,0 +1,10 @@
+import { Router } from "express";
+import commonProductsRouter from "./common-product.router";
+
+const router = Router();
+
+router.use('/products', commonProductsRouter)
+
+const commonRouter = router;
+
+export default commonRouter;
\ No newline at end of file
diff --git a/apps/backend/src/db/db_index.ts b/apps/backend/src/db/db_index.ts
new file mode 100755
index 0000000..92cbfbb
--- /dev/null
+++ b/apps/backend/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/apps/backend/src/db/porter.ts b/apps/backend/src/db/porter.ts
new file mode 100644
index 0000000..49165ea
--- /dev/null
+++ b/apps/backend/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 './db_index';
+import {
+ userDetails,
+ productInfo,
+ productTagInfo,
+ complaints
+} from './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);
+ });
\ No newline at end of file
diff --git a/apps/backend/src/db/schema.ts b/apps/backend/src/db/schema.ts
new file mode 100755
index 0000000..2516f11
--- /dev/null
+++ b/apps/backend/src/db/schema.ts
@@ -0,0 +1,644 @@
+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'),
+ 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),
+ 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),
+ deliverySequence: jsonb('delivery_sequence').$defaultFn(() => {}),
+});
+
+export const vendorSnippets = mf.table('vendor_snippets', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ snippetCode: varchar('snippet_code', { length: 255 }).notNull().unique(),
+ slotId: integer('slot_id').notNull().references(() => deliverySlotInfo.id),
+ 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 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 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),
+}));
+
+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),
+}));
+
+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 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] }),
+}));
\ No newline at end of file
diff --git a/apps/backend/src/db/seed.ts b/apps/backend/src/db/seed.ts
new file mode 100644
index 0000000..aa1c05e
--- /dev/null
+++ b/apps/backend/src/db/seed.ts
@@ -0,0 +1,137 @@
+import { db } from "./db_index";
+import { units, productInfo, deliverySlotInfo, productSlots, keyValStore, staffRoles, staffPermissions, staffRolePermissions } from "./schema";
+import { eq } from "drizzle-orm";
+import { minOrderValue, deliveryCharge } from '../lib/env-exporter';
+import { CONST_KEYS } from '../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.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://play.google.com/store/apps/details?id=in.freshyo.app' },
+ { 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.");
+}
\ No newline at end of file
diff --git a/apps/backend/src/db/types.ts b/apps/backend/src/db/types.ts
new file mode 100755
index 0000000..78c549f
--- /dev/null
+++ b/apps/backend/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 "./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;
+};
\ No newline at end of file
diff --git a/apps/backend/src/jobs/jobs-index.ts b/apps/backend/src/jobs/jobs-index.ts
new file mode 100644
index 0000000..1e64d68
--- /dev/null
+++ b/apps/backend/src/jobs/jobs-index.ts
@@ -0,0 +1,28 @@
+import * as cron from 'node-cron';
+import { checkPendingPayments, checkRefundStatuses } from './payment-status-checker';
+
+const runCombinedJob = async () => {
+ const start = Date.now();
+ try {
+ console.log('Starting combined job: payments and refunds check');
+
+ // Run payment check
+ // await checkPendingPayments();
+
+ // Run refund check
+ // await checkRefundStatuses();
+
+ console.log('Combined job completed successfully');
+ } catch (error) {
+ console.error('Error in combined job:', error);
+ } finally {
+ const duration = Date.now() - start;
+ console.log(`Combined job took ${duration}ms`);
+ }
+};
+
+// Run on startup
+runCombinedJob();
+
+// Schedule combined cron job every 10 minutes
+cron.schedule('*/10 * * * *', runCombinedJob);
\ No newline at end of file
diff --git a/apps/backend/src/jobs/payment-status-checker.ts b/apps/backend/src/jobs/payment-status-checker.ts
new file mode 100644
index 0000000..92f72b1
--- /dev/null
+++ b/apps/backend/src/jobs/payment-status-checker.ts
@@ -0,0 +1,79 @@
+import * as cron from 'node-cron';
+import { db } from '../db/db_index';
+import { payments, orders, deliverySlotInfo, refunds } from '../db/schema';
+import { eq, and, gt, isNotNull } from 'drizzle-orm';
+import { RazorpayPaymentService } from '../lib/payments-utils';
+
+interface PendingPaymentRecord {
+ payment: typeof payments.$inferSelect;
+ order: typeof orders.$inferSelect;
+ slot: typeof deliverySlotInfo.$inferSelect;
+}
+
+export const createPaymentNotification = (record: PendingPaymentRecord) => {
+ // Construct message from record data
+ const message = `Payment pending for order ORD${record.order.readableId.toString().padStart(3, '0')}. Please complete before orders close time.`;
+
+ // TODO: Implement notification sending logic using record.order.userId, record.order.id, message
+ console.log(`Sending notification to user ${record.order.userId} for order ${record.order.id}: ${message}`);
+};
+
+export const checkRefundStatuses = async () => {
+ try {
+ const initiatedRefunds = await db
+ .select()
+ .from(refunds)
+ .where(and(
+ eq(refunds.refundStatus, 'initiated'),
+ isNotNull(refunds.merchantRefundId)
+ ));
+
+ // Process refunds concurrently using Promise.allSettled
+ const promises = initiatedRefunds.map(async (refund) => {
+ if (!refund.merchantRefundId) return;
+
+ try {
+ const razorpayRefund = await RazorpayPaymentService.fetchRefund(refund.merchantRefundId);
+
+ if (razorpayRefund.status === 'processed') {
+ await db
+ .update(refunds)
+ .set({ refundStatus: 'success', refundProcessedAt: new Date() })
+ .where(eq(refunds.id, refund.id));
+ }
+ } catch (error) {
+ console.error(`Error checking refund ${refund.id}:`, error);
+ }
+ });
+
+ // Wait for all promises to complete
+ await Promise.allSettled(promises);
+ } catch (error) {
+ console.error('Error in checkRefundStatuses:', error);
+ }
+};
+
+export const checkPendingPayments = async () => {
+ try {
+ const pendingPayments = await db
+ .select({
+ payment: payments,
+ order: orders,
+ slot: deliverySlotInfo,
+ })
+ .from(payments)
+ .innerJoin(orders, eq(payments.orderId, orders.id))
+ .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))
+ .where(and(
+ eq(payments.status, 'pending'),
+ gt(deliverySlotInfo.freezeTime, new Date()) // Freeze time not passed
+ ));
+
+ for (const record of pendingPayments) {
+ createPaymentNotification(record);
+ }
+ } catch (error) {
+ console.error('Error checking pending payments:', error);
+ }
+};
+
diff --git a/apps/backend/src/lib/api-error.ts b/apps/backend/src/lib/api-error.ts
new file mode 100755
index 0000000..03373f3
--- /dev/null
+++ b/apps/backend/src/lib/api-error.ts
@@ -0,0 +1,14 @@
+export class ApiError extends Error {
+ public statusCode: number;
+ public details?: any;
+
+ constructor(message: string, statusCode: number = 500, details?: any) {
+ console.log(message)
+
+ super(message);
+ this.name = 'ApiError';
+ this.statusCode = statusCode;
+ this.details = details;
+ Error.captureStackTrace?.(this, ApiError);
+ }
+}
\ No newline at end of file
diff --git a/apps/backend/src/lib/axios.ts b/apps/backend/src/lib/axios.ts
new file mode 100755
index 0000000..636e216
--- /dev/null
+++ b/apps/backend/src/lib/axios.ts
@@ -0,0 +1,10 @@
+import axiosParent from "axios";
+import { phonePeBaseUrl } from "./env-exporter";
+
+export const phonepeAxios = axiosParent.create({
+ baseURL: phonePeBaseUrl,
+ timeout: 40000,
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded",
+ },
+});
diff --git a/apps/backend/src/lib/catch-async.ts b/apps/backend/src/lib/catch-async.ts
new file mode 100755
index 0000000..d78004b
--- /dev/null
+++ b/apps/backend/src/lib/catch-async.ts
@@ -0,0 +1,6 @@
+import express from 'express';
+const catchAsync =
+ (fn: express.RequestHandler) =>
+ (req: express.Request, res: express.Response, next: express.NextFunction) =>
+ Promise.resolve(fn(req, res, next)).catch(next);
+export default catchAsync;
\ No newline at end of file
diff --git a/apps/backend/src/lib/const-keys.ts b/apps/backend/src/lib/const-keys.ts
new file mode 100644
index 0000000..1431e98
--- /dev/null
+++ b/apps/backend/src/lib/const-keys.ts
@@ -0,0 +1,45 @@
+export const CONST_KEYS = {
+ minRegularOrderValue: 'minRegularOrderValue',
+ freeDeliveryThreshold: 'freeDeliveryThreshold',
+ deliveryCharge: 'deliveryCharge',
+ flashFreeDeliveryThreshold: 'flashFreeDeliveryThreshold',
+ flashDeliveryCharge: 'flashDeliveryCharge',
+ platformFeePercent: 'platformFeePercent',
+ taxRate: 'taxRate',
+ minOrderAmountForCoupon: 'minOrderAmountForCoupon',
+ maxCouponDiscount: 'maxCouponDiscount',
+ flashDeliverySlotId: 'flashDeliverySlotId',
+ readableOrderId: 'readableOrderId',
+ versionNum: 'versionNum',
+ playStoreUrl: 'playStoreUrl',
+ appStoreUrl: 'appStoreUrl',
+ popularItems: 'popularItems',
+ isFlashDeliveryEnabled: 'isFlashDeliveryEnabled',
+ supportMobile: 'supportMobile',
+ supportEmail: 'supportEmail',
+} as const;
+
+export const CONST_LABELS: Record = {
+ minRegularOrderValue: 'Minimum Regular Order Value',
+ freeDeliveryThreshold: 'Free Delivery Threshold',
+ deliveryCharge: 'Delivery Charge',
+ flashFreeDeliveryThreshold: 'Flash Free Delivery Threshold',
+ flashDeliveryCharge: 'Flash Delivery Charge',
+ platformFeePercent: 'Platform Fee Percent',
+ taxRate: 'Tax Rate',
+ minOrderAmountForCoupon: 'Minimum Order Amount for Coupon',
+ maxCouponDiscount: 'Maximum Coupon Discount',
+ flashDeliverySlotId: 'Flash Delivery Slot ID',
+ readableOrderId: 'Readable Order ID',
+ versionNum: 'Version Number',
+ playStoreUrl: 'Play Store URL',
+ appStoreUrl: 'App Store URL',
+ popularItems: 'Popular Items',
+ isFlashDeliveryEnabled: 'Enable Flash Delivery',
+ supportMobile: 'Support Mobile',
+ supportEmail: 'Support Email',
+};
+
+export type ConstKey = (typeof CONST_KEYS)[keyof typeof CONST_KEYS];
+
+export const CONST_KEYS_ARRAY = Object.values(CONST_KEYS) as ConstKey[];
diff --git a/apps/backend/src/lib/const-store.ts b/apps/backend/src/lib/const-store.ts
new file mode 100644
index 0000000..bd9b658
--- /dev/null
+++ b/apps/backend/src/lib/const-store.ts
@@ -0,0 +1,56 @@
+import { db } from '../db/db_index';
+import { keyValStore } from '../db/schema';
+import redisClient from './redis-client';
+import { CONST_KEYS, CONST_KEYS_ARRAY, type ConstKey } from './const-keys';
+
+const CONST_REDIS_PREFIX = 'const:';
+
+export const computeConstants = async (): Promise => {
+ try {
+ console.log('Computing constants from database...');
+
+ const constants = await db.select().from(keyValStore);
+
+ console.log({constants})
+
+ for (const constant of constants) {
+ const redisKey = `${CONST_REDIS_PREFIX}${constant.key}`;
+ const value = JSON.stringify(constant.value);
+ console.log({redisKey, value})
+
+ await redisClient.set(redisKey, value);
+ }
+
+ console.log(`Computed and stored ${constants.length} constants in Redis`);
+ } catch (error) {
+ console.error('Failed to compute constants:', error);
+ throw error;
+ }
+};
+
+export const getConstant = async (key: string): Promise => {
+ const redisKey = `${CONST_REDIS_PREFIX}${key}`;
+ const value = await redisClient.get(redisKey);
+
+ if (!value) {
+ return null;
+ }
+
+ try {
+ return JSON.parse(value) as T;
+ } catch {
+ return value as unknown as T;
+ }
+};
+
+export const getAllConstValues = async (): Promise> => {
+ const result: Record = {};
+
+ for (const key of CONST_KEYS_ARRAY) {
+ result[key] = await getConstant(key);
+ }
+
+ return result as Record;
+};
+
+export { CONST_KEYS, CONST_KEYS_ARRAY };
diff --git a/apps/backend/src/lib/const-strings.ts b/apps/backend/src/lib/const-strings.ts
new file mode 100755
index 0000000..37e2952
--- /dev/null
+++ b/apps/backend/src/lib/const-strings.ts
@@ -0,0 +1,28 @@
+/**
+ * This file contains constants that are used throughout the application
+ * to avoid hardcoding strings in multiple places
+ */
+
+// User role and designation constants
+export const READABLE_ORDER_ID_KEY = 'readableOrderId';
+
+// Queue constants
+export const NOTIFS_QUEUE = 'notifications';
+export const OTP_COMMENT_NAME='otp-comment'
+
+// Notification message constants
+export const ORDER_PLACED_MESSAGE = 'Your order has been placed successfully!';
+export const PAYMENT_FAILED_MESSAGE = 'Payment failed. Please try again.';
+export const ORDER_PACKAGED_MESSAGE = 'Your order has been packaged and is ready for delivery.';
+export const ORDER_OUT_FOR_DELIVERY_MESSAGE = 'Your order is out for delivery.';
+export const ORDER_DELIVERED_MESSAGE = 'Your order has been delivered.';
+export const ORDER_CANCELLED_MESSAGE = 'Your order has been cancelled.';
+export const REFUND_INITIATED_MESSAGE = 'Refund has been initiated for your order.';
+export const WELCOME_MESSAGE = 'Welcome to Farm2Door! Thank you for joining us.';
+
+export const REFUND_STATUS = {
+ PENDING: 'none',
+ NOT_APPLICABLE: 'na',
+ PROCESSING: 'initiated',
+ SUCCESS: 'success',
+};
\ No newline at end of file
diff --git a/apps/backend/src/lib/delete-image.ts b/apps/backend/src/lib/delete-image.ts
new file mode 100644
index 0000000..5289c45
--- /dev/null
+++ b/apps/backend/src/lib/delete-image.ts
@@ -0,0 +1,46 @@
+import { eq } from "drizzle-orm";
+import { db } from "../db/db_index";
+import { deleteImageUtil, getOriginalUrlFromSignedUrl } from "./s3-client";
+import { s3Url } from "./env-exporter";
+
+function extractS3Key(url: string): string | null {
+ try {
+ // Check if this is a signed URL first and get the original if it is
+ const originalUrl = getOriginalUrlFromSignedUrl(url) || url;
+
+ // Find the index of '.com/' in the URL
+ // const comIndex = originalUrl.indexOf(".com/");
+ const baseUrlIndex = originalUrl.indexOf(s3Url);
+
+ // If '.com/' is found, return everything after it
+ if (baseUrlIndex !== -1) {
+ return originalUrl.substring(baseUrlIndex + s3Url.length); // +5 to skip '.com/'
+ }
+ } catch (error) {
+ console.error("Error extracting key from URL:", error);
+ }
+
+ // Return null if the pattern isn't found or there was an error
+ return null;
+}
+
+
+export async function deleteS3Image(imageUrl: string) {
+ try {
+ // First check if this is a signed URL and get the original if it is
+ const originalUrl = getOriginalUrlFromSignedUrl(imageUrl) || imageUrl;
+
+ const key = extractS3Key(originalUrl || "");
+
+
+ if (!key) {
+ throw new Error("Invalid image URL format");
+ }
+ const deleteS3 = await deleteImageUtil({keys: [key] });
+ if (!deleteS3) {
+ throw new Error("Failed to delete image from S3");
+ }
+ } catch (error) {
+ console.error("Error deleting image from S3:", error);
+ }
+}
diff --git a/apps/backend/src/lib/disk-persisted-set.ts b/apps/backend/src/lib/disk-persisted-set.ts
new file mode 100644
index 0000000..5f968f1
--- /dev/null
+++ b/apps/backend/src/lib/disk-persisted-set.ts
@@ -0,0 +1,79 @@
+import fs from "fs";
+import path from "path";
+
+export class DiskPersistedSet {
+ private set: Set;
+ private readonly filePath: string;
+ private dirty = false;
+
+ constructor(filePath: string = "./persister") {
+ this.filePath = path.resolve(filePath);
+
+ // ✅ Ensure file exists
+ if (!fs.existsSync(this.filePath)) {
+ fs.writeFileSync(this.filePath, "", "utf8");
+ }
+
+ // ✅ Load existing values from file
+ const contents = fs.readFileSync(this.filePath, "utf8");
+ this.set = new Set(
+ contents.split("\n").map(x => x.trim()).filter(x => x.length > 0)
+ );
+
+ this.registerExitHandlers();
+ }
+
+ private persist() {
+ if (!this.dirty) return;
+ fs.writeFileSync(this.filePath, Array.from(this.set).join("\n"), "utf8");
+ this.dirty = false;
+ }
+
+ private markDirty() {
+ this.dirty = true;
+ }
+
+ add(value: string): void {
+ if (!this.set.has(value)) {
+ this.set.add(value);
+ this.markDirty();
+ this.persist();
+ }
+ }
+
+ delete(value: string): void {
+ if (this.set.delete(value)) {
+ this.markDirty();
+ this.persist();
+ }
+ }
+
+ has(value: string): boolean {
+ return this.set.has(value);
+ }
+
+ values(): string[] {
+ return Array.from(this.set);
+ }
+
+ clear(): void {
+ if (this.set.size > 0) {
+ this.set.clear();
+ this.markDirty();
+ this.persist();
+ }
+ }
+
+ private registerExitHandlers() {
+ const flush = () => this.persist();
+
+ process.on("exit", flush);
+ process.on("SIGINT", () => { flush(); process.exit(); });
+ process.on("SIGTERM", () => { flush(); process.exit(); });
+ process.on("uncaughtException", (err) => {
+ console.error("Uncaught exception. Flushing DiskPersistedSet:", err);
+ flush();
+ process.exit(1);
+ });
+ }
+}
diff --git a/apps/backend/src/lib/env-exporter.ts b/apps/backend/src/lib/env-exporter.ts
new file mode 100755
index 0000000..65a53b2
--- /dev/null
+++ b/apps/backend/src/lib/env-exporter.ts
@@ -0,0 +1,43 @@
+
+export const appUrl = process.env.APP_URL as string;
+
+export const jwtSecret: string = process.env.JWT_SECRET as string
+
+export const defaultRoleName = 'gen_user';
+
+export const encodedJwtSecret = new TextEncoder().encode(jwtSecret)
+
+export const s3AccessKeyId = process.env.S3_ACCESS_KEY_ID as string
+
+export const s3SecretAccessKey = process.env.S3_SECRET_ACCESS_KEY as string
+
+export const s3BucketName = process.env.S3_BUCKET_NAME as string
+
+export const s3Region = process.env.S3_REGION as string
+
+export const s3Url = process.env.S3_URL as string
+
+export const redisUrl = process.env.REDIS_URL as string
+
+
+export const expoAccessToken = process.env.EXPO_ACCESS_TOKEN as string;
+
+export const phonePeBaseUrl = process.env.PHONE_PE_BASE_URL as string;
+
+export const phonePeClientId = process.env.PHONE_PE_CLIENT_ID as string;
+
+export const phonePeClientVersion = Number(process.env.PHONE_PE_CLIENT_VERSION as string);
+
+export const phonePeClientSecret = process.env.PHONE_PE_CLIENT_SECRET as string;
+
+export const phonePeMerchantId = process.env.PHONE_PE_MERCHANT_ID as string;
+
+export const razorpayId = process.env.RAZORPAY_KEY as string;
+
+export const razorpaySecret = process.env.RAZORPAY_SECRET as string;
+
+export const otpSenderAuthToken = process.env.OTP_SENDER_AUTH_TOKEN as string;
+
+export const minOrderValue = Number(process.env.MIN_ORDER_VALUE as string);
+
+export const deliveryCharge = Number(process.env.DELIVERY_CHARGE as string);
diff --git a/apps/backend/src/lib/event-queue.ts b/apps/backend/src/lib/event-queue.ts
new file mode 100644
index 0000000..13e0d09
--- /dev/null
+++ b/apps/backend/src/lib/event-queue.ts
@@ -0,0 +1,12 @@
+import redisClient from './redis-client';
+
+export async function enqueue(queueName: string, eventData: any): Promise {
+ try {
+ const jsonData = JSON.stringify(eventData);
+ const result = await redisClient.lPush(queueName, jsonData);
+ return result > 0;
+ } catch (error) {
+ console.error('Event enqueue error:', error);
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/apps/backend/src/lib/expo-service.ts b/apps/backend/src/lib/expo-service.ts
new file mode 100755
index 0000000..1e87423
--- /dev/null
+++ b/apps/backend/src/lib/expo-service.ts
@@ -0,0 +1,41 @@
+import { Expo } from "expo-server-sdk";
+import { title } from "process";
+import { expoAccessToken } from "./env-exporter";
+
+const expo = new Expo({
+ accessToken: expoAccessToken,
+ useFcmV1: true,
+});
+
+type NotificationArgs = {
+ pushToken: string;
+ title?: string;
+ body?: string;
+ data: Record | undefined;
+ // data?: object;
+};
+
+export const sendPushNotificationsMany = async (args: NotificationArgs[]) => {
+ // const { pushToken, title, body, data } = args;
+ const notifPayloads = args.map((arg) => ({
+ to: arg.pushToken,
+ title: arg.title,
+ body: arg.body,
+ data: arg.data,
+ sound: "default",
+ priority: "high" as any,
+ }));
+ const chunks = expo.chunkPushNotifications(notifPayloads);
+
+ let tickets = [];
+ (async () => {
+ for (let chunk of chunks) {
+ try {
+ let ticketChunk = await expo.sendPushNotificationsAsync(chunk);
+ tickets.push(...ticketChunk);
+ } catch (error) {
+ console.error(error);
+ }
+ }
+ })();
+};
diff --git a/apps/backend/src/lib/init.ts b/apps/backend/src/lib/init.ts
new file mode 100755
index 0000000..1e3532b
--- /dev/null
+++ b/apps/backend/src/lib/init.ts
@@ -0,0 +1,34 @@
+import roleManager from './roles-manager';
+import './notif-job';
+import { computeConstants } from './const-store';
+
+/**
+ * Initialize all application services
+ * This function handles initialization of:
+ * - Role Manager (fetches and caches all roles)
+ * - Const Store (syncs constants from DB to Redis)
+ * - Other services can be added here in the future
+ */
+export const initFunc = async (): Promise => {
+ try {
+ console.log('Starting application initialization...');
+
+ // Initialize role manager
+ await roleManager.fetchRoles();
+ console.log('Role manager initialized successfully');
+
+ // Compute and store constants in Redis
+ await computeConstants();
+ console.log('Const store initialized successfully');
+
+ // Notification queue and worker are initialized via import
+ console.log('Notification queue and worker initialized');
+
+ console.log('Application initialization completed successfully');
+ } catch (error) {
+ console.error('Application initialization failed:', error);
+ throw error;
+ }
+};
+
+export default initFunc;
diff --git a/apps/backend/src/lib/mbnr-geojson.ts b/apps/backend/src/lib/mbnr-geojson.ts
new file mode 100644
index 0000000..7dc88fe
--- /dev/null
+++ b/apps/backend/src/lib/mbnr-geojson.ts
@@ -0,0 +1,120 @@
+export const mbnrGeoJson = {
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "properties": {},
+ "geometry": {
+ "coordinates": [
+ [
+ [
+ 78.0540565157155,
+ 16.750355644371382
+ ],
+ [
+ 78.02147549424018,
+ 16.72066473405593
+ ],
+ [
+ 78.03026125246384,
+ 16.71696749930787
+ ],
+ [
+ 78.0438058450269,
+ 16.72191442229257
+ ],
+ [
+ 78.01378723066603,
+ 16.729427120762438
+ ],
+ [
+ 78.01192390645633,
+ 16.767270033080678
+ ],
+ [
+ 77.98897480599248,
+ 16.78383139678816
+ ],
+ [
+ 77.98650506846502,
+ 16.779477610410623
+ ],
+ [
+ 77.99211289459566,
+ 16.764294442899583
+ ],
+ [
+ 77.9917733766166,
+ 16.760247911187193
+ ],
+ [
+ 77.9871626670851,
+ 16.762487176781022
+ ],
+ [
+ 77.98216269568468,
+ 16.762520539253813
+ ],
+ [
+ 77.9728079653313,
+ 16.75895746646411
+ ],
+ [
+ 77.97076993211158,
+ 16.749241850772236
+ ],
+ [
+ 77.97290869571145,
+ 16.714289841456335
+ ],
+ [
+ 77.98673742913684,
+ 16.716189282573396
+ ],
+ [
+ 78.00286970994557,
+ 16.718191131206893
+ ],
+ [
+ 78.02757966423519,
+ 16.720603921728966
+ ],
+ [
+ 78.01653780770818,
+ 16.73184590223127
+ ],
+ [
+ 78.0064695230268,
+ 16.760236966033375
+ ],
+ [
+ 78.0148831108591,
+ 16.760801801995825
+ ],
+ [
+ 78.01488756695255,
+ 16.75827980335133
+ ],
+ [
+ 78.0244311364159,
+ 16.744778942163208
+ ],
+ [
+ 78.03342267256608,
+ 16.760773251410058
+ ],
+ [
+ 78.05078586709863,
+ 16.763902127913653
+ ],
+ [
+ 78.0540565157155,
+ 16.750355644371382
+ ]
+ ]
+ ],
+ "type": "Polygon"
+ }
+ }
+ ]
+};
\ No newline at end of file
diff --git a/apps/backend/src/lib/mbnr.geojson b/apps/backend/src/lib/mbnr.geojson
new file mode 100644
index 0000000..32d63b3
--- /dev/null
+++ b/apps/backend/src/lib/mbnr.geojson
@@ -0,0 +1,120 @@
+{
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "properties": {},
+ "geometry": {
+ "coordinates": [
+ [
+ [
+ 78.0540565157155,
+ 16.750355644371382
+ ],
+ [
+ 78.02147549424018,
+ 16.72066473405593
+ ],
+ [
+ 78.03026125246384,
+ 16.71696749930787
+ ],
+ [
+ 78.0438058450269,
+ 16.72191442229257
+ ],
+ [
+ 78.01378723066603,
+ 16.729427120762438
+ ],
+ [
+ 78.01192390645633,
+ 16.767270033080678
+ ],
+ [
+ 77.98897480599248,
+ 16.78383139678816
+ ],
+ [
+ 77.98650506846502,
+ 16.779477610410623
+ ],
+ [
+ 77.99211289459566,
+ 16.764294442899583
+ ],
+ [
+ 77.9917733766166,
+ 16.760247911187193
+ ],
+ [
+ 77.9871626670851,
+ 16.762487176781022
+ ],
+ [
+ 77.98216269568468,
+ 16.762520539253813
+ ],
+ [
+ 77.9728079653313,
+ 16.75895746646411
+ ],
+ [
+ 77.97076993211158,
+ 16.749241850772236
+ ],
+ [
+ 77.97290869571145,
+ 16.714289841456335
+ ],
+ [
+ 77.98673742913684,
+ 16.716189282573396
+ ],
+ [
+ 78.00286970994557,
+ 16.718191131206893
+ ],
+ [
+ 78.02757966423519,
+ 16.720603921728966
+ ],
+ [
+ 78.01653780770818,
+ 16.73184590223127
+ ],
+ [
+ 78.0064695230268,
+ 16.760236966033375
+ ],
+ [
+ 78.0148831108591,
+ 16.760801801995825
+ ],
+ [
+ 78.01488756695255,
+ 16.75827980335133
+ ],
+ [
+ 78.0244311364159,
+ 16.744778942163208
+ ],
+ [
+ 78.03342267256608,
+ 16.760773251410058
+ ],
+ [
+ 78.05078586709863,
+ 16.763902127913653
+ ],
+ [
+ 78.0540565157155,
+ 16.750355644371382
+ ]
+ ]
+ ],
+ "type": "Polygon"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/apps/backend/src/lib/notif-job.ts b/apps/backend/src/lib/notif-job.ts
new file mode 100644
index 0000000..fcbd7e1
--- /dev/null
+++ b/apps/backend/src/lib/notif-job.ts
@@ -0,0 +1,111 @@
+import { Queue, Worker } from 'bullmq';
+import { redisUrl } from './env-exporter';
+import {
+ NOTIFS_QUEUE,
+ ORDER_PLACED_MESSAGE,
+ PAYMENT_FAILED_MESSAGE,
+ ORDER_PACKAGED_MESSAGE,
+ ORDER_OUT_FOR_DELIVERY_MESSAGE,
+ ORDER_DELIVERED_MESSAGE,
+ ORDER_CANCELLED_MESSAGE,
+ REFUND_INITIATED_MESSAGE
+} from './const-strings';
+
+export const notificationQueue = new Queue(NOTIFS_QUEUE, {
+ connection: { url: redisUrl },
+ defaultJobOptions: {
+ removeOnComplete: 50,
+ removeOnFail: 100,
+ attempts: 3,
+ },
+});
+
+export const notificationWorker = new Worker(NOTIFS_QUEUE, async (job) => {
+ if (!job) return;
+ console.log(`Processing notification job ${job.id}`);
+ // TODO: Implement sendPushNotification
+}, {
+ connection: { url: redisUrl },
+ concurrency: 5,
+});
+
+notificationWorker.on('completed', (job) => {
+ if (job) console.log(`Notification job ${job.id} completed`);
+});
+notificationWorker.on('failed', (job, err) => {
+ if (job) console.error(`Notification job ${job.id} failed:`, err);
+});
+
+export async function scheduleNotification(userId: number, payload: any, options?: { delay?: number; priority?: number }) {
+ const jobData = { userId, ...payload };
+ await notificationQueue.add('send-notification', jobData, options);
+}
+
+// Utility methods for specific notification events
+export async function sendOrderPlacedNotification(userId: number, orderId?: string) {
+ await scheduleNotification(userId, {
+ title: 'Order Placed',
+ body: ORDER_PLACED_MESSAGE,
+ type: 'order',
+ orderId
+ });
+}
+
+export async function sendPaymentFailedNotification(userId: number, orderId?: string) {
+ await scheduleNotification(userId, {
+ title: 'Payment Failed',
+ body: PAYMENT_FAILED_MESSAGE,
+ type: 'payment',
+ orderId
+ });
+}
+
+export async function sendOrderPackagedNotification(userId: number, orderId?: string) {
+ await scheduleNotification(userId, {
+ title: 'Order Packaged',
+ body: ORDER_PACKAGED_MESSAGE,
+ type: 'order',
+ orderId
+ });
+}
+
+export async function sendOrderOutForDeliveryNotification(userId: number, orderId?: string) {
+ await scheduleNotification(userId, {
+ title: 'Out for Delivery',
+ body: ORDER_OUT_FOR_DELIVERY_MESSAGE,
+ type: 'order',
+ orderId
+ });
+}
+
+export async function sendOrderDeliveredNotification(userId: number, orderId?: string) {
+ await scheduleNotification(userId, {
+ title: 'Order Delivered',
+ body: ORDER_DELIVERED_MESSAGE,
+ type: 'order',
+ orderId
+ });
+}
+
+export async function sendOrderCancelledNotification(userId: number, orderId?: string) {
+ await scheduleNotification(userId, {
+ title: 'Order Cancelled',
+ body: ORDER_CANCELLED_MESSAGE,
+ type: 'order',
+ orderId
+ });
+}
+
+export async function sendRefundInitiatedNotification(userId: number, orderId?: string) {
+ await scheduleNotification(userId, {
+ title: 'Refund Initiated',
+ body: REFUND_INITIATED_MESSAGE,
+ type: 'refund',
+ orderId
+ });
+}
+
+process.on('SIGTERM', async () => {
+ await notificationQueue.close();
+ await notificationWorker.close();
+});
\ No newline at end of file
diff --git a/apps/backend/src/lib/notif-service.ts b/apps/backend/src/lib/notif-service.ts
new file mode 100755
index 0000000..2cb9480
--- /dev/null
+++ b/apps/backend/src/lib/notif-service.ts
@@ -0,0 +1,247 @@
+import { db } from "../db/db_index";
+import { sendPushNotificationsMany } from "./expo-service";
+// import { usersTable, notifCredsTable, notificationTable } from "../db/schema";
+import { eq, inArray } from "drizzle-orm";
+
+// Core notification dispatch methods (renamed for clarity)
+export async function dispatchBulkNotification({
+ userIds = [],
+ pushTokens = [],
+ title,
+ body,
+ data,
+}: {
+ userIds?: number[];
+ pushTokens?: string[];
+ title: string;
+ body: string;
+ data?: Record;
+}) {
+ try {
+ let allPushTokens: string[] = [];
+
+ // Add provided pushTokens directly
+ if (pushTokens && pushTokens.length > 0) {
+ allPushTokens.push(...pushTokens.filter(Boolean));
+ }
+
+ // Fetch push tokens for userIds
+ // if (userIds && userIds.length > 0) {
+ // const tokensFromDb = await db.query.notifCredsTable.findMany({
+ // where: inArray(notifCredsTable.userId, userIds),
+ // columns: { pushToken: true },
+ // });
+ // allPushTokens.push(
+ // ...tokensFromDb.map((t) => t.pushToken).filter(Boolean)
+ // );
+ // }
+
+ // Remove duplicates
+ allPushTokens = Array.from(new Set(allPushTokens));
+
+ if (allPushTokens.length === 0) {
+ console.warn(`No push tokens found for users: ${userIds?.join(", ")}`);
+ return;
+ }
+
+ const messages = allPushTokens.map((pushToken) => ({
+ pushToken,
+ title,
+ body,
+ data,
+ }));
+ await sendPushNotificationsMany(messages);
+ } catch (error) {
+ console.error("Error dispatching bulk notifications:", error);
+ throw new Error("Failed to dispatch notifications");
+ }
+}
+
+// Helper to dispatch notification to a single user or pushToken
+export async function dispatchUserNotification({
+ userId,
+ pushToken,
+ title,
+ body,
+ data,
+}: {
+ userId?: number;
+ pushToken?: string;
+ title: string;
+ body: string;
+ data?: Record;
+}) {
+ // Add entry to notificationTable if userId is provided
+ if (userId) {
+ try {
+ // await db.insert(notificationTable).values({
+ // userId,
+ // title,
+ // body,
+ // payload: data,
+ // // addedOn will default to now
+ // });
+ } catch (err) {
+ console.error('Failed to insert notificationTable entry:', err);
+ }
+ }
+
+ await dispatchBulkNotification({
+ userIds: userId ? [userId] : [],
+ pushTokens: pushToken ? [pushToken] : [],
+ title,
+ body,
+ data,
+ });
+}
+
+// =============================================================================
+// PURPOSE-SPECIFIC NOTIFICATION METHODS
+// =============================================================================
+
+// Order-related notifications
+export const notifyOrderPlaced = (orderId: number, userId: number) =>
+ dispatchUserNotification({
+ title: 'Order Placed Successfully! 🎉',
+ body: `Your order #${orderId} has been placed and is being processed.`,
+ userId,
+ data: { orderId, type: 'order_placed' }
+ });
+
+export const notifyOrderConfirmed = (orderId: number, userId: number) =>
+ dispatchUserNotification({
+ title: 'Order Confirmed! ✅',
+ body: `Your order #${orderId} has been confirmed and is being prepared.`,
+ userId,
+ data: { orderId, type: 'order_confirmed' }
+ });
+
+export const notifyOrderReady = (orderId: number, userId: number) =>
+ dispatchUserNotification({
+ title: 'Order Ready for Pickup! 🍽️',
+ body: `Your order #${orderId} is ready for pickup.`,
+ userId,
+ data: { orderId, type: 'order_ready' }
+ });
+
+export const notifyOrderCancelled = (orderId: number, userId: number, reason?: string) =>
+ dispatchUserNotification({
+ title: 'Order Cancelled ❌',
+ body: `Your order #${orderId} has been cancelled.${reason ? ` Reason: ${reason}` : ''}`,
+ userId,
+ data: { orderId, type: 'order_cancelled', reason }
+ });
+
+// Delivery notifications
+export const notifyDeliveryAssigned = (orderId: number, userId: number, deliveryPerson: string) =>
+ dispatchUserNotification({
+ title: 'Delivery Partner Assigned 🚚',
+ body: `${deliveryPerson} will deliver your order #${orderId}.`,
+ userId,
+ data: { orderId, deliveryPerson, type: 'delivery_assigned' }
+ });
+
+export const notifyOutForDelivery = (orderId: number, userId: number, eta: string) =>
+ dispatchUserNotification({
+ title: 'Out for Delivery! 📦',
+ body: `Your order #${orderId} is out for delivery. Expected arrival: ${eta}`,
+ userId,
+ data: { orderId, eta, type: 'out_for_delivery' }
+ });
+
+export const notifyDelivered = (orderId: number, userId: number) =>
+ dispatchUserNotification({
+ title: 'Order Delivered! 🎊',
+ body: `Your order #${orderId} has been delivered successfully.`,
+ userId,
+ data: { orderId, type: 'delivered' }
+ });
+
+// Payment notifications
+export const notifyPaymentSuccess = (orderId: number, userId: number, amount: number) =>
+ dispatchUserNotification({
+ title: 'Payment Successful 💳',
+ body: `Payment of ₹${amount} for order #${orderId} was successful.`,
+ userId,
+ data: { orderId, amount, type: 'payment_success' }
+ });
+
+export const notifyPaymentFailed = (orderId: number, userId: number) =>
+ dispatchUserNotification({
+ title: 'Payment Failed ❌',
+ body: `Payment for order #${orderId} failed. Please try again.`,
+ userId,
+ data: { orderId, type: 'payment_failed' }
+ });
+
+export const notifyRefundProcessed = (orderId: number, userId: number, amount: number) =>
+ dispatchUserNotification({
+ title: 'Refund Processed 💰',
+ body: `Refund of ₹${amount} for order #${orderId} has been processed.`,
+ userId,
+ data: { orderId, amount, type: 'refund_processed' }
+ });
+
+// Promotional notifications
+export const notifyNewOffer = (userIds: number[], offerTitle: string, offerDetails: string) =>
+ dispatchBulkNotification({
+ title: `New Offer: ${offerTitle} 🎁`,
+ body: offerDetails,
+ userIds,
+ data: { type: 'promotion', offerTitle }
+ });
+
+export const notifyFlashSale = (userIds: number[], productName: string, discount: number) =>
+ dispatchBulkNotification({
+ title: 'Flash Sale! ⚡',
+ body: `Get ${discount}% off on ${productName}. Limited time offer!`,
+ userIds,
+ data: { type: 'flash_sale', productName, discount }
+ });
+
+export const notifyLoyaltyPointsEarned = (userId: number, points: number, reason: string) =>
+ dispatchUserNotification({
+ title: 'Loyalty Points Earned! ⭐',
+ body: `You earned ${points} points for ${reason}.`,
+ userId,
+ data: { points, reason, type: 'loyalty_points' }
+ });
+
+// Account notifications
+export const notifyWelcome = (userId: number, userName: string) =>
+ dispatchUserNotification({
+ title: 'Welcome to Meat Farmer! 🥩',
+ body: `Hi ${userName}, welcome to our fresh meat delivery service.`,
+ userId,
+ data: { type: 'welcome' }
+ });
+
+export const notifyPasswordReset = (userId: number) =>
+ dispatchUserNotification({
+ title: 'Password Reset Successful 🔐',
+ body: 'Your password has been reset successfully.',
+ userId,
+ data: { type: 'password_reset' }
+ });
+
+export const notifyAccountVerified = (userId: number) =>
+ dispatchUserNotification({
+ title: 'Account Verified! ✅',
+ body: 'Your account has been successfully verified.',
+ userId,
+ data: { type: 'account_verified' }
+ });
+
+// =============================================================================
+// BACKWARD COMPATIBILITY (DEPRECATED)
+// =============================================================================
+
+/**
+ * @deprecated Use notifyOrderConfirmed() or other purpose-specific methods instead
+ */
+export const sendNotifToSingleUser = dispatchUserNotification;
+
+/**
+ * @deprecated Use notifyNewOffer() or other purpose-specific methods instead
+ */
+export const sendNotifToManyUsers = dispatchBulkNotification;
\ No newline at end of file
diff --git a/apps/backend/src/lib/otp-utils.ts b/apps/backend/src/lib/otp-utils.ts
new file mode 100644
index 0000000..dc39b45
--- /dev/null
+++ b/apps/backend/src/lib/otp-utils.ts
@@ -0,0 +1,55 @@
+import { ApiError } from './api-error';
+import { otpSenderAuthToken } from './env-exporter';
+
+const otpStore = new Map();
+
+const setOtpCreds = (phone: string, verificationId: string) => {
+ otpStore.set(phone, verificationId);
+};
+
+export function getOtpCreds(mobile: string) {
+ const authKey = otpStore.get(mobile);
+
+ return authKey || null;
+}
+
+export const sendOtp = async (phone: string) => {
+ if (!phone) {
+ throw new ApiError("Phone number is required", 400);
+ }
+ const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`;
+ const resp = await fetch(reqUrl, {
+ headers: {
+ authToken: otpSenderAuthToken,
+ },
+ method: "POST",
+ });
+ const data = await resp.json();
+
+ if (data.message === "SUCCESS") {
+ setOtpCreds(phone, data.data.verificationId);
+ return { success: true, message: "OTP sent successfully", verificationId: data.data.verificationId };
+ }
+ if (data.message === "REQUEST_ALREADY_EXISTS") {
+ return { success: true, message: "OTP already sent. Last OTP is still valid" };
+ }
+
+ throw new ApiError("Error while sending OTP. Please try again", 500);
+};
+
+export async function verifyOtpUtil(mobile: string, otp: string, verifId: string):Promise {
+ const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`;
+ const resp = await fetch(reqUrl, {
+ method: "GET",
+ headers: {
+ authToken: otpSenderAuthToken,
+ },
+ });
+
+ const rawData = await resp.json();
+ if (rawData.data?.verificationStatus === "VERIFICATION_COMPLETED") {
+ // delete the verificationId from the local storage
+ return true;
+ }
+ return false;
+}
\ No newline at end of file
diff --git a/apps/backend/src/lib/payments-utils.ts b/apps/backend/src/lib/payments-utils.ts
new file mode 100644
index 0000000..02e7791
--- /dev/null
+++ b/apps/backend/src/lib/payments-utils.ts
@@ -0,0 +1,59 @@
+import Razorpay from "razorpay";
+import { razorpayId, razorpaySecret } from "./env-exporter";
+import { db } from "../db/db_index";
+import { payments } from "../db/schema";
+
+type Tx = Parameters[0]>[0];
+
+export class RazorpayPaymentService {
+ private static instance = new Razorpay({
+ key_id: razorpayId,
+ key_secret: razorpaySecret,
+ });
+
+ static async createOrder(orderId: number, amount: string) {
+ // Create Razorpay order
+ const razorpayOrder = await this.instance.orders.create({
+ amount: parseFloat(amount) * 100, // Convert to paisa
+ currency: 'INR',
+ receipt: `order_${orderId}`,
+ notes: {
+ customerOrderId: orderId.toString(),
+ },
+ });
+
+ return razorpayOrder;
+ }
+
+ static async insertPaymentRecord(orderId: number, razorpayOrder: any, tx?: Tx) {
+ // Use transaction if provided, otherwise use db
+ const dbInstance = tx || db;
+
+ // Insert payment record
+ const [payment] = await dbInstance
+ .insert(payments)
+ .values({
+ status: 'pending',
+ gateway: 'razorpay',
+ orderId,
+ token: orderId.toString(),
+ merchantOrderId: razorpayOrder.id,
+ payload: razorpayOrder,
+ })
+ .returning();
+
+ return payment;
+ }
+
+ static async initiateRefund(paymentId: string, amount: number) {
+ const refund = await this.instance.payments.refund(paymentId, {
+ amount,
+ });
+ return refund;
+ }
+
+ static async fetchRefund(refundId: string) {
+ const refund = await this.instance.refunds.fetch(refundId);
+ return refund;
+ }
+}
\ No newline at end of file
diff --git a/apps/backend/src/lib/redis-client.ts b/apps/backend/src/lib/redis-client.ts
new file mode 100644
index 0000000..8539efa
--- /dev/null
+++ b/apps/backend/src/lib/redis-client.ts
@@ -0,0 +1,80 @@
+import { createClient, RedisClientType } from 'redis';
+import { redisUrl } from './env-exporter';
+
+class RedisClient {
+ private client: RedisClientType;
+ private isConnected: boolean = false;
+
+ constructor() {
+ this.client = createClient({
+ url: redisUrl,
+ });
+
+ this.client.on('error', (err) => {
+ console.error('Redis Client Error:', err);
+ });
+
+ this.client.on('connect', () => {
+ console.log('Redis Client Connected');
+ this.isConnected = true;
+ });
+
+ this.client.on('disconnect', () => {
+ console.log('Redis Client Disconnected');
+ this.isConnected = false;
+ });
+
+ this.client.on('ready', () => {
+ console.log('Redis Client Ready');
+ });
+
+ this.client.on('reconnecting', () => {
+ console.log('Redis Client Reconnecting');
+ });
+
+ // Connect immediately (fire and forget)
+ this.client.connect().catch((err) => {
+ console.error('Failed to connect Redis:', err);
+ });
+ }
+
+ async set(key: string, value: string, ttlSeconds?: number): Promise {
+ if (ttlSeconds) {
+ return await this.client.setEx(key, ttlSeconds, value);
+ } else {
+ return await this.client.set(key, value);
+ }
+ }
+
+ async get(key: string): Promise {
+ return await this.client.get(key);
+ }
+
+ async exists(key: string): Promise {
+ const result = await this.client.exists(key);
+ return result === 1;
+ }
+
+ async delete(key: string): Promise {
+ return await this.client.del(key);
+ }
+
+ async lPush(key: string, value: string): Promise {
+ return await this.client.lPush(key, value);
+ }
+
+ disconnect(): void {
+ if (this.isConnected) {
+ this.client.disconnect();
+ }
+ }
+
+ get isClientConnected(): boolean {
+ return this.isConnected;
+ }
+}
+
+const redisClient = new RedisClient();
+
+export default redisClient;
+export { RedisClient };
\ No newline at end of file
diff --git a/apps/backend/src/lib/redisKeyGetters.ts b/apps/backend/src/lib/redisKeyGetters.ts
new file mode 100644
index 0000000..c72f66e
--- /dev/null
+++ b/apps/backend/src/lib/redisKeyGetters.ts
@@ -0,0 +1,3 @@
+export function getSlotSequenceKey(slotId: number | string): string {
+ return `slot_sequence_${slotId}`;
+}
\ No newline at end of file
diff --git a/apps/backend/src/lib/roles-manager.ts b/apps/backend/src/lib/roles-manager.ts
new file mode 100755
index 0000000..bdb8057
--- /dev/null
+++ b/apps/backend/src/lib/roles-manager.ts
@@ -0,0 +1,124 @@
+import { db } from "../db/db_index";
+
+/**
+ * Constants for role names to avoid hardcoding and typos
+ */
+export const ROLE_NAMES = {
+ ADMIN: 'admin',
+ GENERAL_USER: 'gen_user',
+ HOSPITAL_ADMIN: 'hospital_admin',
+ DOCTOR: 'doctor',
+ RECEPTIONIST: 'receptionist'
+};
+
+export const defaultRole = ROLE_NAMES.GENERAL_USER;
+
+/**
+ * RoleManager class to handle caching and retrieving role information
+ * Provides methods to fetch roles from DB and cache them for quick access
+ */
+class RoleManager {
+ private roles: Map = new Map();
+ private rolesByName: Map = new Map();
+ private isInitialized: boolean = false;
+
+ constructor() {
+ // Singleton instance
+ }
+
+ /**
+ * Fetch all roles from the database and cache them
+ * This should be called during application startup
+ */
+ public async fetchRoles(): Promise {
+ try {
+ // const roles = await db.query.roleInfoTable.findMany();
+
+ // // Clear existing maps before adding new data
+ // this.roles.clear();
+ // this.rolesByName.clear();
+
+ // // Cache roles by ID and by name for quick lookup
+ // roles.forEach(role => {
+ // this.roles.set(role.id, role);
+ // this.rolesByName.set(role.name, role);
+ // });
+
+ // this.isInitialized = true;
+ // console.log(`[RoleManager] Cached ${roles.length} roles`);
+ } catch (error) {
+ console.error('[RoleManager] Error fetching roles:', error);
+ throw error;
+ }
+ }
+
+ /**
+ * Get all roles from cache
+ * If not initialized, fetches roles from DB first
+ */
+ public async getRoles(): Promise<{ id: number; name: string; description: string | null }[]> {
+ if (!this.isInitialized) {
+ await this.fetchRoles();
+ }
+ return Array.from(this.roles.values());
+ }
+
+ /**
+ * Get role by ID
+ * @param id Role ID
+ */
+ public async getRoleById(id: number): Promise<{ id: number; name: string; description: string | null } | undefined> {
+ if (!this.isInitialized) {
+ await this.fetchRoles();
+ }
+ return this.roles.get(id);
+ }
+
+ /**
+ * Get role by name
+ * @param name Role name
+ */
+ public async getRoleByName(name: string): Promise<{ id: number; name: string; description: string | null } | undefined> {
+ if (!this.isInitialized) {
+ await this.fetchRoles();
+ }
+ return this.rolesByName.get(name);
+ }
+
+ /**
+ * Check if a role exists by name
+ * @param name Role name
+ */
+ public async roleExists(name: string): Promise {
+ if (!this.isInitialized) {
+ await this.fetchRoles();
+ }
+ return this.rolesByName.has(name);
+ }
+
+ /**
+ * Get business roles (roles that are not 'admin' or 'gen_user')
+ */
+ public async getBusinessRoles(): Promise<{ id: number; name: string; description: string | null }[]> {
+ if (!this.isInitialized) {
+ await this.fetchRoles();
+ }
+
+ return Array.from(this.roles.values()).filter(
+ role => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER
+ );
+ }
+
+ /**
+ * Force refresh the roles cache
+ */
+ public async refreshRoles(): Promise {
+ await this.fetchRoles();
+ }
+}
+
+// Create a singleton instance
+const roleManager = new RoleManager();
+
+// Export the singleton instance
+export default roleManager;
diff --git a/apps/backend/src/lib/s3-client.ts b/apps/backend/src/lib/s3-client.ts
new file mode 100755
index 0000000..7854200
--- /dev/null
+++ b/apps/backend/src/lib/s3-client.ts
@@ -0,0 +1,205 @@
+// import { s3A, awsBucketName, awsRegion, awsSecretAccessKey } from "../lib/env-exporter"
+import { DeleteObjectCommand, DeleteObjectsCommand, PutObjectCommand, S3Client, GetObjectCommand } from "@aws-sdk/client-s3"
+import { getSignedUrl } from "@aws-sdk/s3-request-presigner"
+import signedUrlCache from "./signed-url-cache"
+import { s3AccessKeyId, s3Region, s3Url, s3SecretAccessKey, s3BucketName } from "./env-exporter";
+import { db } from "../db/db_index"; // Adjust path if needed
+import { uploadUrlStatus } from "../db/schema";
+import { and, eq } from 'drizzle-orm';
+
+const s3Client = new S3Client({
+ region: s3Region,
+ endpoint: s3Url,
+ forcePathStyle: true,
+ credentials: {
+ accessKeyId: s3AccessKeyId,
+ secretAccessKey: s3SecretAccessKey,
+ },
+})
+export default s3Client;
+
+export const imageUploadS3 = async(body: Buffer, type: string, key:string) => {
+ // const key = `${category}/${Date.now()}`
+ const command = new PutObjectCommand({
+ Bucket: s3BucketName,
+ Key: key,
+ Body: body,
+ ContentType: type,
+ })
+ const resp = await s3Client.send(command)
+
+ const imageUrl = `${key}`
+ return imageUrl;
+}
+
+
+// export async function deleteImageUtil(...keys:string[]):Promise;
+
+export async function deleteImageUtil({bucket = s3BucketName, keys}:{bucket?:string, keys: string[]}) {
+
+ if (keys.length === 0) {
+ return true;
+ }
+ try {
+ const deleteParams = {
+ Bucket: bucket,
+ Delete: {
+ Objects: keys.map((key) => ({ Key: key })),
+ Quiet: false,
+ }
+ }
+
+ const deleteCommand = new DeleteObjectsCommand(deleteParams)
+ await s3Client.send(deleteCommand)
+ return true
+ }
+ catch (error) {
+ console.error("Error deleting image:", error)
+ throw new Error("Failed to delete image")
+ return false;
+ }
+}
+
+
+/**
+ * Generate a signed URL from an S3 URL
+ * @param s3Url The full S3 URL (e.g., https://bucket-name.s3.region.amazonaws.com/path/to/object)
+ * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)
+ * @returns A pre-signed URL that provides temporary access to the object
+ */
+export async function generateSignedUrlFromS3Url(s3UrlRaw: string|null, expiresIn: number = 259200): Promise {
+ if (!s3UrlRaw) {
+ return '';
+ }
+
+ const s3Url = s3UrlRaw
+
+ try {
+ // Check if we have a cached signed URL
+ const cachedUrl = signedUrlCache.get(s3Url);
+ if (cachedUrl) {
+ // Found in cache, return it
+ return cachedUrl;
+ }
+
+ // Create the command to get the object
+ const command = new GetObjectCommand({
+ Bucket: s3BucketName,
+ Key: s3Url,
+ });
+
+ // Generate the signed URL
+ const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });
+
+ // Cache the signed URL with TTL matching the expiration time (convert seconds to milliseconds)
+ signedUrlCache.set(s3Url, signedUrl, (expiresIn * 1000) - 60000); // Subtract 1 minute to ensure it doesn't expire before use
+
+ return signedUrl;
+ } catch (error) {
+ console.error("Error generating signed URL:", error);
+ throw new Error("Failed to generate signed URL");
+ }
+}
+
+/**
+ * Get the original S3 URL from a signed URL
+ * @param signedUrl The signed URL
+ * @returns The original S3 URL if found in cache, otherwise null
+ */
+export function getOriginalUrlFromSignedUrl(signedUrl: string|null): string|null {
+ if (!signedUrl) {
+ return null;
+ }
+
+ // Try to find the original URL in our cache
+ const originalUrl = signedUrlCache.getOriginalUrl(signedUrl);
+
+ return originalUrl || null;
+}
+
+/**
+ * Generate signed URLs for multiple S3 URLs
+ * @param s3Urls Array of S3 URLs or null values
+ * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)
+ * @returns Array of signed URLs (empty strings for null/invalid inputs)
+ */
+export async function generateSignedUrlsFromS3Urls(s3Urls: (string|null)[], expiresIn: number = 259200): Promise {
+ if (!s3Urls || !s3Urls.length) {
+ return [];
+ }
+
+ try {
+ // Process URLs in parallel for better performance
+ const signedUrls = await Promise.all(
+ s3Urls.map(url => generateSignedUrlFromS3Url(url, expiresIn).catch(() => ''))
+ );
+
+ return signedUrls;
+ } catch (error) {
+ console.error("Error generating multiple signed URLs:", error);
+ // Return an array of empty strings with the same length as input
+ return s3Urls.map(() => '');
+ }
+}
+
+export async function generateUploadUrl(key: string, mimeType: string, expiresIn: number = 180): Promise {
+ try {
+ // Insert record into upload_url_status
+ await db.insert(uploadUrlStatus).values({
+ key: key,
+ status: 'pending',
+ });
+
+ // Generate signed upload URL
+ const command = new PutObjectCommand({
+ Bucket: s3BucketName,
+ Key: key,
+ ContentType: mimeType,
+ });
+
+ const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });
+ return signedUrl;
+ } catch (error) {
+ console.error('Error generating upload URL:', error);
+ throw new Error('Failed to generate upload URL');
+ }
+}
+
+
+// export function extractKeyFromPresignedUrl(url:string) {
+// const u = new URL(url);
+// const rawKey = u.pathname.replace(/^\/+/, ""); // remove leading slash
+// return decodeURIComponent(rawKey);
+// }
+
+// New function (excludes bucket name)
+export function extractKeyFromPresignedUrl(url: string): string {
+ const u = new URL(url);
+ const rawKey = u.pathname.replace(/^\/+/, ""); // remove leading slash
+ const decodedKey = decodeURIComponent(rawKey);
+ // Remove bucket prefix
+ const parts = decodedKey.split('/');
+ parts.shift(); // Remove bucket name
+ return parts.join('/');
+}
+
+export async function claimUploadUrl(url: string): Promise {
+ try {
+ const semiKey = extractKeyFromPresignedUrl(url);
+ const key = s3BucketName+'/'+ semiKey
+
+ // Update status to 'claimed' if currently 'pending'
+ const result = await db
+ .update(uploadUrlStatus)
+ .set({ status: 'claimed' })
+ .where(and(eq(uploadUrlStatus.key, semiKey), eq(uploadUrlStatus.status, 'pending')))
+ .returning();
+
+ if (result.length === 0) {
+ throw new Error('Upload URL not found or already claimed');
+ }
+ } catch (error) {
+ console.error('Error claiming upload URL:', error);
+ throw new Error('Failed to claim upload URL');
+ }
+}
\ No newline at end of file
diff --git a/apps/backend/src/lib/signed-url-cache.ts b/apps/backend/src/lib/signed-url-cache.ts
new file mode 100755
index 0000000..0f4e98c
--- /dev/null
+++ b/apps/backend/src/lib/signed-url-cache.ts
@@ -0,0 +1,263 @@
+import fs from 'fs';
+import path from 'path';
+
+const CACHE_FILE_PATH = path.join('.', 'assets', 'signed-url-cache.json');
+
+// Interface for cache entries with TTL
+interface CacheEntry {
+ value: string;
+ expiresAt: number; // Timestamp when this entry expires
+}
+
+class SignedURLCache {
+ private originalToSignedCache: Map;
+ private signedToOriginalCache: Map;
+
+ constructor() {
+ this.originalToSignedCache = new Map();
+ this.signedToOriginalCache = new Map();
+
+ // Create cache directory if it doesn't exist
+ const cacheDir = path.dirname(CACHE_FILE_PATH);
+ if (!fs.existsSync(cacheDir)) {
+ console.log('creating the directory')
+
+ fs.mkdirSync(cacheDir, { recursive: true });
+ }
+ else {
+ console.log('the directory is already present')
+
+ }
+ }
+
+ /**
+ * Get a signed URL from the cache using an original URL as the key
+ */
+ get(originalUrl: string): string | undefined {
+ const entry = this.originalToSignedCache.get(originalUrl);
+
+ // If no entry or entry has expired, return undefined
+ if (!entry || Date.now() > entry.expiresAt) {
+ if (entry) {
+ // Remove expired entry
+ this.originalToSignedCache.delete(originalUrl);
+ // Also remove from reverse mapping if it exists
+ this.signedToOriginalCache.delete(entry.value);
+ }
+ return undefined;
+ }
+
+ return entry.value;
+ }
+
+ /**
+ * Get the original URL from the cache using a signed URL as the key
+ */
+ getOriginalUrl(signedUrl: string): string | undefined {
+ const entry = this.signedToOriginalCache.get(signedUrl);
+
+ // If no entry or entry has expired, return undefined
+ if (!entry || Date.now() > entry.expiresAt) {
+ if (entry) {
+ // Remove expired entry
+ this.signedToOriginalCache.delete(signedUrl);
+ // Also remove from primary mapping if it exists
+ this.originalToSignedCache.delete(entry.value);
+ }
+ return undefined;
+ }
+
+ return entry.value;
+ }
+
+ /**
+ * Set a value in the cache with a TTL (Time To Live)
+ * @param originalUrl The original S3 URL
+ * @param signedUrl The signed URL
+ * @param ttlMs Time to live in milliseconds (default: 3 days)
+ */
+ set(originalUrl: string, signedUrl: string, ttlMs: number = 259200000): void {
+ const expiresAt = Date.now() + ttlMs;
+
+ const entry: CacheEntry = {
+ value: signedUrl,
+ expiresAt
+ };
+
+ const reverseEntry: CacheEntry = {
+ value: originalUrl,
+ expiresAt
+ };
+
+ this.originalToSignedCache.set(originalUrl, entry);
+ this.signedToOriginalCache.set(signedUrl, reverseEntry);
+ }
+
+ has(originalUrl: string): boolean {
+ const entry = this.originalToSignedCache.get(originalUrl);
+
+ // Entry exists and hasn't expired
+ return !!entry && Date.now() <= entry.expiresAt;
+ }
+
+ hasSignedUrl(signedUrl: string): boolean {
+ const entry = this.signedToOriginalCache.get(signedUrl);
+
+ // Entry exists and hasn't expired
+ return !!entry && Date.now() <= entry.expiresAt;
+ }
+
+ clear(): void {
+ this.originalToSignedCache.clear();
+ this.signedToOriginalCache.clear();
+ this.saveToDisk();
+ }
+
+ /**
+ * Remove all expired entries from the cache
+ * @returns The number of expired entries that were removed
+ */
+ clearExpired(): number {
+ const now = Date.now();
+ let removedCount = 0;
+
+ // Clear expired entries from original to signed cache
+ for (const [originalUrl, entry] of this.originalToSignedCache.entries()) {
+ if (now > entry.expiresAt) {
+ this.originalToSignedCache.delete(originalUrl);
+ removedCount++;
+ }
+ }
+
+ // Clear expired entries from signed to original cache
+ for (const [signedUrl, entry] of this.signedToOriginalCache.entries()) {
+ if (now > entry.expiresAt) {
+ this.signedToOriginalCache.delete(signedUrl);
+ // No need to increment removedCount as we've already counted these in the first loop
+ }
+ }
+
+ if (removedCount > 0) {
+ console.log(`SignedURLCache: Cleared ${removedCount} expired entries`);
+ }
+
+ return removedCount;
+ }
+
+ /**
+ * Save the cache to disk
+ */
+ saveToDisk(): void {
+ try {
+ // Remove expired entries before saving
+ const removedCount = this.clearExpired();
+
+ // Convert Maps to serializable objects
+ const serializedOriginalToSigned: Record = {};
+ const serializedSignedToOriginal: Record = {};
+
+ for (const [originalUrl, entry] of this.originalToSignedCache.entries()) {
+ serializedOriginalToSigned[originalUrl] = {
+ value: entry.value,
+ expiresAt: entry.expiresAt
+ };
+ }
+
+ for (const [signedUrl, entry] of this.signedToOriginalCache.entries()) {
+ serializedSignedToOriginal[signedUrl] = {
+ value: entry.value,
+ expiresAt: entry.expiresAt
+ };
+ }
+
+ const serializedCache = {
+ originalToSigned: serializedOriginalToSigned,
+ signedToOriginal: serializedSignedToOriginal
+ };
+
+ // Write to file
+ fs.writeFileSync(
+ CACHE_FILE_PATH,
+ JSON.stringify(serializedCache),
+ 'utf8'
+ );
+
+ console.log(`SignedURLCache: Saved ${this.originalToSignedCache.size} entries to disk`);
+ } catch (error) {
+ console.error('Error saving SignedURLCache to disk:', error);
+ }
+ }
+
+ /**
+ * Load the cache from disk
+ */
+ loadFromDisk(): void {
+ try {
+ if (fs.existsSync(CACHE_FILE_PATH)) {
+ // Read from file
+ const data = fs.readFileSync(CACHE_FILE_PATH, 'utf8');
+
+ // Parse the data
+ const parsedData = JSON.parse(data) as {
+ originalToSigned: Record,
+ signedToOriginal: Record
+ };
+
+ // Only load entries that haven't expired yet
+ const now = Date.now();
+ let loadedCount = 0;
+ let expiredCount = 0;
+
+ // Load original to signed mappings
+ if (parsedData.originalToSigned) {
+ for (const [originalUrl, entry] of Object.entries(parsedData.originalToSigned)) {
+ if (now <= entry.expiresAt) {
+ this.originalToSignedCache.set(originalUrl, entry);
+ loadedCount++;
+ } else {
+ expiredCount++;
+ }
+ }
+ }
+
+ // Load signed to original mappings
+ if (parsedData.signedToOriginal) {
+ for (const [signedUrl, entry] of Object.entries(parsedData.signedToOriginal)) {
+ if (now <= entry.expiresAt) {
+ this.signedToOriginalCache.set(signedUrl, entry);
+ // Don't increment loadedCount as these are pairs of what we already counted
+ } else {
+ // Don't increment expiredCount as these are pairs of what we already counted
+ }
+ }
+ }
+
+ console.log(`SignedURLCache: Loaded ${loadedCount} valid entries from disk (skipped ${expiredCount} expired entries)`);
+ } else {
+ console.log('SignedURLCache: No cache file found, starting with empty cache');
+ }
+ } catch (error) {
+ console.error('Error loading SignedURLCache from disk:', error);
+ // Start with empty caches if loading fails
+ this.originalToSignedCache = new Map();
+ this.signedToOriginalCache = new Map();
+ }
+ }
+}
+
+// Create a singleton instance to be used throughout the application
+const signedUrlCache = new SignedURLCache();
+
+process.on('SIGINT', () => {
+ console.log('SignedURLCache: Saving cache before shutdown...');
+ signedUrlCache.saveToDisk();
+ process.exit(0);
+});
+
+process.on('SIGTERM', () => {
+ console.log('SignedURLCache: Saving cache before shutdown...');
+ signedUrlCache.saveToDisk();
+ process.exit(0);
+});
+
+export default signedUrlCache;
\ No newline at end of file
diff --git a/apps/backend/src/lib/upload-handler.ts b/apps/backend/src/lib/upload-handler.ts
new file mode 100755
index 0000000..3caa4c2
--- /dev/null
+++ b/apps/backend/src/lib/upload-handler.ts
@@ -0,0 +1,8 @@
+import multerParent from 'multer';
+const uploadHandler = multerParent({
+ limits: {
+ fileSize: 10 * 1024 * 1024, // 10 MB
+ }
+});
+
+export default uploadHandler
\ No newline at end of file
diff --git a/apps/backend/src/main-router.ts b/apps/backend/src/main-router.ts
new file mode 100755
index 0000000..619a090
--- /dev/null
+++ b/apps/backend/src/main-router.ts
@@ -0,0 +1,64 @@
+import { Router, Request, Response, NextFunction } from "express";
+import avRouter from "./admin-apis/av-router";
+import { ApiError } from "./lib/api-error";
+import v1Router from "./v1-router";
+import testController from "./test-controller";
+import { authenticateUser } from "./middleware/auth.middleware";
+import { raiseComplaint } from "./uv-apis/user-rest.controller";
+import uploadHandler from "./lib/upload-handler";
+
+const router = Router();
+
+// Health check endpoints (no auth required)
+router.get('/health', (req: Request, res: Response) => {
+ res.status(200).json({
+ status: 'OK',
+ timestamp: new Date().toISOString(),
+ uptime: process.uptime(),
+ message: 'Hello world'
+ });
+});
+router.get('/seed', (req:Request, res: Response) => {
+ res.status(200).json({
+ status: 'OK',
+ timestamp: new Date().toISOString(),
+ uptime: process.uptime()
+ });
+})
+
+// Apply authentication middleware to all subsequent routes
+router.use(authenticateUser);
+
+router.use('/v1', v1Router);
+// router.use('/av', avRouter);
+router.use('/test', testController);
+
+// User REST APIs
+router.post('/uv/complaints/raise',
+ uploadHandler.array('images', 5),
+ raiseComplaint
+);
+
+// Global error handling middleware
+router.use((err: Error, req: Request, res: Response, next: NextFunction) => {
+ console.error('Error:', err);
+
+ if (err instanceof ApiError) {
+ return res.status(err.statusCode).json({
+ error: err.message,
+ details: err.details,
+ statusCode: err.statusCode
+ });
+ }
+
+ // Handle unknown errors
+ return res.status(500).json({
+ error: 'Internal Server Error',
+ message: process.env.NODE_ENV === 'development' ? err.message : undefined,
+ statusCode: 500
+ });
+});
+
+const mainRouter = router;
+
+export default mainRouter;
\ No newline at end of file
diff --git a/apps/backend/src/middleware/auth.middleware.ts b/apps/backend/src/middleware/auth.middleware.ts
new file mode 100644
index 0000000..3ff1de4
--- /dev/null
+++ b/apps/backend/src/middleware/auth.middleware.ts
@@ -0,0 +1,67 @@
+import { Request, Response, NextFunction } from 'express';
+import jwt from 'jsonwebtoken';
+import { db } from '../db/db_index';
+import { staffUsers, userDetails } from '../db/schema';
+import { eq } from 'drizzle-orm';
+import { ApiError } from '../lib/api-error';
+
+interface AuthenticatedRequest extends Request {
+ user?: {
+ userId: number;
+ name?: string;
+ email?: string;
+ mobile?: string;
+ };
+ staffUser?: {
+ id: number;
+ name: string;
+ };
+}
+
+export const authenticateUser = async (req: AuthenticatedRequest, res: Response, next: NextFunction) => {
+ try {
+ const authHeader = req.headers.authorization;
+
+ if (!authHeader?.startsWith('Bearer ')) {
+ throw new ApiError('Authorization token required', 401);
+ }
+
+ const token = authHeader.substring(7);
+ console.log(req.headers)
+
+ const decoded = jwt.verify(token, process.env.JWT_SECRET || 'your-secret-key') as any;
+
+ // Check if this is a staff token (has staffId)
+ if (decoded.staffId) {
+ // This is a staff token, verify staff exists
+ const staff = await db.query.staffUsers.findFirst({
+ where: eq(staffUsers.id, decoded.staffId),
+ });
+
+ if (!staff) {
+ throw new ApiError('Invalid staff token', 401);
+ }
+
+ req.staffUser = {
+ id: staff.id,
+ name: staff.name,
+ };
+ } else {
+ // This is a regular user token
+ req.user = decoded;
+
+ // Check if user is suspended
+ const details = await db.query.userDetails.findFirst({
+ where: eq(userDetails.userId, decoded.userId),
+ });
+
+ if (details?.isSuspended) {
+ throw new ApiError('Account suspended', 403);
+ }
+ }
+
+ next();
+ } catch (error) {
+ next(error);
+ }
+};
\ No newline at end of file
diff --git a/apps/backend/src/middleware/auth.ts b/apps/backend/src/middleware/auth.ts
new file mode 100755
index 0000000..d7a091f
--- /dev/null
+++ b/apps/backend/src/middleware/auth.ts
@@ -0,0 +1,67 @@
+import { Request, Response, NextFunction } from 'express';
+import jwt from 'jsonwebtoken';
+import { ApiError } from '../lib/api-error';
+
+// Extend the Request interface to include user property
+declare global {
+ namespace Express {
+ interface Request {
+ user?: any;
+ }
+ }
+}
+
+export const verifyToken = (req: Request, res: Response, next: NextFunction) => {
+ try {
+ // Get token from Authorization header
+ const authHeader = req.headers.authorization;
+
+
+ if (!authHeader || !authHeader.startsWith('Bearer ')) {
+ throw new ApiError('Access denied. No token provided', 401);
+ }
+
+ const token = authHeader.split(' ')[1];
+
+ if (!token) {
+ throw new ApiError('Access denied. Invalid token format', 401);
+ }
+
+ // Verify token
+ const decoded = jwt.verify(token, process.env.JWT_SECRET || 'your-secret-key');
+
+
+ // Add user info to request
+ req.user = decoded;
+
+ next();
+ } catch (error) {
+ if (error instanceof jwt.JsonWebTokenError) {
+ next(new ApiError('Invalid Auth Credentials', 401));
+ } else {
+ next(error);
+ }
+ }
+};
+
+export const requireRole = (roles: string[]) => {
+ return (req: Request, res: Response, next: NextFunction) => {
+ try {
+ if (!req.user) {
+ throw new ApiError('Authentication required', 401);
+ }
+
+ // Check if user has any of the required roles
+ const userRoles = req.user.roles || [];
+ const hasPermission = roles.some(role => userRoles.includes(role));
+
+ if (!hasPermission) {
+ throw new ApiError('Access denied. Insufficient permissions', 403);
+ }
+
+ next();
+ } catch (error) {
+ next(error);
+ }
+ };
+};
diff --git a/apps/backend/src/middleware/staff-auth.ts b/apps/backend/src/middleware/staff-auth.ts
new file mode 100644
index 0000000..471b172
--- /dev/null
+++ b/apps/backend/src/middleware/staff-auth.ts
@@ -0,0 +1,76 @@
+import { Request, Response, NextFunction } from 'express';
+import jwt from 'jsonwebtoken';
+import { db } from '../db/db_index';
+import { staffUsers } from '../db/schema';
+import { eq } from 'drizzle-orm';
+import { ApiError } from '../lib/api-error';
+
+// Extend Request interface to include staffUser
+declare global {
+ namespace Express {
+ interface Request {
+ staffUser?: {
+ id: number;
+ name: string;
+ };
+ }
+ }
+}
+
+/**
+ * Verify JWT token and extract payload
+ */
+const verifyStaffToken = (token: string) => {
+ try {
+ return jwt.verify(token, process.env.JWT_SECRET || 'default-secret');
+ } catch (error) {
+ throw new ApiError('Access denied. Invalid auth credentials', 401);
+ }
+};
+
+/**
+ * Middleware to authenticate staff users and attach staffUser to request
+ */
+export const authenticateStaff = async (req: Request, res: Response, next: NextFunction) => {
+ try {
+ // Extract token from Authorization header
+ const authHeader = req.headers.authorization;
+
+ if (!authHeader || !authHeader.startsWith('Bearer ')) {
+ throw new ApiError('Staff authentication required', 401);
+ }
+
+ const token = authHeader.split(' ')[1];
+
+ if (!token) {
+ throw new ApiError('Staff authentication token missing', 401);
+ }
+
+ // Verify token and extract payload
+ const decoded = verifyStaffToken(token) as any;
+
+ // Verify staffId exists in token
+ if (!decoded.staffId) {
+ throw new ApiError('Invalid staff token format', 401);
+ }
+
+ // Fetch staff user from database
+ const staff = await db.query.staffUsers.findFirst({
+ where: eq(staffUsers.id, decoded.staffId),
+ });
+
+ if (!staff) {
+ throw new ApiError('Staff user not found', 401);
+ }
+
+ // Attach staff user to request
+ req.staffUser = {
+ id: staff.id,
+ name: staff.name,
+ };
+
+ next();
+ } catch (error) {
+ next(error);
+ }
+};
\ No newline at end of file
diff --git a/apps/backend/src/test-controller.ts b/apps/backend/src/test-controller.ts
new file mode 100644
index 0000000..ae98af6
--- /dev/null
+++ b/apps/backend/src/test-controller.ts
@@ -0,0 +1,13 @@
+import { Router, Request, Response } from 'express';
+
+const router = Router();
+
+router.get('/', (req: Request, res: Response) => {
+ res.json({
+ status: 'ok',
+ message: 'Health check passed',
+ timestamp: new Date().toISOString(),
+ });
+});
+
+export default router;
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/address.ts b/apps/backend/src/trpc/admin-apis/address.ts
new file mode 100644
index 0000000..32f753a
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/address.ts
@@ -0,0 +1,32 @@
+import { z } from 'zod';
+import { addressZones, addressAreas } from '../../db/schema';
+import { eq, desc } from 'drizzle-orm';
+import { db } from '../../db/db_index';
+import { router,protectedProcedure } from '../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/admin-apis/admin-trpc-index.ts b/apps/backend/src/trpc/admin-apis/admin-trpc-index.ts
new file mode 100644
index 0000000..a2e0571
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/admin-trpc-index.ts
@@ -0,0 +1,34 @@
+import { router } from '../trpc-index';
+import { complaintRouter } from './complaint';
+import { couponRouter } from './coupon';
+import { cancelledOrdersRouter } from './cancelled-orders';
+import { orderRouter } from './order';
+import { vendorSnippetsRouter } from './vendor-snippets';
+import { slotsRouter } from './slots';
+import { productRouter } from './product';
+import { staffUserRouter } from './staff-user';
+import { storeRouter } from './store';
+import { adminPaymentsRouter } from './payments';
+import addressRouter from './address';
+import { bannerRouter } from './banner';
+import { userRouter } from './user';
+import { constRouter } from './const';
+
+export const adminRouter = router({
+ complaint: complaintRouter,
+ coupon: couponRouter,
+ cancelledOrders: cancelledOrdersRouter,
+ order: orderRouter,
+ vendorSnippets: vendorSnippetsRouter,
+ slots: slotsRouter,
+ product: productRouter,
+ staffUser: staffUserRouter,
+ store: storeRouter,
+ payments: adminPaymentsRouter,
+ address: addressRouter,
+ banner: bannerRouter,
+ user: userRouter,
+ const: constRouter,
+});
+
+export type AdminRouter = typeof adminRouter;
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/banner.ts b/apps/backend/src/trpc/admin-apis/banner.ts
new file mode 100644
index 0000000..f50880b
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/banner.ts
@@ -0,0 +1,162 @@
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { homeBanners } from '../../db/schema';
+import { eq, and, desc, sql } from 'drizzle-orm';
+import { protectedProcedure, router } from '../trpc-index';
+import { extractKeyFromPresignedUrl, generateSignedUrlFromS3Url } from '../../lib/s3-client';
+import { ApiError } from 'src/lib/api-error';
+
+export const bannerRouter = router({
+ // Get all banners
+ getBanners: protectedProcedure
+ .query(async () => {
+ try {
+
+ 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(
+ banners.map(async (banner) => {
+ try {
+ return {
+ ...banner,
+ imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl,
+ // Ensure productIds is always an array
+ productIds: banner.productIds || [],
+ };
+ } catch (error) {
+ console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);
+ return {
+ ...banner,
+ imageUrl: banner.imageUrl, // Keep original on error
+ // Ensure productIds is always an array
+ productIds: banner.productIds || [],
+ };
+ }
+ })
+ );
+
+ return {
+ banners: bannersWithSignedUrls,
+ };
+ }
+ catch(e:any) {
+ console.log(e)
+
+ throw new ApiError(e.message);
+ }
+ }),
+
+ // Get single banner by ID
+ getBanner: protectedProcedure
+ .input(z.object({ id: z.number() }))
+ .query(async ({ input }) => {
+ 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 {
+ // Convert S3 key to signed URL for client
+ if (banner.imageUrl) {
+ banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl);
+ }
+ } catch (error) {
+ console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);
+ // Keep original imageUrl on error
+ }
+
+ // Ensure productIds is always an array (handle migration compatibility)
+ if (!banner.productIds) {
+ banner.productIds = [];
+ }
+ }
+
+ return banner;
+ }),
+
+ // Create new banner
+ createBanner: protectedProcedure
+ .input(z.object({
+ name: z.string().min(1),
+ imageUrl: z.string().url(),
+ description: z.string().optional(),
+ productIds: z.array(z.number()).optional(),
+ redirectUrl: z.string().url().optional(),
+ // serialNum removed completely
+ }))
+ .mutation(async ({ input }) => {
+ try {
+ const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)
+ const [banner] = await db.insert(homeBanners).values({
+ name: input.name,
+ imageUrl: imageUrl,
+ description: input.description,
+ productIds: input.productIds || [],
+ redirectUrl: input.redirectUrl,
+ serialNum: 999, // Default value, not used
+ isActive: false, // Default to inactive
+ }).returning();
+
+ return banner;
+ } catch (error) {
+ console.error('Error creating banner:', error);
+ throw error; // Re-throw to maintain tRPC error handling
+ }
+ }),
+
+ // Update banner
+ updateBanner: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ name: z.string().min(1).optional(),
+ imageUrl: z.string().url().optional(),
+ description: z.string().optional(),
+ productIds: z.array(z.number()).optional(),
+ redirectUrl: z.string().url().optional(),
+ serialNum: z.number().nullable().optional(),
+ isActive: z.boolean().optional(),
+ }))
+ .mutation(async ({ input }) => {
+ try {
+
+ const { id, ...updateData } = input;
+ const incomingProductIds = input.productIds;
+ // Extract S3 key from presigned URL if imageUrl is provided
+ const processedData = {
+ ...updateData,
+ ...(updateData.imageUrl && {
+ imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)
+ }),
+ };
+
+ // Handle serialNum null case
+ const finalData: any = { ...processedData };
+ if ('serialNum' in finalData && finalData.serialNum === null) {
+ // Set to null explicitly
+ finalData.serialNum = null;
+ }
+
+ const [banner] = await db.update(homeBanners)
+ .set({ ...finalData, lastUpdated: new Date(), })
+ .where(eq(homeBanners.id, id))
+ .returning();
+ return banner;
+ } catch (error) {
+ console.error('Error updating banner:', error);
+ throw error;
+ }
+ }),
+
+ // Delete banner
+ deleteBanner: protectedProcedure
+ .input(z.object({ id: z.number() }))
+ .mutation(async ({ input }) => {
+ await db.delete(homeBanners).where(eq(homeBanners.id, input.id));
+ return { success: true };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/cancelled-orders.ts b/apps/backend/src/trpc/admin-apis/cancelled-orders.ts
new file mode 100644
index 0000000..0fa54dc
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/cancelled-orders.ts
@@ -0,0 +1,179 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { orders, orderStatus, users, addresses, orderItems, productInfo, units, refunds } from '../../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.readableId,
+ 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.readableId,
+ 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/trpc/admin-apis/complaint.ts b/apps/backend/src/trpc/admin-apis/complaint.ts
new file mode 100644
index 0000000..01c1023
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/complaint.ts
@@ -0,0 +1,79 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { complaints, users } from '../../db/schema';
+import { eq } from 'drizzle-orm';
+import { generateSignedUrlsFromS3Urls } from '../../lib/s3-client';
+
+export const complaintRouter = router({
+ getAll: protectedProcedure
+ .input(z.object({
+ page: z.number().optional().default(1),
+ limit: z.number().optional().default(10),
+ }))
+ .query(async ({ input }) => {
+ const page = input.page;
+ const limit = input.limit;
+ const offset = (page - 1) * limit;
+
+ const [complaintsData, totalCountResult] = await Promise.all([
+ db
+ .select({
+ id: complaints.id,
+ complaintBody: complaints.complaintBody,
+ userId: complaints.userId,
+ orderId: complaints.orderId,
+ isResolved: complaints.isResolved,
+ createdAt: complaints.createdAt,
+ userName: users.name,
+ images: complaints.images,
+ })
+ .from(complaints)
+ .leftJoin(users, eq(complaints.userId, users.id))
+ .orderBy(complaints.createdAt)
+ .limit(limit)
+ .offset(offset),
+ db
+ .select({ count: db.$count(complaints) })
+ .from(complaints),
+ ]);
+
+ const totalCount = totalCountResult[0].count;
+
+ // Generate signed URLs for images
+ const complaintsWithSignedImages = await Promise.all(
+ complaintsData.map(async (c) => {
+ const signedImages = c.images
+ ? await generateSignedUrlsFromS3Urls(c.images as string[])
+ : [];
+
+ return {
+ id: c.id,
+ text: c.complaintBody,
+ userId: c.userId,
+ userName: c.userName,
+ orderId: c.orderId,
+ status: c.isResolved ? 'resolved' : 'pending',
+ createdAt: c.createdAt,
+ images: signedImages,
+ };
+ })
+ );
+
+ return {
+ complaints: complaintsWithSignedImages,
+ totalCount,
+ };
+ }),
+
+ resolve: protectedProcedure
+ .input(z.object({ id: z.string(), response: z.string().optional() }))
+ .mutation(async ({ input }) => {
+ await db
+ .update(complaints)
+ .set({ isResolved: true, response: input.response })
+ .where(eq(complaints.id, parseInt(input.id)));
+
+ return { message: 'Complaint resolved successfully' };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/const.ts b/apps/backend/src/trpc/admin-apis/const.ts
new file mode 100644
index 0000000..b9f60b4
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/const.ts
@@ -0,0 +1,61 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { keyValStore } from '../../db/schema';
+import { computeConstants } from '../../lib/const-store';
+import { CONST_KEYS } from '../../lib/const-keys';
+
+export const constRouter = router({
+ getConstants: protectedProcedure
+ .query(async () => {
+
+ const constants = await db.select().from(keyValStore);
+
+ const resp = constants.map(c => ({
+ key: c.key,
+ value: c.value,
+ }));
+
+ return resp;
+ }),
+
+ updateConstants: protectedProcedure
+ .input(z.object({
+ constants: z.array(z.object({
+ key: z.string(),
+ value: z.any(),
+ })),
+ }))
+ .mutation(async ({ input }) => {
+ const { constants } = input;
+
+ const validKeys = Object.values(CONST_KEYS) as string[];
+ const invalidKeys = constants
+ .filter(c => !validKeys.includes(c.key))
+ .map(c => c.key);
+
+ if (invalidKeys.length > 0) {
+ throw new Error(`Invalid constant keys: ${invalidKeys.join(', ')}`);
+ }
+
+ await db.transaction(async (tx) => {
+ for (const { key, value } of constants) {
+ await tx.insert(keyValStore)
+ .values({ key, value })
+ .onConflictDoUpdate({
+ target: keyValStore.key,
+ set: { value },
+ });
+ }
+ });
+
+ // Refresh all constants in Redis after database update
+ await computeConstants();
+
+ return {
+ success: true,
+ updatedCount: constants.length,
+ keys: constants.map(c => c.key),
+ };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/coupon.ts b/apps/backend/src/trpc/admin-apis/coupon.ts
new file mode 100644
index 0000000..d659fde
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/coupon.ts
@@ -0,0 +1,711 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { coupons, users, staffUsers, orders, couponApplicableUsers, couponApplicableProducts, orderStatus, reservedCoupons } from '../../db/schema';
+import { eq, and, like, or, inArray, lt } from 'drizzle-orm';
+import dayjs from 'dayjs';
+
+const createCouponBodySchema = z.object({
+ couponCode: z.string().optional(),
+ isUserBased: z.boolean().optional(),
+ discountPercent: z.number().optional(),
+ flatDiscount: z.number().optional(),
+ minOrder: z.number().optional(),
+ targetUser: z.number().optional(),
+ productIds: z.array(z.number()).optional().nullable(),
+ applicableUsers: z.array(z.number()).optional(),
+ applicableProducts: z.array(z.number()).optional(),
+ maxValue: z.number().optional(),
+ isApplyForAll: z.boolean().optional(),
+ validTill: z.string().optional(),
+ maxLimitForUser: z.number().optional(),
+ exclusiveApply: z.boolean().optional(),
+});
+
+const validateCouponBodySchema = z.object({
+ code: z.string(),
+ userId: z.number(),
+ orderAmount: z.number(),
+});
+
+export const couponRouter = router({
+ create: protectedProcedure
+ .input(createCouponBodySchema)
+ .mutation(async ({ input, ctx }) => {
+ const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input;
+
+ // Validation: ensure at least one discount type is provided
+ if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {
+ throw new Error("Either discountPercent or flatDiscount must be provided (but not both)");
+ }
+
+ // If user-based, applicableUsers is required (unless it's apply for all)
+ if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) {
+ throw new Error("applicableUsers is required for user-based coupons (or set isApplyForAll to true)");
+ }
+
+ // Cannot be both user-based and apply for all
+ if (isUserBased && isApplyForAll) {
+ throw new Error("Cannot be both user-based and apply for all users");
+ }
+
+ // If applicableUsers is provided, verify users exist
+ if (applicableUsers && applicableUsers.length > 0) {
+ const existingUsers = await db.query.users.findMany({
+ where: inArray(users.id, applicableUsers),
+ columns: { id: true },
+ });
+ if (existingUsers.length !== applicableUsers.length) {
+ throw new Error("Some applicable users not found");
+ }
+ }
+
+ // Get staff user ID from auth middleware
+ const staffUserId = ctx.staffUser?.id;
+ if (!staffUserId) {
+ throw new Error("Unauthorized");
+ }
+
+ // Generate coupon code if not provided
+ let finalCouponCode = couponCode;
+ if (!finalCouponCode) {
+ // Generate a unique coupon code
+ const timestamp = Date.now().toString().slice(-6);
+ const random = Math.random().toString(36).substring(2, 8).toUpperCase();
+ finalCouponCode = `MF${timestamp}${random}`;
+ }
+
+ // Check if coupon code already exists
+ const existingCoupon = await db.query.coupons.findFirst({
+ where: eq(coupons.couponCode, finalCouponCode),
+ });
+
+ if (existingCoupon) {
+ throw new Error("Coupon code already exists");
+ }
+
+ const result = await db.insert(coupons).values({
+ couponCode: finalCouponCode,
+ isUserBased: isUserBased || false,
+ discountPercent: discountPercent?.toString(),
+ flatDiscount: flatDiscount?.toString(),
+ minOrder: minOrder?.toString(),
+ productIds: productIds || null,
+ createdBy: staffUserId,
+ maxValue: maxValue?.toString(),
+ isApplyForAll: isApplyForAll || false,
+ validTill: validTill ? dayjs(validTill).toDate() : undefined,
+ maxLimitForUser: maxLimitForUser,
+ exclusiveApply: exclusiveApply || false,
+ }).returning();
+
+ const coupon = result[0];
+
+ // Insert applicable users
+ if (applicableUsers && applicableUsers.length > 0) {
+ await db.insert(couponApplicableUsers).values(
+ applicableUsers.map(userId => ({
+ couponId: coupon.id,
+ userId,
+ }))
+ );
+ }
+
+ // Insert applicable products
+ if (applicableProducts && applicableProducts.length > 0) {
+ await db.insert(couponApplicableProducts).values(
+ applicableProducts.map(productId => ({
+ couponId: coupon.id,
+ productId,
+ }))
+ );
+ }
+
+ return coupon;
+ }),
+
+ getAll: protectedProcedure
+ .input(z.object({
+ cursor: z.number().optional(),
+ limit: z.number().default(50),
+ search: z.string().optional(),
+ }))
+ .query(async ({ input }) => {
+ const { cursor, limit, search } = input;
+
+ let whereCondition = undefined;
+ const conditions = [];
+
+ if (cursor) {
+ conditions.push(lt(coupons.id, cursor));
+ }
+
+ if (search && search.trim()) {
+ conditions.push(like(coupons.couponCode, `%${search}%`));
+ }
+
+ if (conditions.length > 0) {
+ whereCondition = and(...conditions);
+ }
+
+ const result = await db.query.coupons.findMany({
+ where: whereCondition,
+ with: {
+ creator: true,
+ applicableUsers: {
+ with: {
+ user: true,
+ },
+ },
+ applicableProducts: {
+ with: {
+ product: true,
+ },
+ },
+ },
+ orderBy: (coupons, { desc }) => [desc(coupons.createdAt)],
+ limit: limit + 1,
+ });
+
+ const hasMore = result.length > limit;
+ const couponsList = hasMore ? result.slice(0, limit) : result;
+ const nextCursor = hasMore ? result[result.length - 1].id : undefined;
+
+ return { coupons: couponsList, nextCursor };
+ }),
+
+ getById: protectedProcedure
+ .input(z.object({ id: z.number() }))
+ .query(async ({ input }) => {
+ const couponId = input.id;
+
+ const result = await db.query.coupons.findFirst({
+ where: eq(coupons.id, couponId),
+ with: {
+ creator: true,
+ applicableUsers: {
+ with: {
+ user: true,
+ },
+ },
+ applicableProducts: {
+ with: {
+ product: true,
+ },
+ },
+ },
+ });
+
+ if (!result) {
+ throw new Error("Coupon not found");
+ }
+
+ return {
+ ...result,
+ productIds: (result.productIds as number[]) || undefined,
+ applicableUsers: result.applicableUsers.map(au => au.user),
+ applicableProducts: result.applicableProducts.map(ap => ap.product),
+ };
+ }),
+
+ update: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ updates: createCouponBodySchema.extend({
+ isInvalidated: z.boolean().optional(),
+ }),
+ }))
+ .mutation(async ({ input }) => {
+ const { id, updates } = input;
+
+ // Validation: ensure discount types are valid
+ if (updates.discountPercent !== undefined && updates.flatDiscount !== undefined) {
+ if (updates.discountPercent && updates.flatDiscount) {
+ throw new Error("Cannot have both discountPercent and flatDiscount");
+ }
+ }
+
+ // If updating to user-based, applicableUsers is required
+ if (updates.isUserBased && (!updates.applicableUsers || updates.applicableUsers.length === 0)) {
+ const existingCount = await db.$count(couponApplicableUsers, eq(couponApplicableUsers.couponId, id));
+ if (existingCount === 0) {
+ throw new Error("applicableUsers is required for user-based coupons");
+ }
+ }
+
+ // If applicableUsers is provided, verify users exist
+ if (updates.applicableUsers && updates.applicableUsers.length > 0) {
+ const existingUsers = await db.query.users.findMany({
+ where: inArray(users.id, updates.applicableUsers),
+ columns: { id: true },
+ });
+ if (existingUsers.length !== updates.applicableUsers.length) {
+ throw new Error("Some applicable users not found");
+ }
+ }
+
+ const updateData: any = { ...updates };
+ delete updateData.applicableUsers; // Remove since we use couponApplicableUsers table
+ if (updates.discountPercent !== undefined) {
+ updateData.discountPercent = updates.discountPercent?.toString();
+ }
+ if (updates.flatDiscount !== undefined) {
+ updateData.flatDiscount = updates.flatDiscount?.toString();
+ }
+ if (updates.minOrder !== undefined) {
+ updateData.minOrder = updates.minOrder?.toString();
+ }
+ if (updates.maxValue !== undefined) {
+ updateData.maxValue = updates.maxValue?.toString();
+ }
+ if (updates.validTill !== undefined) {
+ updateData.validTill = updates.validTill ? dayjs(updates.validTill).toDate() : null;
+ }
+
+ const result = await db.update(coupons)
+ .set(updateData)
+ .where(eq(coupons.id, id))
+ .returning();
+
+ if (result.length === 0) {
+ throw new Error("Coupon not found");
+ }
+
+ console.log('updated coupon successfully')
+
+ // Update applicable users: delete existing and insert new
+ if (updates.applicableUsers !== undefined) {
+ await db.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id));
+ if (updates.applicableUsers.length > 0) {
+ await db.insert(couponApplicableUsers).values(
+ updates.applicableUsers.map(userId => ({
+ couponId: id,
+ userId,
+ }))
+ );
+ }
+ }
+
+ // Update applicable products: delete existing and insert new
+ if (updates.applicableProducts !== undefined) {
+ await db.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id));
+ if (updates.applicableProducts.length > 0) {
+ await db.insert(couponApplicableProducts).values(
+ updates.applicableProducts.map(productId => ({
+ couponId: id,
+ productId,
+ }))
+ );
+ }
+ }
+
+ return result[0];
+ }),
+
+ delete: protectedProcedure
+ .input(z.object({ id: z.number() }))
+ .mutation(async ({ input }) => {
+ const { id } = input;
+
+ const result = await db.update(coupons)
+ .set({ isInvalidated: true })
+ .where(eq(coupons.id, id))
+ .returning();
+
+ if (result.length === 0) {
+ throw new Error("Coupon not found");
+ }
+
+ return { message: "Coupon invalidated successfully" };
+ }),
+
+ validate: protectedProcedure
+ .input(validateCouponBodySchema)
+ .query(async ({ input }) => {
+ const { code, userId, orderAmount } = input;
+
+ if (!code || typeof code !== 'string') {
+ return { valid: false, message: "Invalid coupon code" };
+ }
+
+ const coupon = await db.query.coupons.findFirst({
+ where: and(
+ eq(coupons.couponCode, code.toUpperCase()),
+ eq(coupons.isInvalidated, false)
+ ),
+ });
+
+ if (!coupon) {
+ return { valid: false, message: "Coupon not found or invalidated" };
+ }
+
+ // Check expiry date
+ if (coupon.validTill && new Date(coupon.validTill) < new Date()) {
+ return { valid: false, message: "Coupon has expired" };
+ }
+
+ // Check if coupon applies to all users or specific user
+ if (!coupon.isApplyForAll && !coupon.isUserBased) {
+ return { valid: false, message: "Coupon is not available for use" };
+ }
+
+ // Check minimum order amount
+ const minOrderValue = coupon.minOrder ? parseFloat(coupon.minOrder) : 0;
+ if (minOrderValue > 0 && orderAmount < minOrderValue) {
+ return { valid: false, message: `Minimum order amount is ${minOrderValue}` };
+ }
+
+ // Calculate discount
+ let discountAmount = 0;
+ if (coupon.discountPercent) {
+ const percent = parseFloat(coupon.discountPercent);
+ discountAmount = (orderAmount * percent) / 100;
+ } else if (coupon.flatDiscount) {
+ discountAmount = parseFloat(coupon.flatDiscount);
+ }
+
+ // Apply max value limit
+ const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0;
+ if (maxValueLimit > 0 && discountAmount > maxValueLimit) {
+ discountAmount = maxValueLimit;
+ }
+
+ return {
+ valid: true,
+ discountAmount,
+ coupon: {
+ id: coupon.id,
+ discountPercent: coupon.discountPercent,
+ flatDiscount: coupon.flatDiscount,
+ maxValue: coupon.maxValue,
+ }
+ };
+ }),
+
+ generateCancellationCoupon: protectedProcedure
+ .input(
+ z.object({
+ orderId: z.number(),
+ })
+ )
+ .mutation(async ({ input, ctx }) => {
+ const { orderId } = input;
+
+ // Get staff user ID from auth middleware
+ const staffUserId = ctx.staffUser?.id;
+ if (!staffUserId) {
+ throw new Error("Unauthorized");
+ }
+
+ // Find the order with user and order status information
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, orderId),
+ with: {
+ user: true,
+ orderStatus: true,
+ },
+ });
+
+ if (!order) {
+ throw new Error("Order not found");
+ }
+
+ // Check if order is cancelled (check if any status entry has isCancelled: true)
+ // const isOrderCancelled = order.orderStatus?.some(status => status.isCancelled) || false;
+ // if (!isOrderCancelled) {
+ // throw new Error("Order is not cancelled");
+ // }
+
+ // // Check if payment method is COD
+ // if (order.isCod) {
+ // throw new Error("Can't generate refund coupon for CoD Order");
+ // }
+
+ // Verify user exists
+ if (!order.user) {
+ throw new Error("User not found for this order");
+ }
+
+ // Generate coupon code: first 3 letters of user name or mobile + orderId
+ const userNamePrefix = (order.user.name || order.user.mobile || 'USR').substring(0, 3).toUpperCase();
+ const couponCode = `${userNamePrefix}${orderId}`;
+
+ // Check if coupon code already exists
+ const existingCoupon = await db.query.coupons.findFirst({
+ where: eq(coupons.couponCode, couponCode),
+ });
+
+ if (existingCoupon) {
+ throw new Error("Coupon code already exists");
+ }
+
+ // Get order total amount
+ const orderAmount = parseFloat(order.totalAmount);
+
+ // Calculate expiry date (30 days from now)
+ const expiryDate = new Date();
+ expiryDate.setDate(expiryDate.getDate() + 30);
+
+ // Create the coupon and update order status in a transaction
+ const coupon = await db.transaction(async (tx) => {
+ // Create the coupon
+ const result = await tx.insert(coupons).values({
+ couponCode,
+ isUserBased: true,
+ flatDiscount: orderAmount.toString(),
+ minOrder: orderAmount.toString(),
+ maxValue: orderAmount.toString(),
+ validTill: expiryDate,
+ maxLimitForUser: 1,
+ createdBy: staffUserId,
+ isApplyForAll: false,
+ }).returning();
+
+ const coupon = result[0];
+
+ // Insert applicable users
+ await tx.insert(couponApplicableUsers).values({
+ couponId: coupon.id,
+ userId: order.userId,
+ });
+
+ // Update order_status with refund coupon ID
+ await tx.update(orderStatus)
+ .set({ refundCouponId: coupon.id })
+ .where(eq(orderStatus.orderId, orderId));
+
+ return coupon;
+ });
+
+ return coupon;
+ }),
+
+ getReservedCoupons: protectedProcedure
+ .input(z.object({
+ cursor: z.number().optional(),
+ limit: z.number().default(50),
+ search: z.string().optional(),
+ }))
+ .query(async ({ input }) => {
+ const { cursor, limit, search } = input;
+
+ let whereCondition = undefined;
+ const conditions = [];
+
+ if (cursor) {
+ conditions.push(lt(reservedCoupons.id, cursor));
+ }
+
+ if (search && search.trim()) {
+ conditions.push(or(
+ like(reservedCoupons.secretCode, `%${search}%`),
+ like(reservedCoupons.couponCode, `%${search}%`)
+ ));
+ }
+
+ if (conditions.length > 0) {
+ whereCondition = and(...conditions);
+ }
+
+ const result = await db.query.reservedCoupons.findMany({
+ where: whereCondition,
+ with: {
+ redeemedUser: true,
+ creator: true,
+ },
+ orderBy: (reservedCoupons, { desc }) => [desc(reservedCoupons.createdAt)],
+ limit: limit + 1, // Fetch one extra to check if there's more
+ });
+
+ const hasMore = result.length > limit;
+ const coupons = hasMore ? result.slice(0, limit) : result;
+ const nextCursor = hasMore ? result[result.length - 1].id : undefined;
+
+ return {
+ coupons,
+ nextCursor,
+ };
+ }),
+
+ createReservedCoupon: protectedProcedure
+ .input(createCouponBodySchema)
+ .mutation(async ({ input, ctx }) => {
+ const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input;
+
+ // Validation: ensure at least one discount type is provided
+ if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {
+ throw new Error("Either discountPercent or flatDiscount must be provided (but not both)");
+ }
+
+ // For reserved coupons, applicableUsers is not used, as it's redeemed by one user
+
+ // Get staff user ID from auth middleware
+ const staffUserId = ctx.staffUser?.id;
+ if (!staffUserId) {
+ throw new Error("Unauthorized");
+ }
+
+ // Generate secret code if not provided (use couponCode as base)
+ let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`;
+
+ // Check if secret code already exists
+ const existing = await db.query.reservedCoupons.findFirst({
+ where: eq(reservedCoupons.secretCode, secretCode),
+ });
+
+ if (existing) {
+ throw new Error("Secret code already exists");
+ }
+
+ const result = await db.insert(reservedCoupons).values({
+ secretCode,
+ couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`,
+ discountPercent: discountPercent?.toString(),
+ flatDiscount: flatDiscount?.toString(),
+ minOrder: minOrder?.toString(),
+ productIds,
+ maxValue: maxValue?.toString(),
+ validTill: validTill ? dayjs(validTill).toDate() : undefined,
+ maxLimitForUser,
+ exclusiveApply: exclusiveApply || false,
+ createdBy: staffUserId,
+ }).returning();
+
+ const coupon = result[0];
+
+ // Insert applicable products if provided
+ if (applicableProducts && applicableProducts.length > 0) {
+ await db.insert(couponApplicableProducts).values(
+ applicableProducts.map(productId => ({
+ couponId: coupon.id,
+ productId,
+ }))
+ );
+ }
+
+ return coupon;
+ }),
+
+ getUsersMiniInfo: protectedProcedure
+ .input(z.object({
+ search: z.string().optional(),
+ limit: z.number().min(1).max(50).default(20),
+ offset: z.number().min(0).default(0),
+ }))
+ .query(async ({ input }) => {
+ const { search, limit } = input;
+
+ let whereCondition = undefined;
+ if (search && search.trim()) {
+ whereCondition = or(
+ like(users.name, `%${search}%`),
+ like(users.mobile, `%${search}%`)
+ );
+ }
+
+ const userList = await db.query.users.findMany({
+ where: whereCondition,
+ columns: {
+ id: true,
+ name: true,
+ mobile: true,
+ },
+ limit: limit,
+ offset: input.offset,
+ orderBy: (users, { asc }) => [asc(users.name)],
+ });
+
+ return {
+ users: userList.map(user => ({
+ id: user.id,
+ name: user.name || 'Unknown',
+ mobile: user.mobile,
+ }))
+ };
+ }),
+
+ createCoupon: protectedProcedure
+ .input(z.object({
+ mobile: z.string().min(1, 'Mobile number is required'),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { mobile } = input;
+
+ // Get staff user ID from auth middleware
+ const staffUserId = ctx.staffUser?.id;
+ if (!staffUserId) {
+ throw new Error("Unauthorized");
+ }
+
+ // Clean mobile number (remove non-digits)
+ const cleanMobile = mobile.replace(/\D/g, '');
+
+ // Validate: exactly 10 digits
+ if (cleanMobile.length !== 10) {
+ throw new Error("Mobile number must be exactly 10 digits");
+ }
+
+ // Check if user exists, create if not
+ let user = await db.query.users.findFirst({
+ where: eq(users.mobile, cleanMobile),
+ });
+
+ if (!user) {
+ // Create new user
+ const [newUser] = await db.insert(users).values({
+ name: null,
+ email: null,
+ mobile: cleanMobile,
+ }).returning();
+ user = newUser;
+ }
+
+ // Generate unique coupon code
+ const timestamp = Date.now().toString().slice(-6);
+ const random = Math.random().toString(36).substring(2, 6).toUpperCase();
+ const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`;
+
+ // Check if coupon code already exists (very unlikely but safe)
+ const existingCode = await db.query.coupons.findFirst({
+ where: eq(coupons.couponCode, couponCode),
+ });
+
+ if (existingCode) {
+ throw new Error("Generated coupon code already exists - please try again");
+ }
+
+ // Create the coupon
+ const [coupon] = await db.insert(coupons).values({
+ couponCode,
+ isUserBased: true,
+ discountPercent: "20", // 20% discount
+ minOrder: "1000", // ₹1000 minimum order
+ maxValue: "500", // ₹500 maximum discount
+ maxLimitForUser: 1, // One-time use
+ isApplyForAll: false,
+ exclusiveApply: false,
+ createdBy: staffUserId,
+ validTill: dayjs().add(90, 'days').toDate(), // 90 days from now
+ }).returning();
+
+ // Associate coupon with user
+ await db.insert(couponApplicableUsers).values({
+ couponId: coupon.id,
+ userId: user.id,
+ });
+
+ return {
+ success: true,
+ coupon: {
+ id: coupon.id,
+ couponCode: coupon.couponCode,
+ userId: user.id,
+ userMobile: user.mobile,
+ discountPercent: 20,
+ minOrder: 1000,
+ maxValue: 500,
+ maxLimitForUser: 1,
+ },
+ };
+ }),
+});
diff --git a/apps/backend/src/trpc/admin-apis/order.ts b/apps/backend/src/trpc/admin-apis/order.ts
new file mode 100644
index 0000000..a41ed23
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/order.ts
@@ -0,0 +1,961 @@
+import { router, protectedProcedure } from "../trpc-index";
+import { z } from "zod";
+import { db } from "../../db/db_index";
+import {
+ orders,
+ orderItems,
+ orderStatus,
+ users,
+ addresses,
+ refunds,
+ coupons,
+ couponUsage,
+} from "../../db/schema";
+import { eq, and, gte, lt, desc, SQL, inArray } from "drizzle-orm";
+import dayjs from "dayjs";
+import utc from "dayjs/plugin/utc";
+import { ApiError } from "../../lib/api-error";
+import {
+ sendOrderPackagedNotification,
+ sendOrderDeliveredNotification,
+} from "../../lib/notif-job";
+
+const updateOrderNotesSchema = z.object({
+ orderId: z.number(),
+ adminNotes: z.string(),
+});
+
+const getFullOrderSchema = z.object({
+ orderId: z.number(),
+});
+
+const getOrderDetailsSchema = z.object({
+ orderId: z.number(),
+});
+
+const updatePackagedSchema = z.object({
+ orderId: z.string(),
+ isPackaged: z.boolean(),
+});
+
+const updateDeliveredSchema = z.object({
+ orderId: z.string(),
+ isDelivered: z.boolean(),
+});
+
+const updateOrderItemPackagingSchema = z.object({
+ orderItemId: z.number(),
+ isPackaged: z.boolean().optional(),
+ isPackageVerified: z.boolean().optional(),
+});
+
+const getSlotOrdersSchema = z.object({
+ slotId: z.string(),
+});
+
+const getTodaysOrdersSchema = z.object({
+ slotId: z.string().optional(),
+});
+
+const getAllOrdersSchema = z.object({
+ cursor: z.number().optional(),
+ limit: z.number().default(20),
+ slotId: z.number().optional().nullable(),
+ packagedFilter: z
+ .enum(["all", "packaged", "not_packaged"])
+ .optional()
+ .default("all"),
+ deliveredFilter: z
+ .enum(["all", "delivered", "not_delivered"])
+ .optional()
+ .default("all"),
+ cancellationFilter: z
+ .enum(["all", "cancelled", "not_cancelled"])
+ .optional()
+ .default("all"),
+ flashDeliveryFilter: z
+ .enum(["all", "flash", "regular"])
+ .optional()
+ .default("all"),
+});
+
+export const orderRouter = router({
+ updateNotes: protectedProcedure
+ .input(updateOrderNotesSchema)
+ .mutation(async ({ input }) => {
+ const { orderId, adminNotes } = input;
+
+ const result = await db
+ .update(orders)
+ .set({
+ adminNotes: adminNotes || null,
+ })
+ .where(eq(orders.id, orderId))
+ .returning();
+
+ if (result.length === 0) {
+ throw new Error("Order not found");
+ }
+
+ return result[0];
+ }),
+
+ getFullOrder: protectedProcedure
+ .input(getFullOrderSchema)
+ .query(async ({ input }) => {
+ const { orderId } = input;
+
+ const orderData = await db.query.orders.findFirst({
+ where: eq(orders.id, orderId),
+ with: {
+ user: true,
+ address: true,
+ slot: true,
+ orderItems: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ },
+ },
+ },
+ },
+ payment: true,
+ paymentInfo: true,
+ },
+ });
+
+ if (!orderData) {
+ throw new Error("Order not found");
+ }
+
+ // Get order status separately
+ const statusRecord = await db.query.orderStatus.findFirst({
+ where: eq(orderStatus.orderId, orderId),
+ });
+
+ let status: "pending" | "delivered" | "cancelled" = "pending";
+ if (statusRecord?.isCancelled) {
+ status = "cancelled";
+ } else if (statusRecord?.isDelivered) {
+ status = "delivered";
+ }
+
+ // Get refund details if order is cancelled
+ let refund = null;
+ if (status === "cancelled") {
+ refund = await db.query.refunds.findFirst({
+ where: eq(refunds.orderId, orderId),
+ });
+ }
+
+ return {
+ id: orderData.id,
+ readableId: orderData.readableId,
+ customerName: `${orderData.user.name}`,
+ customerEmail: orderData.user.email,
+ customerMobile: orderData.user.mobile,
+ address: {
+ line1: orderData.address.addressLine1,
+ line2: orderData.address.addressLine2,
+ city: orderData.address.city,
+ state: orderData.address.state,
+ pincode: orderData.address.pincode,
+ phone: orderData.address.phone,
+ },
+ slotInfo: orderData.slot
+ ? {
+ time: orderData.slot.deliveryTime.toISOString(),
+ sequence: orderData.slot.deliverySequence,
+ }
+ : null,
+ isCod: orderData.isCod,
+ isOnlinePayment: orderData.isOnlinePayment,
+ totalAmount: orderData.totalAmount,
+ adminNotes: orderData.adminNotes,
+ userNotes: orderData.userNotes,
+ createdAt: orderData.createdAt,
+ status,
+ isPackaged:
+ orderData.orderItems.every((item) => item.is_packaged) || false,
+ isDelivered: statusRecord?.isDelivered || false,
+ items: orderData.orderItems.map((item) => ({
+ id: item.id,
+ name: item.product.name,
+ quantity: item.quantity,
+ price: item.price,
+ unit: item.product.unit?.shortNotation,
+ amount:
+ parseFloat(item.price.toString()) *
+ parseFloat(item.quantity || "0"),
+ })),
+ payment: orderData.payment
+ ? {
+ status: orderData.payment.status,
+ gateway: orderData.payment.gateway,
+ merchantOrderId: orderData.payment.merchantOrderId,
+ }
+ : null,
+ paymentInfo: orderData.paymentInfo
+ ? {
+ status: orderData.paymentInfo.status,
+ gateway: orderData.paymentInfo.gateway,
+ merchantOrderId: orderData.paymentInfo.merchantOrderId,
+ }
+ : null,
+ // Cancellation details (only present for cancelled orders)
+ cancelReason: statusRecord?.cancelReason || null,
+ cancellationReviewed: statusRecord?.cancellationReviewed || false,
+ isRefundDone: refund?.refundStatus === "processed" || false,
+ };
+ }),
+
+ getOrderDetails: protectedProcedure
+ .input(getOrderDetailsSchema)
+ .query(async ({ input }) => {
+ const { orderId } = input;
+
+ // Single optimized query with all relations
+ const orderData = await db.query.orders.findFirst({
+ where: eq(orders.id, orderId),
+ with: {
+ user: true,
+ address: true,
+ slot: true,
+ orderItems: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ },
+ },
+ },
+ },
+ payment: true,
+ paymentInfo: true,
+ orderStatus: true, // Include in main query
+ refunds: true, // Include in main query
+ },
+ });
+
+ if (!orderData) {
+ throw new Error("Order not found");
+ }
+
+ // Get coupon usage for this specific order using new orderId field
+ const couponUsageData = await db.query.couponUsage.findMany({
+ where: eq(couponUsage.orderId, orderData.id), // Use new orderId field
+ with: {
+ coupon: true,
+ },
+ });
+
+ let couponData = null;
+ if (couponUsageData.length > 0) {
+ // Calculate total discount from multiple coupons
+ let totalDiscountAmount = 0;
+ const orderTotal = parseFloat(orderData.totalAmount.toString());
+
+ for (const usage of couponUsageData) {
+ let discountAmount = 0;
+
+ if (usage.coupon.discountPercent) {
+ discountAmount =
+ (orderTotal *
+ parseFloat(usage.coupon.discountPercent.toString())) /
+ 100;
+ } else if (usage.coupon.flatDiscount) {
+ discountAmount = parseFloat(usage.coupon.flatDiscount.toString());
+ }
+
+ // Apply max value limit if set
+ if (
+ usage.coupon.maxValue &&
+ discountAmount > parseFloat(usage.coupon.maxValue.toString())
+ ) {
+ discountAmount = parseFloat(usage.coupon.maxValue.toString());
+ }
+
+ totalDiscountAmount += discountAmount;
+ }
+
+ couponData = {
+ couponCode: couponUsageData
+ .map((u) => u.coupon.couponCode)
+ .join(", "),
+ couponDescription: `${couponUsageData.length} coupons applied`,
+ discountAmount: totalDiscountAmount,
+ };
+ }
+
+ // Status determination from included relation
+ const statusRecord = orderData.orderStatus?.[0];
+ let status: "pending" | "delivered" | "cancelled" = "pending";
+ if (statusRecord?.isCancelled) {
+ status = "cancelled";
+ } else if (statusRecord?.isDelivered) {
+ status = "delivered";
+ }
+
+ // Always include refund data (will be null/undefined if not cancelled)
+ const refund = orderData.refunds?.[0];
+
+ return {
+ id: orderData.id,
+ readableId: orderData.readableId,
+ customerName: `${orderData.user.name}`,
+ customerEmail: orderData.user.email,
+ customerMobile: orderData.user.mobile,
+ address: {
+ line1: orderData.address.addressLine1,
+ line2: orderData.address.addressLine2,
+ city: orderData.address.city,
+ state: orderData.address.state,
+ pincode: orderData.address.pincode,
+ phone: orderData.address.phone,
+ },
+ slotInfo: orderData.slot
+ ? {
+ time: orderData.slot.deliveryTime.toISOString(),
+ sequence: orderData.slot.deliverySequence,
+ }
+ : null,
+ isCod: orderData.isCod,
+ isOnlinePayment: orderData.isOnlinePayment,
+ totalAmount: orderData.totalAmount,
+ adminNotes: orderData.adminNotes,
+ userNotes: orderData.userNotes,
+ createdAt: orderData.createdAt,
+ status,
+ isPackaged: statusRecord?.isPackaged || false,
+ isDelivered: statusRecord?.isDelivered || false,
+ items: orderData.orderItems.map((item) => ({
+ id: item.id,
+ name: item.product.name,
+ quantity: item.quantity,
+ price: item.price,
+ unit: item.product.unit?.shortNotation,
+ amount:
+ parseFloat(item.price.toString()) *
+ parseFloat(item.quantity || "0"),
+ isPackaged: item.is_packaged,
+ isPackageVerified: item.is_package_verified,
+ })),
+ payment: orderData.payment
+ ? {
+ status: orderData.payment.status,
+ gateway: orderData.payment.gateway,
+ merchantOrderId: orderData.payment.merchantOrderId,
+ }
+ : null,
+ paymentInfo: orderData.paymentInfo
+ ? {
+ status: orderData.paymentInfo.status,
+ gateway: orderData.paymentInfo.gateway,
+ merchantOrderId: orderData.paymentInfo.merchantOrderId,
+ }
+ : null,
+ // Cancellation details (always included, null if not cancelled)
+ cancelReason: statusRecord?.cancelReason || null,
+ cancellationReviewed: statusRecord?.cancellationReviewed || false,
+ isRefundDone: refund?.refundStatus === "processed" || false,
+ refundStatus: refund?.refundStatus as RefundStatus,
+ refundAmount: refund?.refundAmount
+ ? parseFloat(refund.refundAmount.toString())
+ : null,
+ // Coupon information
+ couponData: couponData,
+ couponCode: couponData?.couponCode || null,
+ couponDescription: couponData?.couponDescription || null,
+ discountAmount: couponData?.discountAmount || null,
+ orderStatus: statusRecord,
+ refundRecord: refund,
+ isFlashDelivery: orderData.isFlashDelivery,
+ };
+ }),
+
+ updatePackaged: protectedProcedure
+ .input(updatePackagedSchema)
+ .mutation(async ({ input }) => {
+ const { orderId, isPackaged } = input;
+
+ // Update all order items to the specified packaged state
+ await db
+ .update(orderItems)
+ .set({ is_packaged: isPackaged })
+ .where(eq(orderItems.orderId, parseInt(orderId)));
+
+ // Also update the order status table for backward compatibility
+ if (!isPackaged) {
+ await db
+ .update(orderStatus)
+ .set({ isPackaged, isDelivered: false })
+ .where(eq(orderStatus.orderId, parseInt(orderId)));
+ } else {
+ await db
+ .update(orderStatus)
+ .set({ isPackaged })
+ .where(eq(orderStatus.orderId, parseInt(orderId)));
+ }
+
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, parseInt(orderId)),
+ });
+ if (order) await sendOrderPackagedNotification(order.userId, orderId);
+
+ return { success: true };
+ }),
+
+ updateDelivered: protectedProcedure
+ .input(updateDeliveredSchema)
+ .mutation(async ({ input }) => {
+ const { orderId, isDelivered } = input;
+
+ await db
+ .update(orderStatus)
+ .set({ isDelivered })
+ .where(eq(orderStatus.orderId, parseInt(orderId)));
+
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, parseInt(orderId)),
+ });
+ if (order) await sendOrderDeliveredNotification(order.userId, orderId);
+
+ return { success: true };
+ }),
+
+ updateOrderItemPackaging: protectedProcedure
+ .input(updateOrderItemPackagingSchema)
+ .mutation(async ({ input }) => {
+ const { orderItemId, isPackaged, isPackageVerified } = input;
+ console.log({ orderItemId, isPackaged, isPackageVerified });
+
+ // Validate that orderItem exists
+ const orderItem = await db.query.orderItems.findFirst({
+ where: eq(orderItems.id, orderItemId),
+ });
+
+ if (!orderItem) {
+ throw new ApiError("Order item not found", 404);
+ }
+
+ // Build update object with only provided fields
+ const updateData: any = {};
+ if (isPackaged !== undefined) {
+ updateData.is_packaged = isPackaged;
+ }
+ if (isPackageVerified !== undefined) {
+ updateData.is_package_verified = isPackageVerified;
+ }
+
+ // Update the order item
+ await db
+ .update(orderItems)
+ .set(updateData)
+ .where(eq(orderItems.id, orderItemId));
+
+ return { success: true };
+ }),
+
+ getSlotOrders: protectedProcedure
+ .input(getSlotOrdersSchema)
+ .query(async ({ input }) => {
+ const { slotId } = input;
+
+ const slotOrders = await db.query.orders.findMany({
+ where: eq(orders.slotId, parseInt(slotId)),
+ with: {
+ user: true,
+ address: true,
+ slot: true,
+ orderItems: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ },
+ },
+ },
+ },
+ orderStatus: true,
+ },
+ });
+
+ const filteredOrders = slotOrders.filter((order) => {
+ const statusRecord = order.orderStatus[0];
+ return (
+ order.isCod ||
+ (statusRecord && statusRecord.paymentStatus === "success")
+ );
+ });
+
+ const formattedOrders = filteredOrders.map((order) => {
+ const statusRecord = order.orderStatus[0]; // assuming one status per order
+ let status: "pending" | "delivered" | "cancelled" = "pending";
+ if (statusRecord?.isCancelled) {
+ status = "cancelled";
+ } else if (statusRecord?.isDelivered) {
+ status = "delivered";
+ }
+
+ const items = order.orderItems.map((item) => ({
+ id: item.id,
+ name: item.product.name,
+ quantity: parseFloat(item.quantity),
+ price: parseFloat(item.price.toString()),
+ amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),
+ unit: item.product.unit?.shortNotation || "",
+ isPackaged: item.is_packaged,
+ isPackageVerified: item.is_package_verified,
+ }));
+
+ return {
+ id: order.id,
+ readableId: order.readableId,
+ customerName: order.user.name,
+ address: `${order.address.addressLine1}${
+ order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""
+ }, ${order.address.city}, ${order.address.state} - ${
+ order.address.pincode
+ }, Phone: ${order.address.phone}`,
+ addressId: order.addressId,
+ latitude: order.address.latitude,
+ longitude: order.address.longitude,
+ totalAmount: parseFloat(order.totalAmount),
+ items,
+ deliveryTime: order.slot?.deliveryTime.toISOString() || null,
+ status,
+ isPackaged:
+ order.orderItems.every((item) => item.is_packaged) || false,
+ isDelivered: statusRecord?.isDelivered || false,
+ isCod: order.isCod,
+ paymentMode: order.isCod ? "COD" : "Online",
+ paymentStatus: statusRecord?.paymentStatus || "pending",
+ slotId: order.slotId,
+ adminNotes: order.adminNotes,
+ userNotes: order.userNotes,
+ };
+ });
+
+ return { success: true, data: formattedOrders };
+ }),
+
+ getTodaysOrders: protectedProcedure
+ .input(getTodaysOrdersSchema)
+ .query(async ({ input }) => {
+ const { slotId } = input;
+ const start = dayjs().startOf("day").toDate();
+ const end = dayjs().endOf("day").toDate();
+
+ let whereCondition = and(
+ gte(orders.createdAt, start),
+ lt(orders.createdAt, end)
+ );
+
+ if (slotId) {
+ whereCondition = and(
+ whereCondition,
+ eq(orders.slotId, parseInt(slotId))
+ );
+ }
+
+ const todaysOrders = await db.query.orders.findMany({
+ where: whereCondition,
+ with: {
+ user: true,
+ address: true,
+ slot: true,
+ orderItems: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ },
+ },
+ },
+ },
+ orderStatus: true,
+ },
+ });
+
+ const filteredOrders = todaysOrders.filter((order) => {
+ const statusRecord = order.orderStatus[0];
+ return (
+ order.isCod ||
+ (statusRecord && statusRecord.paymentStatus === "success")
+ );
+ });
+
+ const formattedOrders = filteredOrders.map((order) => {
+ const statusRecord = order.orderStatus[0]; // assuming one status per order
+ let status: "pending" | "delivered" | "cancelled" = "pending";
+ if (statusRecord?.isCancelled) {
+ status = "cancelled";
+ } else if (statusRecord?.isDelivered) {
+ status = "delivered";
+ }
+
+ const items = order.orderItems.map((item) => ({
+ name: item.product.name,
+ quantity: parseFloat(item.quantity),
+ price: parseFloat(item.price.toString()),
+ amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),
+ unit: item.product.unit?.shortNotation || "",
+ }));
+
+ return {
+ orderId: order.id.toString(),
+ readableId: order.readableId,
+ customerName: order.user.name,
+ address: `${order.address.addressLine1}${
+ order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""
+ }, ${order.address.city}, ${order.address.state} - ${
+ order.address.pincode
+ }`,
+ totalAmount: parseFloat(order.totalAmount),
+ items,
+ deliveryTime: order.slot?.deliveryTime.toISOString() || null,
+ status,
+ isPackaged:
+ order.orderItems.every((item) => item.is_packaged) || false,
+ isDelivered: statusRecord?.isDelivered || false,
+ isCod: order.isCod,
+ paymentMode: order.isCod ? "COD" : "Online",
+ paymentStatus: statusRecord?.paymentStatus || "pending",
+ slotId: order.slotId,
+ adminNotes: order.adminNotes,
+ userNotes: order.userNotes,
+ };
+ });
+
+ return { success: true, data: formattedOrders };
+ }),
+
+ updateAddressCoords: protectedProcedure
+ .input(
+ z.object({
+ addressId: z.number(),
+ latitude: z.number(),
+ longitude: z.number(),
+ })
+ )
+ .mutation(async ({ input }) => {
+ const { addressId, latitude, longitude } = input;
+
+ const result = await db
+ .update(addresses)
+ .set({
+ latitude,
+ longitude,
+ })
+ .where(eq(addresses.id, addressId))
+ .returning();
+
+ if (result.length === 0) {
+ throw new ApiError("Address not found", 404);
+ }
+
+ return { success: true };
+ }),
+
+ getAll: protectedProcedure
+ .input(getAllOrdersSchema)
+ .query(async ({ input }) => {
+ try {
+ const {
+ cursor,
+ limit,
+ slotId,
+ packagedFilter,
+ deliveredFilter,
+ cancellationFilter,
+ flashDeliveryFilter,
+ } = input;
+
+ let whereCondition: SQL | undefined = eq(orders.id, orders.id); // always true
+ if (cursor) {
+ whereCondition = and(whereCondition, lt(orders.id, cursor));
+ }
+ if (slotId) {
+ whereCondition = and(whereCondition, eq(orders.slotId, slotId));
+ }
+ if (packagedFilter === "packaged") {
+ whereCondition = and(
+ whereCondition,
+ eq(orderStatus.isPackaged, true)
+ );
+ } else if (packagedFilter === "not_packaged") {
+ whereCondition = and(
+ whereCondition,
+ eq(orderStatus.isPackaged, false)
+ );
+ }
+ if (deliveredFilter === "delivered") {
+ whereCondition = and(
+ whereCondition,
+ eq(orderStatus.isDelivered, true)
+ );
+ } else if (deliveredFilter === "not_delivered") {
+ whereCondition = and(
+ whereCondition,
+ eq(orderStatus.isDelivered, false)
+ );
+ }
+ if (cancellationFilter === "cancelled") {
+ whereCondition = and(
+ whereCondition,
+ eq(orderStatus.isCancelled, true)
+ );
+ } else if (cancellationFilter === "not_cancelled") {
+ whereCondition = and(
+ whereCondition,
+ eq(orderStatus.isCancelled, false)
+ );
+ }
+ if (flashDeliveryFilter === "flash") {
+ whereCondition = and(
+ whereCondition,
+ eq(orders.isFlashDelivery, true)
+ );
+ } else if (flashDeliveryFilter === "regular") {
+ whereCondition = and(
+ whereCondition,
+ eq(orders.isFlashDelivery, false)
+ );
+ }
+
+ const allOrders = await db.query.orders.findMany({
+ where: whereCondition,
+ orderBy: desc(orders.createdAt),
+ limit: limit + 1, // fetch one extra to check if there's more
+ with: {
+ user: true,
+ address: true,
+ slot: true,
+ orderItems: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ },
+ },
+ },
+ },
+ orderStatus: true,
+ },
+ });
+
+ const hasMore = allOrders.length > limit;
+ const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders;
+
+ const filteredOrders = ordersToReturn.filter((order) => {
+ const statusRecord = order.orderStatus[0];
+ return (
+ order.isCod ||
+ (statusRecord && statusRecord.paymentStatus === "success")
+ );
+ });
+
+ const formattedOrders = filteredOrders.map((order) => {
+ const statusRecord = order.orderStatus[0];
+ let status: "pending" | "delivered" | "cancelled" = "pending";
+ if (statusRecord?.isCancelled) {
+ status = "cancelled";
+ } else if (statusRecord?.isDelivered) {
+ status = "delivered";
+ }
+
+ const items = order.orderItems
+ .map((item) => ({
+ id: item.id,
+ name: item.product.name,
+ quantity: parseFloat(item.quantity),
+ price: parseFloat(item.price.toString()),
+ amount:
+ parseFloat(item.quantity) * parseFloat(item.price.toString()),
+ unit: item.product.unit?.shortNotation || "",
+ isPackaged: item.is_packaged,
+ isPackageVerified: item.is_package_verified,
+ }))
+ .sort((first, second) => first.id - second.id);
+ dayjs.extend(utc);
+ return {
+ id: order.id,
+ orderId: order.id.toString(),
+ readableId: order.readableId,
+ customerName: order.user.name,
+ address: `${order.address.addressLine1}${
+ order.address.addressLine2
+ ? `, ${order.address.addressLine2}`
+ : ""
+ }, ${order.address.city}, ${order.address.state} - ${
+ order.address.pincode
+ }, Phone: ${order.address.phone}`,
+ addressId: order.addressId,
+ latitude: order.address.latitude,
+ longitude: order.address.longitude,
+ totalAmount: parseFloat(order.totalAmount),
+ deliveryCharge: parseFloat(order.deliveryCharge || "0"),
+ items,
+ createdAt: order.createdAt,
+ // deliveryTime: order.slot ? dayjs.utc(order.slot.deliveryTime).format('ddd, MMM D • h:mm A') : 'Not scheduled',
+ deliveryTime: order.slot?.deliveryTime.toISOString() || null,
+ status,
+ isPackaged:
+ order.orderItems.every((item) => item.is_packaged) || false,
+ isDelivered: statusRecord?.isDelivered || false,
+ isCod: order.isCod,
+ isFlashDelivery: order.isFlashDelivery,
+ userNotes: order.userNotes,
+ adminNotes: order.adminNotes,
+ };
+ });
+
+ return {
+ orders: formattedOrders,
+ nextCursor: hasMore
+ ? ordersToReturn[ordersToReturn.length - 1].id
+ : undefined,
+ };
+ } catch (e) {
+ console.log({ e });
+ }
+ }),
+
+ rebalanceSlots: protectedProcedure
+ .input(z.object({ slotIds: z.array(z.number()).min(1).max(50) }))
+ .mutation(async ({ input }) => {
+ const slotIds = input.slotIds;
+
+ const ordersList = await db.query.orders.findMany({
+ where: inArray(orders.slotId, slotIds),
+ with: {
+ orderItems: {
+ with: {
+ product: true
+ }
+ },
+ couponUsages: {
+ with: {
+ coupon: true
+ }
+ },
+ }
+ });
+
+ const processedOrdersData = ordersList.map((order) => {
+
+ let newTotal = order.orderItems.reduce((acc,item) => {
+ const latestPrice = +item.product.price;
+ const amount = (latestPrice * Number(item.quantity));
+ return acc+amount;
+ },0)
+
+ order.orderItems.forEach(item => {
+ item.price = item.product.price;
+ item.discountedPrice = item.product.price
+ })
+
+ const coupon = order.couponUsages[0]?.coupon;
+
+ let discount = 0;
+ if(coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {
+ const proportion = Number(order.orderGroupProportion || 1);
+ if(coupon.discountPercent) {
+ const maxDiscount = Number(coupon.maxValue || Infinity) * proportion;
+ discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount);
+ }
+ else {
+ discount = Number(coupon.flatDiscount) * proportion;
+ }
+ }
+ newTotal -= discount
+
+ const { couponUsages, orderItems: orderItemsRaw, ...rest} = order;
+ const updatedOrderItems = orderItemsRaw.map(item => {
+ const { product, ...rawOrderItem } = item;
+ return rawOrderItem;
+ })
+ return {order: rest, updatedOrderItems, newTotal }
+ })
+
+ const updatedOrderIds: number[] = [];
+ await db.transaction(async (tx) => {
+ for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {
+ await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id));
+ updatedOrderIds.push(order.id);
+
+ for (const item of updatedOrderItems) {
+ await tx.update(orderItems).set({
+ price: item.price,
+ discountedPrice: item.discountedPrice
+ }).where(eq(orderItems.id, item.id));
+ }
+ }
+ });
+
+ return { success: true, updatedOrders: updatedOrderIds, message: `Rebalanced ${updatedOrderIds.length} orders.` };
+ }),
+
+ cancelOrder: protectedProcedure
+ .input(z.object({
+ orderId: z.number(),
+ reason: z.string().min(1, "Cancellation reason is required"),
+ }))
+ .mutation(async ({ input }) => {
+ const { orderId, reason } = input;
+
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, orderId),
+ with: {
+ orderStatus: true,
+ },
+ });
+
+ if (!order) {
+ throw new ApiError("Order not found", 404);
+ }
+
+ const status = order.orderStatus[0];
+ if (!status) {
+ throw new ApiError("Order status not found", 400);
+ }
+
+ if (status.isCancelled) {
+ throw new ApiError("Order is already cancelled", 400);
+ }
+
+ if (status.isDelivered) {
+ throw new ApiError("Cannot cancel delivered order", 400);
+ }
+
+ const result = await db.transaction(async (tx) => {
+ await tx
+ .update(orderStatus)
+ .set({
+ isCancelled: true,
+ isCancelledByAdmin: true,
+ cancelReason: reason,
+ cancellationAdminNotes: reason,
+ cancellationReviewed: true,
+ cancellationReviewedAt: new Date(),
+ })
+ .where(eq(orderStatus.id, status.id));
+
+ const refundStatus = order.isCod ? "na" : "pending";
+
+ await tx.insert(refunds).values({
+ orderId: order.id,
+ refundStatus,
+ });
+
+ return { orderId: order.id, userId: order.userId };
+ });
+
+ return { success: true, message: "Order cancelled successfully" };
+ }),
+});
+
+// {"id": "order_Rhh00qJNdjUp8o", "notes": {"retry": "true", "customerOrderId": "14"}, "amount": 21000, "entity": "order", "status": "created", "receipt": "order_14_retry", "attempts": 0, "currency": "INR", "offer_id": null, "signature": "6df20655021f1d6841340f2a2ef2ef9378cb3d43495ab09e85f08aea1a851583", "amount_due": 21000, "created_at": 1763575791, "payment_id": "pay_Rhh15cLL28YM7j", "amount_paid": 0}
+
+type RefundStatus = "success" | "pending" | "failed" | "none" | "na";
diff --git a/apps/backend/src/trpc/admin-apis/payments.ts b/apps/backend/src/trpc/admin-apis/payments.ts
new file mode 100644
index 0000000..23ca16e
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/payments.ts
@@ -0,0 +1,146 @@
+import { router, protectedProcedure } from "../trpc-index";
+import { z } from "zod";
+import { db } from "../../db/db_index";
+import {
+ orders,
+ orderStatus,
+ payments,
+ refunds,
+} from "../../db/schema";
+import { and, eq } from "drizzle-orm";
+import { ApiError } from "../../lib/api-error";
+import { RazorpayPaymentService } from "../../lib/payments-utils";
+
+const initiateRefundSchema = z
+ .object({
+ orderId: z.number(),
+ refundPercent: z.number().min(0).max(100).optional(),
+ refundAmount: z.number().min(0).optional(),
+ })
+ .refine(
+ (data) => {
+ const hasPercent = data.refundPercent !== undefined;
+ const hasAmount = data.refundAmount !== undefined;
+ return (hasPercent && !hasAmount) || (!hasPercent && hasAmount);
+ },
+ {
+ message:
+ "Provide either refundPercent or refundAmount, not both or neither",
+ }
+ );
+
+export const adminPaymentsRouter = router({
+ initiateRefund: protectedProcedure
+ .input(initiateRefundSchema)
+ .mutation(async ({ input }) => {
+ try {
+ const { orderId, refundPercent, refundAmount } = input;
+
+ // Validate order exists
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, orderId),
+ });
+
+ if (!order) {
+ throw new ApiError("Order not found", 404);
+ }
+
+ // Check if order is paid
+ const orderStatusRecord = await db.query.orderStatus.findFirst({
+ where: eq(orderStatus.orderId, orderId),
+ });
+
+ if(order.isCod) {
+ throw new ApiError("Order is a Cash On Delivery. Not eligible for refund")
+ }
+
+ if (
+ !orderStatusRecord ||
+ (orderStatusRecord.paymentStatus !== "success" &&
+ !(order.isCod && orderStatusRecord.isDelivered))
+ ) {
+ throw new ApiError("Order payment not verified or not eligible for refund", 400);
+ }
+
+ // Calculate refund amount
+ let calculatedRefundAmount: number;
+ if (refundPercent !== undefined) {
+ calculatedRefundAmount =
+ (parseFloat(order.totalAmount) * refundPercent) / 100;
+ } else if (refundAmount !== undefined) {
+ calculatedRefundAmount = refundAmount;
+ if (calculatedRefundAmount > parseFloat(order.totalAmount)) {
+ throw new ApiError("Refund amount cannot exceed order total", 400);
+ }
+ } else {
+ throw new ApiError("Invalid refund parameters", 400);
+ }
+
+ let razorpayRefund = null;
+ let merchantRefundId = null;
+
+ // Get payment record for online payments
+ const payment = await db.query.payments.findFirst({
+ where: and(
+ eq(payments.orderId, orderId),
+ eq(payments.status, "success")
+ ),
+ });
+
+ if (!payment || payment.status !== "success") {
+ throw new ApiError("Payment not found or not successful", 404);
+ }
+
+ const payload = payment.payload as any;
+ // Initiate Razorpay refund
+ razorpayRefund = await RazorpayPaymentService.initiateRefund(
+ payload.payment_id,
+ Math.round(calculatedRefundAmount * 100) // Convert to paisa
+ );
+ merchantRefundId = razorpayRefund.id;
+
+
+
+ // Check if refund already exists for this order
+ const existingRefund = await db.query.refunds.findFirst({
+ where: eq(refunds.orderId, orderId),
+ });
+
+ const refundStatus = "initiated";
+
+ if (existingRefund) {
+ // Update existing refund
+ await db
+ .update(refunds)
+ .set({
+ refundAmount: calculatedRefundAmount.toString(),
+ refundStatus,
+ merchantRefundId,
+ refundProcessedAt: order.isCod ? new Date() : null,
+ })
+ .where(eq(refunds.id, existingRefund.id));
+ } else {
+ // Insert new refund
+ await db
+ .insert(refunds)
+ .values({
+ orderId,
+ refundAmount: calculatedRefundAmount.toString(),
+ refundStatus,
+ merchantRefundId,
+ });
+ }
+
+ return {
+ refundId: merchantRefundId || `cod_${orderId}`,
+ amount: calculatedRefundAmount,
+ status: refundStatus,
+ message: order.isCod ? "COD refund processed successfully" : "Refund initiated successfully",
+ };
+ }
+ catch(e) {
+ console.log(e);
+ throw new ApiError("Failed to initiate refund")
+ }
+ }),
+});
diff --git a/apps/backend/src/trpc/admin-apis/product.ts b/apps/backend/src/trpc/admin-apis/product.ts
new file mode 100644
index 0000000..8c3d0a6
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/product.ts
@@ -0,0 +1,512 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { productInfo, units, specialDeals, productSlots, productTags, productReviews, users, productGroupInfo, productGroupMembership } from '../../db/schema';
+import { eq, and, inArray, desc, sql } from 'drizzle-orm';
+import { ApiError } from '../../lib/api-error';
+import { imageUploadS3, generateSignedUrlsFromS3Urls, getOriginalUrlFromSignedUrl, claimUploadUrl } from '../../lib/s3-client';
+import { deleteS3Image } from '../../lib/delete-image';
+import type { SpecialDeal } from '../../db/types';
+
+type CreateDeal = {
+ quantity: number;
+ price: number;
+ validTill: string;
+};
+
+export const productRouter = router({
+ getProducts: protectedProcedure
+ .query(async ({ ctx }) => {
+ const products = await db.query.productInfo.findMany({
+ orderBy: productInfo.name,
+ with: {
+ unit: true,
+ store: true,
+ },
+ });
+
+ // Generate signed URLs for all product images
+ const productsWithSignedUrls = await Promise.all(
+ products.map(async (product) => ({
+ ...product,
+ images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),
+ }))
+ );
+
+ return {
+ products: productsWithSignedUrls,
+ count: productsWithSignedUrls.length,
+ };
+ }),
+
+ getProductById: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ }))
+ .query(async ({ input, ctx }) => {
+ const { id } = input;
+
+ const product = await db.query.productInfo.findFirst({
+ where: eq(productInfo.id, id),
+ with: {
+ unit: true,
+ },
+ });
+
+ if (!product) {
+ throw new ApiError("Product not found", 404);
+ }
+
+ // Fetch special deals for this product
+ const deals = await db.query.specialDeals.findMany({
+ where: eq(specialDeals.productId, id),
+ orderBy: specialDeals.quantity,
+ });
+
+ // Fetch associated tags for this product
+ const productTagsData = await db.query.productTags.findMany({
+ where: eq(productTags.productId, id),
+ with: {
+ tag: true,
+ },
+ });
+
+ // Generate signed URLs for product images
+ const productWithSignedUrls = {
+ ...product,
+ images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),
+ deals,
+ tags: productTagsData.map(pt => pt.tag),
+ };
+
+ return {
+ product: productWithSignedUrls,
+ };
+ }),
+
+ deleteProduct: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { id } = input;
+
+ const [deletedProduct] = await db
+ .delete(productInfo)
+ .where(eq(productInfo.id, id))
+ .returning();
+
+ if (!deletedProduct) {
+ throw new ApiError("Product not found", 404);
+ }
+
+ return {
+ message: "Product deleted successfully",
+ };
+ }),
+
+ toggleOutOfStock: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { id } = input;
+
+ const product = await db.query.productInfo.findFirst({
+ where: eq(productInfo.id, id),
+ });
+
+ if (!product) {
+ throw new ApiError("Product not found", 404);
+ }
+
+ const [updatedProduct] = await db
+ .update(productInfo)
+ .set({
+ isOutOfStock: !product.isOutOfStock,
+ })
+ .where(eq(productInfo.id, id))
+ .returning();
+
+ return {
+ product: updatedProduct,
+ message: `Product marked as ${updatedProduct.isOutOfStock ? 'out of stock' : 'in stock'}`,
+ };
+ }),
+
+ updateSlotProducts: protectedProcedure
+ .input(z.object({
+ slotId: z.string(),
+ productIds: z.array(z.string()),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { slotId, productIds } = input;
+
+ if (!Array.isArray(productIds)) {
+ throw new ApiError("productIds must be an array", 400);
+ }
+
+ // Get current associations
+ const currentAssociations = await db.query.productSlots.findMany({
+ where: eq(productSlots.slotId, parseInt(slotId)),
+ columns: {
+ productId: true,
+ },
+ });
+
+ const currentProductIds = currentAssociations.map(assoc => assoc.productId);
+ const newProductIds = productIds.map((id: string) => parseInt(id));
+
+ // Find products to add and remove
+ const productsToAdd = newProductIds.filter(id => !currentProductIds.includes(id));
+ const productsToRemove = currentProductIds.filter(id => !newProductIds.includes(id));
+
+ // Remove associations for products that are no longer selected
+ if (productsToRemove.length > 0) {
+ await db.delete(productSlots).where(
+ and(
+ eq(productSlots.slotId, parseInt(slotId)),
+ inArray(productSlots.productId, productsToRemove)
+ )
+ );
+ }
+
+ // Add associations for newly selected products
+ if (productsToAdd.length > 0) {
+ const newAssociations = productsToAdd.map(productId => ({
+ productId,
+ slotId: parseInt(slotId),
+ }));
+
+ await db.insert(productSlots).values(newAssociations);
+ }
+
+ return {
+ message: "Slot products updated successfully",
+ added: productsToAdd.length,
+ removed: productsToRemove.length,
+ };
+ }),
+
+ getSlotProductIds: protectedProcedure
+ .input(z.object({
+ slotId: z.string(),
+ }))
+ .query(async ({ input, ctx }) => {
+ const { slotId } = input;
+
+ const associations = await db.query.productSlots.findMany({
+ where: eq(productSlots.slotId, parseInt(slotId)),
+ columns: {
+ productId: true,
+ },
+ });
+
+ const productIds = associations.map(assoc => assoc.productId);
+
+ return {
+ productIds,
+ };
+ }),
+
+ getSlotsProductIds: protectedProcedure
+ .input(z.object({
+ slotIds: z.array(z.number()),
+ }))
+ .query(async ({ input, ctx }) => {
+ const { slotIds } = input;
+
+ if (!Array.isArray(slotIds)) {
+ throw new ApiError("slotIds must be an array", 400);
+ }
+
+ if (slotIds.length === 0) {
+ return {};
+ }
+
+ // Fetch all associations for the requested slots
+ const associations = await db.query.productSlots.findMany({
+ where: inArray(productSlots.slotId, slotIds),
+ columns: {
+ slotId: true,
+ productId: true,
+ },
+ });
+
+ // Group by slotId
+ const result = associations.reduce((acc, assoc) => {
+ if (!acc[assoc.slotId]) {
+ acc[assoc.slotId] = [];
+ }
+ acc[assoc.slotId].push(assoc.productId);
+ return acc;
+ }, {} as Record);
+
+ // Ensure all requested slots have entries (even if empty)
+ slotIds.forEach(slotId => {
+ if (!result[slotId]) {
+ result[slotId] = [];
+ }
+ });
+
+ return result;
+ }),
+
+ getProductReviews: protectedProcedure
+ .input(z.object({
+ productId: z.number().int().positive(),
+ limit: z.number().int().min(1).max(50).optional().default(10),
+ offset: z.number().int().min(0).optional().default(0),
+ }))
+ .query(async ({ input }) => {
+ const { productId, limit, offset } = input;
+
+ const reviews = await db
+ .select({
+ id: productReviews.id,
+ reviewBody: productReviews.reviewBody,
+ ratings: productReviews.ratings,
+ imageUrls: productReviews.imageUrls,
+ reviewTime: productReviews.reviewTime,
+ adminResponse: productReviews.adminResponse,
+ adminResponseImages: productReviews.adminResponseImages,
+ userName: users.name,
+ })
+ .from(productReviews)
+ .innerJoin(users, eq(productReviews.userId, users.id))
+ .where(eq(productReviews.productId, productId))
+ .orderBy(desc(productReviews.reviewTime))
+ .limit(limit)
+ .offset(offset);
+
+ // Generate signed URLs for images
+ const reviewsWithSignedUrls = await Promise.all(
+ reviews.map(async (review) => ({
+ ...review,
+ signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),
+ signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),
+ }))
+ );
+
+ // Check if more reviews exist
+ const totalCountResult = await db
+ .select({ count: sql`count(*)` })
+ .from(productReviews)
+ .where(eq(productReviews.productId, productId));
+
+ const totalCount = Number(totalCountResult[0].count);
+ const hasMore = offset + limit < totalCount;
+
+ return { reviews: reviewsWithSignedUrls, hasMore };
+ }),
+
+ respondToReview: protectedProcedure
+ .input(z.object({
+ reviewId: z.number().int().positive(),
+ adminResponse: z.string().optional(),
+ adminResponseImages: z.array(z.string()).optional().default([]),
+ uploadUrls: z.array(z.string()).optional().default([]),
+ }))
+ .mutation(async ({ input }) => {
+ const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input;
+
+ const [updatedReview] = await db
+ .update(productReviews)
+ .set({
+ adminResponse,
+ adminResponseImages,
+ })
+ .where(eq(productReviews.id, reviewId))
+ .returning();
+
+ if (!updatedReview) {
+ throw new ApiError('Review not found', 404);
+ }
+
+ // Claim upload URLs
+ if (uploadUrls && uploadUrls.length > 0) {
+ // const { claimUploadUrl } = await import('../../lib/s3-client');
+ await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));
+ }
+
+ return { success: true, review: updatedReview };
+ }),
+
+ getGroups: protectedProcedure
+ .query(async ({ ctx }) => {
+ const groups = await db.query.productGroupInfo.findMany({
+ with: {
+ memberships: {
+ with: {
+ product: true,
+ },
+ },
+ },
+ orderBy: desc(productGroupInfo.createdAt),
+ });
+
+ return {
+ groups: groups.map(group => ({
+ ...group,
+ products: group.memberships.map(m => m.product),
+ productCount: group.memberships.length,
+ })),
+ };
+ }),
+
+ createGroup: protectedProcedure
+ .input(z.object({
+ group_name: z.string().min(1),
+ description: z.string().optional(),
+ product_ids: z.array(z.number()).default([]),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { group_name, description, product_ids } = input;
+
+ const [newGroup] = await db
+ .insert(productGroupInfo)
+ .values({
+ groupName: group_name,
+ description,
+ })
+ .returning();
+
+ if (product_ids.length > 0) {
+ const memberships = product_ids.map(productId => ({
+ productId,
+ groupId: newGroup.id,
+ }));
+
+ await db.insert(productGroupMembership).values(memberships);
+ }
+
+ return {
+ group: newGroup,
+ message: 'Group created successfully',
+ };
+ }),
+
+ updateGroup: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ group_name: z.string().optional(),
+ description: z.string().optional(),
+ product_ids: z.array(z.number()).optional(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { id, group_name, description, product_ids } = input;
+
+ const updateData: any = {};
+ if (group_name !== undefined) updateData.groupName = group_name;
+ if (description !== undefined) updateData.description = description;
+
+ const [updatedGroup] = await db
+ .update(productGroupInfo)
+ .set(updateData)
+ .where(eq(productGroupInfo.id, id))
+ .returning();
+
+ if (!updatedGroup) {
+ throw new ApiError('Group not found', 404);
+ }
+
+ if (product_ids !== undefined) {
+ // Delete existing memberships
+ await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));
+
+ // Insert new memberships
+ if (product_ids.length > 0) {
+ const memberships = product_ids.map(productId => ({
+ productId,
+ groupId: id,
+ }));
+
+ await db.insert(productGroupMembership).values(memberships);
+ }
+ }
+
+ return {
+ group: updatedGroup,
+ message: 'Group updated successfully',
+ };
+ }),
+
+ deleteGroup: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { id } = input;
+
+ // Delete memberships first
+ await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));
+
+ // Delete group
+ const [deletedGroup] = await db
+ .delete(productGroupInfo)
+ .where(eq(productGroupInfo.id, id))
+ .returning();
+
+ if (!deletedGroup) {
+ throw new ApiError('Group not found', 404);
+ }
+
+ return {
+ message: 'Group deleted successfully',
+ };
+ }),
+
+ updateProductPrices: protectedProcedure
+ .input(z.object({
+ updates: z.array(z.object({
+ productId: z.number(),
+ price: z.number().optional(),
+ marketPrice: z.number().nullable().optional(),
+ flashPrice: z.number().nullable().optional(),
+ isFlashAvailable: z.boolean().optional(),
+ })),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { updates } = input;
+
+ if (updates.length === 0) {
+ throw new ApiError('No updates provided', 400);
+ }
+
+ // Validate that all productIds exist
+ const productIds = updates.map(u => u.productId);
+ const existingProducts = await db.query.productInfo.findMany({
+ where: inArray(productInfo.id, productIds),
+ columns: { id: true },
+ });
+
+ const existingIds = new Set(existingProducts.map(p => p.id));
+ const invalidIds = productIds.filter(id => !existingIds.has(id));
+
+ if (invalidIds.length > 0) {
+ throw new ApiError(`Invalid product IDs: ${invalidIds.join(', ')}`, 400);
+ }
+
+ // Perform batch update
+ const updatePromises = updates.map(async (update) => {
+ const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update;
+ const updateData: any = {};
+ if (price !== undefined) updateData.price = price;
+ if (marketPrice !== undefined) updateData.marketPrice = marketPrice;
+ if (flashPrice !== undefined) updateData.flashPrice = flashPrice;
+ if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable;
+
+ return db
+ .update(productInfo)
+ .set(updateData)
+ .where(eq(productInfo.id, productId));
+ });
+
+ await Promise.all(updatePromises);
+
+ return {
+ message: `Updated prices for ${updates.length} product(s)`,
+ updatedCount: updates.length,
+ };
+ }),
+ });
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/slots.ts b/apps/backend/src/trpc/admin-apis/slots.ts
new file mode 100644
index 0000000..671c4c9
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/slots.ts
@@ -0,0 +1,548 @@
+import { router, protectedProcedure } from "../trpc-index";
+import { TRPCError } from "@trpc/server";
+import { z } from "zod";
+import { db } from "../../db/db_index";
+import { deliverySlotInfo, productSlots, productInfo, vendorSnippets } from "../../db/schema";
+import { eq, inArray, and, desc } from "drizzle-orm";
+import { ApiError } from "../../lib/api-error";
+import { appUrl } from "../../lib/env-exporter";
+import redisClient from "../../lib/redis-client";
+import { getSlotSequenceKey } from "../../lib/redisKeyGetters";
+
+interface CachedDeliverySequence {
+ [userId: string]: number[];
+}
+
+const cachedSequenceSchema = z.record(z.string(), z.array(z.number()));
+
+const createSlotSchema = z.object({
+ deliveryTime: z.string(),
+ freezeTime: z.string(),
+ isActive: z.boolean().optional(),
+ productIds: z.array(z.number()).optional(),
+ vendorSnippets: z.array(z.object({
+ name: z.string().min(1),
+ productIds: z.array(z.number().int().positive()).min(1),
+ validTill: z.string().optional(),
+ })).optional(),
+});
+
+const getSlotByIdSchema = z.object({
+ id: z.number(),
+});
+
+const updateSlotSchema = z.object({
+ id: z.number(),
+ deliveryTime: z.string(),
+ freezeTime: z.string(),
+ isActive: z.boolean().optional(),
+ productIds: z.array(z.number()).optional(),
+ vendorSnippets: z.array(z.object({
+ name: z.string().min(1),
+ productIds: z.array(z.number().int().positive()).min(1),
+ validTill: z.string().optional(),
+ })).optional(),
+});
+
+const deleteSlotSchema = z.object({
+ id: z.number(),
+});
+
+const getDeliverySequenceSchema = z.object({
+ id: z.string(),
+});
+
+const updateDeliverySequenceSchema = z.object({
+ id: z.number(),
+ // deliverySequence: z.array(z.number()),
+ deliverySequence: z.any(),
+});
+
+export const slotsRouter = router({
+ // Exact replica of GET /av/slots
+ getAll: protectedProcedure.query(async ({ ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+
+ const slots = await db.query.deliverySlotInfo
+ .findMany({
+ where: eq(deliverySlotInfo.isActive, true),
+ orderBy: desc(deliverySlotInfo.deliveryTime),
+ with: {
+ productSlots: {
+ with: {
+ product: {
+ columns: {
+ id: true,
+ name: true,
+ images: true,
+ },
+ },
+ },
+ },
+ },
+ })
+ .then((slots) =>
+ slots.map((slot) => ({
+ ...slot,
+ deliverySequence: slot.deliverySequence as number[],
+ products: slot.productSlots.map((ps) => ps.product),
+ }))
+ );
+
+ return {
+ slots,
+ count: slots.length,
+ };
+ }),
+
+ // Exact replica of POST /av/products/slots/product-ids
+ getSlotsProductIds: protectedProcedure
+ .input(z.object({ slotIds: z.array(z.number()) }))
+ .query(async ({ input, ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+
+ const { slotIds } = input;
+
+ if (!Array.isArray(slotIds)) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "slotIds must be an array",
+ });
+ }
+
+ if (slotIds.length === 0) {
+ return {};
+ }
+
+ // Fetch all associations for the requested slots
+ const associations = await db.query.productSlots.findMany({
+ where: inArray(productSlots.slotId, slotIds),
+ columns: {
+ slotId: true,
+ productId: true,
+ },
+ });
+
+ // Group by slotId
+ const result = associations.reduce((acc, assoc) => {
+ if (!acc[assoc.slotId]) {
+ acc[assoc.slotId] = [];
+ }
+ acc[assoc.slotId].push(assoc.productId);
+ return acc;
+ }, {} as Record);
+
+ // Ensure all requested slots have entries (even if empty)
+ slotIds.forEach((slotId) => {
+ if (!result[slotId]) {
+ result[slotId] = [];
+ }
+ });
+
+ return result;
+ }),
+
+ // Exact replica of PUT /av/products/slots/:slotId/products
+ updateSlotProducts: protectedProcedure
+ .input(
+ z.object({
+ slotId: z.number(),
+ productIds: z.array(z.number()),
+ })
+ )
+ .mutation(async ({ input, ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+
+ const { slotId, productIds } = input;
+
+ if (!Array.isArray(productIds)) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "productIds must be an array",
+ });
+ }
+
+ // Get current associations
+ const currentAssociations = await db.query.productSlots.findMany({
+ where: eq(productSlots.slotId, slotId),
+ columns: {
+ productId: true,
+ },
+ });
+
+ const currentProductIds = currentAssociations.map(
+ (assoc) => assoc.productId
+ );
+ const newProductIds = productIds;
+
+ // Find products to add and remove
+ const productsToAdd = newProductIds.filter(
+ (id) => !currentProductIds.includes(id)
+ );
+ const productsToRemove = currentProductIds.filter(
+ (id) => !newProductIds.includes(id)
+ );
+
+ // Remove associations for products that are no longer selected
+ if (productsToRemove.length > 0) {
+ await db
+ .delete(productSlots)
+ .where(
+ and(
+ eq(productSlots.slotId, slotId),
+ inArray(productSlots.productId, productsToRemove)
+ )
+ );
+ }
+
+ // Add associations for newly selected products
+ if (productsToAdd.length > 0) {
+ const newAssociations = productsToAdd.map((productId) => ({
+ productId,
+ slotId,
+ }));
+
+ await db.insert(productSlots).values(newAssociations);
+ }
+
+ return {
+ message: "Slot products updated successfully",
+ added: productsToAdd.length,
+ removed: productsToRemove.length,
+ };
+ }),
+
+ createSlot: protectedProcedure
+ .input(createSlotSchema)
+ .mutation(async ({ input, ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+
+ const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets } = input;
+
+ // Validate required fields
+ if (!deliveryTime || !freezeTime) {
+ throw new ApiError("Delivery time and orders close time are required", 400);
+ }
+
+ return await db.transaction(async (tx) => {
+ // Create slot
+ const [newSlot] = await tx
+ .insert(deliverySlotInfo)
+ .values({
+ deliveryTime: new Date(deliveryTime),
+ freezeTime: new Date(freezeTime),
+ isActive: isActive !== undefined ? isActive : true,
+ })
+ .returning();
+
+ // Insert product associations if provided
+ if (productIds && productIds.length > 0) {
+ const associations = productIds.map((productId) => ({
+ productId,
+ slotId: newSlot.id,
+ }));
+ await tx.insert(productSlots).values(associations);
+ }
+
+ // Create vendor snippets if provided
+ let createdSnippets: any[] = [];
+ if (snippets && snippets.length > 0) {
+ for (const snippet of snippets) {
+ // Validate products exist
+ const products = await tx.query.productInfo.findMany({
+ where: inArray(productInfo.id, snippet.productIds),
+ });
+ if (products.length !== snippet.productIds.length) {
+ throw new ApiError(`One or more invalid product IDs in snippet "${snippet.name}"`, 400);
+ }
+
+ // Check if snippet name already exists
+ const existingSnippet = await tx.query.vendorSnippets.findFirst({
+ where: eq(vendorSnippets.snippetCode, snippet.name),
+ });
+ if (existingSnippet) {
+ throw new ApiError(`Snippet name "${snippet.name}" already exists`, 400);
+ }
+
+ const [createdSnippet] = await tx.insert(vendorSnippets).values({
+ snippetCode: snippet.name,
+ slotId: newSlot.id,
+ productIds: snippet.productIds,
+ validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,
+ }).returning();
+
+ createdSnippets.push(createdSnippet);
+ }
+ }
+
+ return {
+ slot: newSlot,
+ createdSnippets,
+ message: "Slot created successfully",
+ };
+ });
+ }),
+
+ getSlots: protectedProcedure.query(async ({ ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+
+ const slots = await db.query.deliverySlotInfo.findMany({
+ where: eq(deliverySlotInfo.isActive, true),
+ });
+
+ return {
+ slots,
+ count: slots.length,
+ };
+ }),
+
+ getSlotById: protectedProcedure
+ .input(getSlotByIdSchema)
+ .query(async ({ input, ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+
+ const { id } = input;
+
+ const slot = await db.query.deliverySlotInfo.findFirst({
+ where: eq(deliverySlotInfo.id, id),
+ with: {
+ productSlots: {
+ with: {
+ product: {
+ columns: {
+ id: true,
+ name: true,
+ images: true,
+ },
+ },
+ },
+ },
+ vendorSnippets: true,
+ },
+ });
+
+ if (!slot) {
+ throw new ApiError("Slot not found", 404);
+ }
+
+ return {
+ slot: {
+ ...slot,
+ deliverySequence: slot.deliverySequence as number[],
+ products: slot.productSlots.map((ps) => ps.product),
+ vendorSnippets: slot.vendorSnippets?.map(snippet => ({
+ ...snippet,
+ accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`
+ })),
+ },
+ };
+ }),
+
+ updateSlot: protectedProcedure
+ .input(updateSlotSchema)
+ .mutation(async ({ input, ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+ try{
+ const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets } = input;
+
+ if (!deliveryTime || !freezeTime) {
+ throw new ApiError("Delivery time and orders close time are required", 400);
+ }
+
+ return await db.transaction(async (tx) => {
+ const [updatedSlot] = await tx
+ .update(deliverySlotInfo)
+ .set({
+ deliveryTime: new Date(deliveryTime),
+ freezeTime: new Date(freezeTime),
+ isActive: isActive !== undefined ? isActive : true,
+ })
+ .where(eq(deliverySlotInfo.id, id))
+ .returning();
+
+ if (!updatedSlot) {
+ throw new ApiError("Slot not found", 404);
+ }
+
+ // Update product associations
+ if (productIds !== undefined) {
+ // Delete existing associations
+ await tx.delete(productSlots).where(eq(productSlots.slotId, id));
+
+ // Insert new associations
+ if (productIds.length > 0) {
+ const associations = productIds.map((productId) => ({
+ productId,
+ slotId: id,
+ }));
+ await tx.insert(productSlots).values(associations);
+ }
+ }
+
+ // Create vendor snippets if provided
+ let createdSnippets: any[] = [];
+ if (snippets && snippets.length > 0) {
+ for (const snippet of snippets) {
+ // Validate products exist
+ const products = await tx.query.productInfo.findMany({
+ where: inArray(productInfo.id, snippet.productIds),
+ });
+ if (products.length !== snippet.productIds.length) {
+ throw new ApiError(`One or more invalid product IDs in snippet "${snippet.name}"`, 400);
+ }
+
+ // Check if snippet name already exists
+ const existingSnippet = await tx.query.vendorSnippets.findFirst({
+ where: eq(vendorSnippets.snippetCode, snippet.name),
+ });
+ if (existingSnippet) {
+ throw new ApiError(`Snippet name "${snippet.name}" already exists`, 400);
+ }
+
+ const [createdSnippet] = await tx.insert(vendorSnippets).values({
+ snippetCode: snippet.name,
+ slotId: id,
+ productIds: snippet.productIds,
+ validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,
+
+ }).returning();
+
+ createdSnippets.push(createdSnippet);
+ }
+ }
+
+ return {
+ slot: updatedSlot,
+ createdSnippets,
+ message: "Slot updated successfully",
+ };
+ });
+ }
+ catch(e) {
+ console.log(e)
+ throw new ApiError("Unable to Update Slot");
+ }
+ }),
+
+ deleteSlot: protectedProcedure
+ .input(deleteSlotSchema)
+ .mutation(async ({ input, ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+
+ const { id } = input;
+
+ const [deletedSlot] = await db
+ .update(deliverySlotInfo)
+ .set({ isActive: false })
+ .where(eq(deliverySlotInfo.id, id))
+ .returning();
+
+ if (!deletedSlot) {
+ throw new ApiError("Slot not found", 404);
+ }
+
+ return {
+ message: "Slot deleted successfully",
+ };
+ }),
+
+ getDeliverySequence: protectedProcedure
+ .input(getDeliverySequenceSchema)
+ .query(async ({ input, ctx }) => {
+
+ const { id } = input;
+ const slotId = parseInt(id);
+ const cacheKey = getSlotSequenceKey(slotId);
+
+ try {
+ const cached = await redisClient.get(cacheKey);
+ if (cached) {
+ const parsed = JSON.parse(cached);
+ const validated = cachedSequenceSchema.parse(parsed) as CachedDeliverySequence;
+ console.log('sending cached response')
+
+ return { deliverySequence: validated };
+ }
+ } catch (error) {
+ console.warn('Redis cache read/validation failed, falling back to DB:', error);
+ // Continue to DB fallback
+ }
+
+ // Fallback to DB
+ const slot = await db.query.deliverySlotInfo.findFirst({
+ where: eq(deliverySlotInfo.id, slotId),
+ });
+
+ if (!slot) {
+ throw new ApiError("Slot not found", 404);
+ }
+
+ const sequence = (slot.deliverySequence || {}) as CachedDeliverySequence;
+
+ // Cache the validated result
+ try {
+ const validated = cachedSequenceSchema.parse(sequence);
+ await redisClient.set(cacheKey, JSON.stringify(validated), 3600);
+ } catch (cacheError) {
+ console.warn('Redis cache write failed:', cacheError);
+ }
+
+ return { deliverySequence: sequence };
+ }),
+
+ updateDeliverySequence: protectedProcedure
+ .input(updateDeliverySequenceSchema)
+ .mutation(async ({ input, ctx }) => {
+ if (!ctx.staffUser?.id) {
+ throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" });
+ }
+
+ const { id, deliverySequence } = input;
+
+
+ console.log({deliverySequence})
+
+ const [updatedSlot] = await db
+ .update(deliverySlotInfo)
+ .set({ deliverySequence })
+ .where(eq(deliverySlotInfo.id, id))
+ .returning({
+ id: deliverySlotInfo.id,
+ deliverySequence: deliverySlotInfo.deliverySequence,
+ });
+
+ if (!updatedSlot) {
+ throw new ApiError("Slot not found", 404);
+ }
+
+ // Cache the updated sequence
+ const cacheKey = getSlotSequenceKey(id);
+ try {
+ const validated = cachedSequenceSchema.parse(deliverySequence);
+ await redisClient.set(cacheKey, JSON.stringify(validated), 3600);
+ } catch (cacheError) {
+ console.warn('Redis cache write failed:', cacheError);
+ }
+
+ return {
+ slot: updatedSlot,
+ message: "Delivery sequence updated successfully",
+ };
+ }),
+});
diff --git a/apps/backend/src/trpc/admin-apis/staff-user.ts b/apps/backend/src/trpc/admin-apis/staff-user.ts
new file mode 100644
index 0000000..c1d0bfd
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/staff-user.ts
@@ -0,0 +1,243 @@
+import { router, publicProcedure, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { staffUsers, staffRoles, users, userDetails, orders } from '../../db/schema';
+import { eq, or, ilike, and, lt, desc } from 'drizzle-orm';
+import bcrypt from 'bcryptjs';
+import jwt from 'jsonwebtoken';
+import { ApiError } from '../../lib/api-error';
+
+export const staffUserRouter = router({
+ login: publicProcedure
+ .input(z.object({
+ name: z.string(),
+ password: z.string(),
+ }))
+ .mutation(async ({ input }) => {
+ const { name, password } = input;
+
+ if (!name || !password) {
+ throw new ApiError('Name and password are required', 400);
+ }
+
+ const staff = await db.query.staffUsers.findFirst({
+ where: eq(staffUsers.name, name),
+ });
+
+ if (!staff) {
+ throw new ApiError('Invalid credentials', 401);
+ }
+
+ const isPasswordValid = await bcrypt.compare(password, staff.password);
+ if (!isPasswordValid) {
+ throw new ApiError('Invalid credentials', 401);
+ }
+
+ const token = jwt.sign(
+ { staffId: staff.id, name: staff.name },
+ process.env.JWT_SECRET || 'default-secret',
+ { expiresIn: '30d' }
+ );
+
+ return {
+ message: 'Login successful',
+ token,
+ staff: { id: staff.id, name: staff.name },
+ };
+ }),
+
+ getStaff: protectedProcedure
+ .query(async ({ ctx }) => {
+ const staff = await db.query.staffUsers.findMany({
+ columns: {
+ id: true,
+ name: true,
+ },
+ with: {
+ role: {
+ with: {
+ rolePermissions: {
+ with: {
+ permission: true,
+ },
+ },
+ },
+ },
+ },
+ });
+
+ // Transform the data to include role and permissions in a cleaner format
+ const transformedStaff = staff.map((user) => ({
+ id: user.id,
+ name: user.name,
+ role: user.role ? {
+ id: user.role.id,
+ name: user.role.roleName,
+ } : null,
+ permissions: user.role?.rolePermissions.map((rp) => ({
+ id: rp.permission.id,
+ name: rp.permission.permissionName,
+ })) || [],
+ }));
+
+ return {
+ staff: transformedStaff,
+ };
+ }),
+
+ getUsers: protectedProcedure
+ .input(z.object({
+ cursor: z.number().optional(),
+ limit: z.number().default(20),
+ search: z.string().optional(),
+ }))
+ .query(async ({ input }) => {
+ const { cursor, limit, search } = input;
+
+ let whereCondition = undefined;
+
+ if (search) {
+ whereCondition = or(
+ ilike(users.name, `%${search}%`),
+ ilike(users.email, `%${search}%`),
+ ilike(users.mobile, `%${search}%`)
+ );
+ }
+
+ if (cursor) {
+ const cursorCondition = lt(users.id, cursor);
+ whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition;
+ }
+
+ const allUsers = await db.query.users.findMany({
+ where: whereCondition,
+ with: {
+ userDetails: true,
+ },
+ orderBy: desc(users.id),
+ limit: limit + 1, // fetch one extra to check if there's more
+ });
+
+ const hasMore = allUsers.length > limit;
+ const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers;
+
+ const formattedUsers = usersToReturn.map(user => ({
+ id: user.id,
+ name: user.name,
+ email: user.email,
+ mobile: user.mobile,
+ image: user.userDetails?.profileImage || null,
+ }));
+
+ return {
+ users: formattedUsers,
+ nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined,
+ };
+ }),
+
+ getUserDetails: protectedProcedure
+ .input(z.object({ userId: z.number() }))
+ .query(async ({ input }) => {
+ const { userId } = input;
+
+ const user = await db.query.users.findFirst({
+ where: eq(users.id, userId),
+ with: {
+ userDetails: true,
+ orders: {
+ orderBy: desc(orders.createdAt),
+ limit: 1,
+ },
+ },
+ });
+
+ if (!user) {
+ throw new ApiError("User not found", 404);
+ }
+
+ const lastOrder = user.orders[0];
+
+ return {
+ id: user.id,
+ name: user.name,
+ email: user.email,
+ mobile: user.mobile,
+ addedOn: user.createdAt,
+ lastOrdered: lastOrder?.createdAt || null,
+ isSuspended: user.userDetails?.isSuspended || false,
+ };
+ }),
+
+ updateUserSuspension: protectedProcedure
+ .input(z.object({ userId: z.number(), isSuspended: z.boolean() }))
+ .mutation(async ({ input }) => {
+ const { userId, isSuspended } = input;
+
+ await db
+ .insert(userDetails)
+ .values({ userId, isSuspended })
+ .onConflictDoUpdate({
+ target: userDetails.userId,
+ set: { isSuspended },
+ });
+
+ return { success: true };
+ }),
+
+ createStaffUser: protectedProcedure
+ .input(z.object({
+ name: z.string().min(1, 'Name is required'),
+ password: z.string().min(6, 'Password must be at least 6 characters'),
+ roleId: z.number().int().positive('Role is required'),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { name, password, roleId } = input;
+
+ // Check if staff user already exists
+ const existingUser = await db.query.staffUsers.findFirst({
+ where: eq(staffUsers.name, name),
+ });
+
+ if (existingUser) {
+ throw new ApiError('Staff user with this name already exists', 409);
+ }
+
+ // Check if role exists
+ const role = await db.query.staffRoles.findFirst({
+ where: eq(staffRoles.id, roleId),
+ });
+
+ if (!role) {
+ throw new ApiError('Invalid role selected', 400);
+ }
+
+ // Hash password
+ const hashedPassword = await bcrypt.hash(password, 12);
+
+ // Create staff user
+ const [newUser] = await db.insert(staffUsers).values({
+ name: name.trim(),
+ password: hashedPassword,
+ staffRoleId: roleId,
+ }).returning();
+
+ return { success: true, user: { id: newUser.id, name: newUser.name } };
+ }),
+
+ getRoles: protectedProcedure
+ .query(async ({ ctx }) => {
+ const roles = await db.query.staffRoles.findMany({
+ columns: {
+ id: true,
+ roleName: true,
+ },
+ });
+
+ return {
+ roles: roles.map(role => ({
+ id: role.id,
+ name: role.roleName,
+ })),
+ };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/store.ts b/apps/backend/src/trpc/admin-apis/store.ts
new file mode 100644
index 0000000..94f3021
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/store.ts
@@ -0,0 +1,197 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { storeInfo, productInfo } from '../../db/schema';
+import { eq, inArray } from 'drizzle-orm';
+import { ApiError } from '../../lib/api-error';
+ import { extractKeyFromPresignedUrl, deleteImageUtil, generateSignedUrlFromS3Url } from '../../lib/s3-client';
+import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
+
+export const storeRouter = router({
+ getStores: protectedProcedure
+ .query(async ({ ctx }) => {
+ const stores = await db.query.storeInfo.findMany({
+ with: {
+ owner: true,
+ },
+ });
+
+ Promise.all(stores.map(async store => {
+ if(store.imageUrl)
+ store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl)
+ })).catch((e) => {
+ throw new ApiError("Unable to find store image urls")
+ }
+ )
+ return {
+ stores,
+ count: stores.length,
+ };
+ }),
+
+ getStoreById: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ }))
+ .query(async ({ input, ctx }) => {
+ const { id } = input;
+
+ const store = await db.query.storeInfo.findFirst({
+ where: eq(storeInfo.id, id),
+ with: {
+ owner: true,
+ },
+ });
+
+ if (!store) {
+ throw new ApiError("Store not found", 404);
+ }
+ store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl);
+ return {
+ store,
+ };
+ }),
+
+ createStore: protectedProcedure
+ .input(z.object({
+ name: z.string().min(1, "Name is required"),
+ description: z.string().optional(),
+ imageUrl: z.string().optional(),
+ owner: z.number().min(1, "Owner is required"),
+ products: z.array(z.number()).optional(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { name, description, imageUrl, owner, products } = input;
+
+ const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : undefined;
+
+ const [newStore] = await db
+ .insert(storeInfo)
+ .values({
+ name,
+ description,
+ imageUrl: imageKey,
+ owner,
+ })
+ .returning();
+
+ // Assign selected products to this store
+ if (products && products.length > 0) {
+ await db
+ .update(productInfo)
+ .set({ storeId: newStore.id })
+ .where(inArray(productInfo.id, products));
+ }
+
+ return {
+ store: newStore,
+ message: "Store created successfully",
+ };
+ }),
+
+ updateStore: protectedProcedure
+ .input(z.object({
+ id: z.number(),
+ name: z.string().min(1, "Name is required"),
+ description: z.string().optional(),
+ imageUrl: z.string().optional(),
+ owner: z.number().min(1, "Owner is required"),
+ products: z.array(z.number()).optional(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { id, name, description, imageUrl, owner, products } = input;
+
+ const existingStore = await db.query.storeInfo.findFirst({
+ where: eq(storeInfo.id, id),
+ });
+
+ if (!existingStore) {
+ throw new ApiError("Store not found", 404);
+ }
+
+ const oldImageKey = existingStore.imageUrl;
+ const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey;
+
+ // Delete old image only if:
+ // 1. New image provided and keys are different, OR
+ // 2. No new image but old exists (clearing the image)
+ if (oldImageKey && (
+ (newImageKey && newImageKey !== oldImageKey) ||
+ (!newImageKey)
+ )) {
+ try {
+ await deleteImageUtil({keys: [oldImageKey]});
+ } catch (error) {
+ console.error('Failed to delete old image:', error);
+ // Continue with update even if deletion fails
+ }
+ }
+
+ const [updatedStore] = await db
+ .update(storeInfo)
+ .set({
+ name,
+ description,
+ imageUrl: newImageKey,
+ owner,
+ })
+ .where(eq(storeInfo.id, id))
+ .returning();
+
+ if (!updatedStore) {
+ throw new ApiError("Store not found", 404);
+ }
+
+ // Update products if provided
+ if (products) {
+ // First, set storeId to null for products not in the list but currently assigned to this store
+ await db
+ .update(productInfo)
+ .set({ storeId: null })
+ .where(eq(productInfo.storeId, id));
+
+ // Then, assign the selected products to this store
+ if (products.length > 0) {
+ await db
+ .update(productInfo)
+ .set({ storeId: id })
+ .where(inArray(productInfo.id, products));
+ }
+ }
+
+ return {
+ store: updatedStore,
+ message: "Store updated successfully",
+ };
+ }),
+
+ deleteStore: protectedProcedure
+ .input(z.object({
+ storeId: z.number(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { storeId } = input;
+
+ return await db.transaction(async (tx) => {
+ // First, update all products of this store to set storeId to null
+ await tx
+ .update(productInfo)
+ .set({ storeId: null })
+ .where(eq(productInfo.storeId, storeId));
+
+ // Then delete the store
+ const [deletedStore] = await tx
+ .delete(storeInfo)
+ .where(eq(storeInfo.id, storeId))
+ .returning();
+
+ if (!deletedStore) {
+ throw new ApiError("Store not found", 404);
+ }
+
+ return {
+ message: "Store deleted successfully",
+ };
+ });
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/user.ts b/apps/backend/src/trpc/admin-apis/user.ts
new file mode 100644
index 0000000..74493ae
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/user.ts
@@ -0,0 +1,54 @@
+import { protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { users } from '../../db/schema';
+import { eq } from 'drizzle-orm';
+import { ApiError } from '../../lib/api-error';
+
+async function createUserByMobile(mobile: string): Promise {
+ // Clean mobile number (remove non-digits)
+ const cleanMobile = mobile.replace(/\D/g, '');
+
+ // Validate: exactly 10 digits
+ if (cleanMobile.length !== 10) {
+ throw new ApiError('Mobile number must be exactly 10 digits', 400);
+ }
+
+ // Check if user already exists
+ const [existingUser] = await db
+ .select()
+ .from(users)
+ .where(eq(users.mobile, cleanMobile))
+ .limit(1);
+
+ if (existingUser) {
+ throw new ApiError('User with this mobile number already exists', 409);
+ }
+
+ // Create user
+ const [newUser] = await db
+ .insert(users)
+ .values({
+ name: null,
+ email: null,
+ mobile: cleanMobile,
+ })
+ .returning();
+
+ return newUser;
+}
+
+export const userRouter = {
+ createUserByMobile: protectedProcedure
+ .input(z.object({
+ mobile: z.string().min(1, 'Mobile number is required'),
+ }))
+ .mutation(async ({ input }) => {
+ const newUser = await createUserByMobile(input.mobile);
+
+ return {
+ success: true,
+ data: newUser,
+ };
+ }),
+};
\ No newline at end of file
diff --git a/apps/backend/src/trpc/admin-apis/vendor-snippets.ts b/apps/backend/src/trpc/admin-apis/vendor-snippets.ts
new file mode 100644
index 0000000..b798c10
--- /dev/null
+++ b/apps/backend/src/trpc/admin-apis/vendor-snippets.ts
@@ -0,0 +1,375 @@
+import { router, publicProcedure, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { vendorSnippets, deliverySlotInfo, productInfo, orders, orderItems, users } from '../../db/schema';
+import { eq, and, inArray } from 'drizzle-orm';
+import { appUrl } from '../../lib/env-exporter';
+
+const createSnippetSchema = z.object({
+ snippetCode: z.string().min(1, "Snippet code is required"),
+ slotId: z.number().int().positive("Valid slot ID is required"),
+ productIds: z.array(z.number().int().positive()).min(1, "At least one product is required"),
+ validTill: z.string().optional(),
+});
+
+const updateSnippetSchema = z.object({
+ id: z.number().int().positive(),
+ updates: createSnippetSchema.partial().extend({
+ snippetCode: z.string().min(1).optional(),
+ productIds: z.array(z.number().int().positive()).optional(),
+ }),
+});
+
+export const vendorSnippetsRouter = router({
+ create: protectedProcedure
+ .input(createSnippetSchema)
+ .mutation(async ({ input, ctx }) => {
+ const { snippetCode, slotId, productIds, validTill } = input;
+
+ // Get staff user ID from auth middleware
+ const staffUserId = ctx.staffUser?.id;
+ if (!staffUserId) {
+ throw new Error("Unauthorized");
+ }
+
+ // Validate slot exists
+ const slot = await db.query.deliverySlotInfo.findFirst({
+ where: eq(deliverySlotInfo.id, slotId),
+ });
+ if (!slot) {
+ throw new Error("Invalid slot ID");
+ }
+
+ // Validate products exist
+ const products = await db.query.productInfo.findMany({
+ where: inArray(productInfo.id, productIds),
+ });
+ if (products.length !== productIds.length) {
+ throw new Error("One or more invalid product IDs");
+ }
+
+ // Check if snippet code already exists
+ const existingSnippet = await db.query.vendorSnippets.findFirst({
+ where: eq(vendorSnippets.snippetCode, snippetCode),
+ });
+ if (existingSnippet) {
+ throw new Error("Snippet code already exists");
+ }
+
+ const result = await db.insert(vendorSnippets).values({
+ snippetCode,
+ slotId,
+ productIds,
+ validTill: validTill ? new Date(validTill) : undefined,
+ }).returning();
+
+ return result[0];
+ }),
+
+ getAll: protectedProcedure
+ .query(async () => {
+ console.log('from the vendor snipptes methods')
+
+ try {
+
+ const result = await db.query.vendorSnippets.findMany({
+ with: {
+ slot: true,
+ },
+ orderBy: (vendorSnippets, { desc }) => [desc(vendorSnippets.createdAt)],
+ });
+ return result.map(snippet => ({
+ ...snippet,
+ accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`
+ }));
+ }
+ catch(e) {
+ console.log(e)
+ }
+ return [];
+ }),
+
+ getById: protectedProcedure
+ .input(z.object({ id: z.number().int().positive() }))
+ .query(async ({ input }) => {
+ const { id } = input;
+
+ const result = await db.query.vendorSnippets.findFirst({
+ where: eq(vendorSnippets.id, id),
+ with: {
+ slot: true,
+ },
+ });
+
+ if (!result) {
+ throw new Error("Vendor snippet not found");
+ }
+
+ return result;
+ }),
+
+ update: protectedProcedure
+ .input(updateSnippetSchema)
+ .mutation(async ({ input }) => {
+ const { id, updates } = input;
+
+ // Check if snippet exists
+ const existingSnippet = await db.query.vendorSnippets.findFirst({
+ where: eq(vendorSnippets.id, id),
+ });
+ if (!existingSnippet) {
+ throw new Error("Vendor snippet not found");
+ }
+
+ // Validate slot if being updated
+ if (updates.slotId) {
+ const slot = await db.query.deliverySlotInfo.findFirst({
+ where: eq(deliverySlotInfo.id, updates.slotId),
+ });
+ if (!slot) {
+ throw new Error("Invalid slot ID");
+ }
+ }
+
+ // Validate products if being updated
+ if (updates.productIds) {
+ const products = await db.query.productInfo.findMany({
+ where: inArray(productInfo.id, updates.productIds),
+ });
+ if (products.length !== updates.productIds.length) {
+ throw new Error("One or more invalid product IDs");
+ }
+ }
+
+ // Check snippet code uniqueness if being updated
+ if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {
+ const duplicateSnippet = await db.query.vendorSnippets.findFirst({
+ where: eq(vendorSnippets.snippetCode, updates.snippetCode),
+ });
+ if (duplicateSnippet) {
+ throw new Error("Snippet code already exists");
+ }
+ }
+
+ const updateData: any = { ...updates };
+ if (updates.validTill !== undefined) {
+ updateData.validTill = updates.validTill ? new Date(updates.validTill) : null;
+ }
+
+ const result = await db.update(vendorSnippets)
+ .set(updateData)
+ .where(eq(vendorSnippets.id, id))
+ .returning();
+
+ if (result.length === 0) {
+ throw new Error("Failed to update vendor snippet");
+ }
+
+ return result[0];
+ }),
+
+ delete: protectedProcedure
+ .input(z.object({ id: z.number().int().positive() }))
+ .mutation(async ({ input }) => {
+ const { id } = input;
+
+ const result = await db.delete(vendorSnippets)
+ .where(eq(vendorSnippets.id, id))
+ .returning();
+
+ if (result.length === 0) {
+ throw new Error("Vendor snippet not found");
+ }
+
+ return { message: "Vendor snippet deleted successfully" };
+ }),
+
+ getOrdersBySnippet: publicProcedure
+ .input(z.object({
+ snippetCode: z.string().min(1, "Snippet code is required")
+ }))
+ .query(async ({ input }) => {
+ const { snippetCode } = input;
+
+ // Find the snippet
+ const snippet = await db.query.vendorSnippets.findFirst({
+ where: eq(vendorSnippets.snippetCode, snippetCode),
+ });
+
+ if (!snippet) {
+ throw new Error("Vendor snippet not found");
+ }
+
+ // Check if snippet is still valid
+ if (snippet.validTill && new Date(snippet.validTill) < new Date()) {
+ throw new Error("Vendor snippet has expired");
+ }
+
+ // Query orders that match the snippet criteria
+ const matchingOrders = await db.query.orders.findMany({
+ where: and(
+ eq(orders.slotId, snippet.slotId),
+ // We'll filter by products in the application logic
+ ),
+ with: {
+ orderItems: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ },
+ },
+ },
+ },
+ user: true,
+ slot: true,
+ },
+ orderBy: (orders, { desc }) => [desc(orders.createdAt)],
+ });
+
+ // Filter orders that contain at least one of the snippet's products
+ const filteredOrders = matchingOrders.filter(order => {
+ const orderProductIds = order.orderItems.map(item => item.productId);
+ return snippet.productIds.some(productId => orderProductIds.includes(productId));
+ });
+
+ // Format the response
+ const formattedOrders = filteredOrders.map(order => {
+ // Filter orderItems to only include products attached to the snippet
+ const attachedOrderItems = order.orderItems.filter(item =>
+ snippet.productIds.includes(item.productId)
+ );
+
+ const products = attachedOrderItems.map(item => ({
+ orderItemId: item.id,
+ productId: item.productId,
+ productName: item.product.name,
+ quantity: parseFloat(item.quantity),
+ price: parseFloat(item.price.toString()),
+ unit: item.product.unit?.shortNotation || 'unit',
+ subtotal: parseFloat(item.price.toString()) * parseFloat(item.quantity),
+ is_packaged: item.is_packaged,
+ is_package_verified: item.is_package_verified,
+ }));
+
+ return {
+ orderId: `ORD${order.readableId.toString().padStart(3, '0')}`,
+ orderDate: order.createdAt.toISOString(),
+ customerName: order.user.name,
+ totalAmount: order.totalAmount,
+ slotInfo: order.slot ? {
+ time: order.slot.deliveryTime.toISOString(),
+ sequence: order.slot.deliverySequence,
+ } : null,
+ products,
+ matchedProducts: snippet.productIds, // All snippet products are considered matched
+ snippetCode: snippet.snippetCode,
+ };
+ });
+
+ return {
+ success: true,
+ data: formattedOrders,
+ snippet: {
+ id: snippet.id,
+ snippetCode: snippet.snippetCode,
+ slotId: snippet.slotId,
+ productIds: snippet.productIds,
+ validTill: snippet.validTill?.toISOString(),
+ createdAt: snippet.createdAt.toISOString(),
+ },
+ };
+ }),
+
+ getVendorOrders: protectedProcedure
+ .query(async () => {
+ const vendorOrders = await db.query.orders.findMany({
+ with: {
+ user: true,
+ orderItems: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ },
+ },
+ },
+ },
+ },
+ orderBy: (orders, { desc }) => [desc(orders.createdAt)],
+ });
+
+ return vendorOrders.map(order => ({
+ id: order.id,
+ status: 'pending', // Default status since orders table may not have status field
+ orderDate: order.createdAt.toISOString(),
+ totalQuantity: order.orderItems.reduce((sum, item) => sum + parseFloat(item.quantity || '0'), 0),
+ products: order.orderItems.map(item => ({
+ name: item.product.name,
+ quantity: parseFloat(item.quantity || '0'),
+ unit: item.product.unit?.shortNotation || 'unit',
+ })),
+ }));
+ }),
+
+ updateOrderItemPackaging: publicProcedure
+ .input(z.object({
+ orderItemId: z.number().int().positive("Valid order item ID required"),
+ is_packaged: z.boolean()
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { orderItemId, is_packaged } = input;
+
+ // Get staff user ID from auth middleware
+ // const staffUserId = ctx.staffUser?.id;
+ // if (!staffUserId) {
+ // throw new Error("Unauthorized");
+ // }
+
+ // Check if order item exists and get related data
+ const orderItem = await db.query.orderItems.findFirst({
+ where: eq(orderItems.id, orderItemId),
+ with: {
+ order: {
+ with: {
+ slot: true
+ }
+ }
+ }
+ });
+
+ if (!orderItem) {
+ throw new Error("Order item not found");
+ }
+
+ // Check if this order item belongs to a slot that has vendor snippets
+ // This ensures only order items from vendor-accessible orders can be updated
+ if (!orderItem.order.slotId) {
+ throw new Error("Order item not associated with a vendor slot");
+ }
+
+ const snippetExists = await db.query.vendorSnippets.findFirst({
+ where: eq(vendorSnippets.slotId, orderItem.order.slotId),
+ });
+
+ if (!snippetExists) {
+ throw new Error("No vendor snippet found for this order's slot");
+ }
+
+ // Update the is_packaged field
+ const result = await db.update(orderItems)
+ .set({ is_packaged })
+ .where(eq(orderItems.id, orderItemId))
+ .returning();
+
+ if (result.length === 0) {
+ throw new Error("Failed to update packaging status");
+ }
+
+ return {
+ success: true,
+ orderItemId,
+ is_packaged
+ };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/common-apis/common-trpc-index.ts b/apps/backend/src/trpc/common-apis/common-trpc-index.ts
new file mode 100644
index 0000000..6e828db
--- /dev/null
+++ b/apps/backend/src/trpc/common-apis/common-trpc-index.ts
@@ -0,0 +1,122 @@
+import { router, publicProcedure, protectedProcedure } from '../trpc-index';
+import { commonRouter } from './common';
+import { db } from '../../db/db_index';
+import { keyValStore, productInfo, storeInfo } from '../../db/schema';
+import * as turf from '@turf/turf';
+import { z } from 'zod';
+import { mbnrGeoJson } from '../../lib/mbnr-geojson';
+import { generateUploadUrl } from '../../lib/s3-client';
+import { ApiError } from '../../lib/api-error';
+import { getAllConstValues } from '../../lib/const-store';
+import { CONST_KEYS } from '../../lib/const-keys';
+
+const polygon = turf.polygon(mbnrGeoJson.features[0].geometry.coordinates);
+
+export const commonApiRouter = router({
+ product: commonRouter,
+ getStoresSummary: publicProcedure
+ .query(async () => {
+ const stores = await db.query.storeInfo.findMany({
+ columns: {
+ id: true,
+ name: true,
+ description: true,
+ },
+ });
+
+ return {
+ stores,
+ };
+ }),
+ checkLocationInPolygon: publicProcedure
+ .input(z.object({
+ lat: z.number().min(-90).max(90),
+ lng: z.number().min(-180).max(180),
+ }))
+ .query(({ input }) => {
+ try {
+ const { lat, lng } = input;
+ const point = turf.point([lng, lat]); // GeoJSON: [longitude, latitude]
+ const isInside = turf.booleanPointInPolygon(point, polygon);
+ return { isInside };
+ } catch (error) {
+ throw new Error('Invalid coordinates or polygon data');
+ }
+ }),
+
+ generateUploadUrls: protectedProcedure
+ .input(z.object({
+ contextString: z.enum(['review', 'product_info', 'store']),
+ mimeTypes: z.array(z.string()),
+ }))
+ .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {
+ const { contextString, mimeTypes } = input;
+
+ const uploadUrls: string[] = [];
+ const keys: string[] = [];
+
+ for (const mimeType of mimeTypes) {
+ // Generate key based on context and mime type
+ let folder: string;
+ if (contextString === 'review') {
+ folder = 'review-images';
+ } else if (contextString === 'product_info') {
+ folder = 'product-images';
+ } else if (contextString === 'store') {
+ folder = 'store-images';
+ } else if (contextString === 'review_response') {
+ folder = 'review-response-images';
+ } else {
+ folder = '';
+ }
+
+ const extension = mimeType === 'image/jpeg' ? '.jpg' :
+ mimeType === 'image/png' ? '.png' :
+ mimeType === 'image/gif' ? '.gif' : '.jpg';
+ const key = `${folder}/${Date.now()}${extension}`;
+
+ try {
+ const uploadUrl = await generateUploadUrl(key, mimeType);
+ uploadUrls.push(uploadUrl);
+ keys.push(key);
+
+ } catch (error) {
+ console.error('Error generating upload URL:', error);
+ throw new ApiError('Failed to generate upload URL', 500);
+ }
+ }
+ return { uploadUrls };
+ }),
+ healthCheck: publicProcedure
+ .query(async () => {
+ // Test DB connection by selecting product names
+ // await db.select({ name: productInfo.name }).from(productInfo).limit(1);
+ await db.select({ key: keyValStore.key }).from(keyValStore).limit(1);
+
+ return {
+ status: "ok",
+ };
+ }),
+ essentialConsts: publicProcedure
+ .query(async () => {
+ const consts = await getAllConstValues();
+
+ return {
+ freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200,
+ deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0,
+ flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500,
+ flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69,
+ popularItems: consts[CONST_KEYS.popularItems] ?? '5,3,2,4,1',
+ versionNum: consts[CONST_KEYS.versionNum] ?? '1.1.0',
+ playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? 'https://play.google.com/store/apps/details?id=in.freshyo.app',
+ appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? 'https://play.google.com/store/apps/details?id=in.freshyo.app',
+ webViewHtml: null,
+ isWebviewClosable: true,
+ isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true,
+ supportMobile: consts[CONST_KEYS.supportMobile] ?? '',
+ supportEmail: consts[CONST_KEYS.supportEmail] ?? '',
+ };
+ }),
+});
+
+export type CommonApiRouter = typeof commonApiRouter;
diff --git a/apps/backend/src/trpc/common-apis/common.ts b/apps/backend/src/trpc/common-apis/common.ts
new file mode 100644
index 0000000..651cf21
--- /dev/null
+++ b/apps/backend/src/trpc/common-apis/common.ts
@@ -0,0 +1,165 @@
+import { router, publicProcedure } from '../trpc-index';
+import { db } from '../../db/db_index';
+import { productInfo, units, productSlots, deliverySlotInfo, storeInfo, productTags, productTagInfo } from '../../db/schema';
+import { eq, gt, and, sql, inArray } from 'drizzle-orm';
+import { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url } from '../../lib/s3-client';
+import { z } from 'zod';
+
+export const getNextDeliveryDate = async (productId: number): Promise => {
+ const result = await db
+ .select({ deliveryTime: deliverySlotInfo.deliveryTime })
+ .from(productSlots)
+ .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))
+ .where(
+ and(
+ eq(productSlots.productId, productId),
+ eq(deliverySlotInfo.isActive, true),
+ gt(deliverySlotInfo.deliveryTime, sql`NOW()`)
+ )
+ )
+ .orderBy(deliverySlotInfo.deliveryTime)
+ .limit(1);
+
+
+ return result[0]?.deliveryTime || null;
+};
+
+
+
+
+
+export const commonRouter = router({
+ getDashboardTags: publicProcedure
+ .query(async () => {
+ const tags = await db
+ .select()
+ .from(productTagInfo)
+ .where(eq(productTagInfo.isDashboardTag, true))
+ .orderBy(productTagInfo.tagName);
+
+ // Generate signed URLs for tag images
+ const tagsWithSignedUrls = await Promise.all(
+ tags.map(async (tag) => ({
+ ...tag,
+ imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,
+ }))
+ );
+
+ return {
+ tags: tagsWithSignedUrls,
+ };
+ }),
+
+ getAllProductsSummary: publicProcedure
+ .input(z.object({
+ searchQuery: z.string().optional(),
+ tagId: z.number().optional()
+ }))
+ .query(async ({ input }) => {
+ const { searchQuery, tagId } = input;
+
+ let productIds: number[] | null = null;
+
+ // If tagId is provided, get products that have this tag
+ if (tagId) {
+ const taggedProducts = await db
+ .select({ productId: productTags.productId })
+ .from(productTags)
+ .where(eq(productTags.tagId, tagId));
+
+ productIds = taggedProducts.map(tp => tp.productId);
+ }
+
+ let whereConditions = [];
+
+ // Add tag filtering
+ if (productIds && productIds.length > 0) {
+ whereConditions.push(inArray(productInfo.id, productIds));
+ } else if (tagId) {
+ // If tagId was provided but no products found, return empty array
+ return {
+ products: [],
+ count: 0,
+ };
+ }
+
+ // Add search filtering
+ if (searchQuery) {
+ whereConditions.push(sql`LOWER(${productInfo.name}) LIKE LOWER(${ '%' + searchQuery + '%' })`);
+ }
+
+ // Filter out suspended products
+ whereConditions.push(eq(productInfo.isSuspended, false));
+
+ const whereCondition = whereConditions.length > 0 ? and(...whereConditions) : undefined;
+
+ const productsWithUnits = await db
+ .select({
+ id: productInfo.id,
+ name: productInfo.name,
+ shortDescription: productInfo.shortDescription,
+ price: productInfo.price,
+ marketPrice: productInfo.marketPrice,
+ images: productInfo.images,
+ isOutOfStock: productInfo.isOutOfStock,
+ unitShortNotation: units.shortNotation,
+ incrementStep: productInfo.incrementStep,
+ productQuantity: productInfo.productQuantity,
+ storeId: productInfo.storeId,
+ })
+ .from(productInfo)
+ .innerJoin(units, eq(productInfo.unitId, units.id))
+ .where(whereCondition);
+
+ // Generate signed URLs for product images
+ const formattedProducts = await Promise.all(
+ productsWithUnits.map(async (product) => {
+ const nextDeliveryDate = await getNextDeliveryDate(product.id);
+ return {
+ id: product.id,
+ name: product.name,
+ shortDescription: product.shortDescription,
+ price: product.price,
+ marketPrice: product.marketPrice,
+ unit: product.unitShortNotation,
+ incrementStep: product.incrementStep,
+ productQuantity: product.productQuantity,
+ storeId: product.storeId,
+ isOutOfStock: product.isOutOfStock,
+ nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,
+ images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),
+ };
+ })
+ );
+
+ return {
+ products: formattedProducts,
+ count: formattedProducts.length,
+ };
+ }),
+
+ getStoresSummary: publicProcedure
+ .query(async () => {
+ const stores = await db.query.storeInfo.findMany({
+ columns: {
+ id: true,
+ name: true,
+ description: true,
+ },
+ });
+
+ return {
+ stores,
+ };
+ }),
+
+ healthCheck: publicProcedure
+ .query(async () => {
+ // Test DB connection by selecting product names
+ await db.select({ name: productInfo.name }).from(productInfo).limit(1);
+
+ return {
+ status: "ok",
+ };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/router.ts b/apps/backend/src/trpc/router.ts
new file mode 100644
index 0000000..e6471b5
--- /dev/null
+++ b/apps/backend/src/trpc/router.ts
@@ -0,0 +1,20 @@
+import { router, publicProcedure } from './trpc-index';
+import { z } from 'zod';
+import { adminRouter } from './admin-apis/admin-trpc-index';
+import { userRouter } from './user-apis/user-trpc-index';
+import { commonApiRouter } from './common-apis/common-trpc-index';
+
+// Create the main app router
+export const appRouter = router({
+ hello: publicProcedure
+ .input(z.object({ name: z.string() }))
+ .query(({ input }) => {
+ return { greeting: `Hello ${input.name}!` };
+ }),
+ admin: adminRouter,
+ user: userRouter,
+ common: commonApiRouter,
+});
+
+// Export type definition of API
+export type AppRouter = typeof appRouter;
\ No newline at end of file
diff --git a/apps/backend/src/trpc/trpc-index.ts b/apps/backend/src/trpc/trpc-index.ts
new file mode 100644
index 0000000..85c5457
--- /dev/null
+++ b/apps/backend/src/trpc/trpc-index.ts
@@ -0,0 +1,73 @@
+import { initTRPC, TRPCError } from '@trpc/server';
+import { type CreateExpressContextOptions } from '@trpc/server/adapters/express';
+
+export interface Context {
+ req: CreateExpressContextOptions['req'];
+ res: CreateExpressContextOptions['res'];
+ user?: any;
+ staffUser?: {
+ id: number;
+ name: string;
+ } | null;
+}
+
+const t = initTRPC.context().create();
+
+export const middleware = t.middleware;
+export const router = t.router;
+export { TRPCError };
+
+// Global error logger middleware
+const errorLoggerMiddleware = middleware(async ({ path, type, next, ctx }) => {
+ const start = Date.now();
+
+ try {
+ const result = await next();
+ const duration = Date.now() - start;
+
+ // Log successful operations in development
+ if (process.env.NODE_ENV === 'development') {
+ console.log(`✅ ${type} ${path} - ${duration}ms`);
+ }
+
+ return result;
+ } catch (error) {
+ const duration = Date.now() - start;
+ const err = error as any; // Type assertion for error object
+
+ // Comprehensive error logging
+ console.error('🚨 tRPC Error:', {
+ timestamp: new Date().toISOString(),
+ path,
+ type,
+ duration: `${duration}ms`,
+ userId: ctx?.user?.userId || ctx?.staffUser?.id || 'anonymous',
+ error: {
+ name: err.name,
+ message: err.message,
+ code: err.code,
+ stack: err.stack,
+ },
+ // Add SQL-specific details if available
+ ...(err.code && { sqlCode: err.code }),
+ ...(err.meta && { sqlMeta: err.meta }),
+ ...(err.sql && { sql: err.sql }),
+ });
+
+ throw error; // Re-throw to maintain error flow
+ }
+});
+
+export const publicProcedure = t.procedure.use(errorLoggerMiddleware);
+export const protectedProcedure = t.procedure.use(errorLoggerMiddleware).use(
+ middleware(async ({ ctx, next }) => {
+
+ if ((!ctx.user && !ctx.staffUser)) {
+ throw new TRPCError({ code: 'UNAUTHORIZED' });
+ }
+ return next();
+ })
+);
+
+export const createCallerFactory = t.createCallerFactory;
+export const createTRPCRouter = t.router;
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/address.ts b/apps/backend/src/trpc/user-apis/address.ts
new file mode 100644
index 0000000..71a0553
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/address.ts
@@ -0,0 +1,154 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { addresses, orders, orderStatus, deliverySlotInfo } from '../../db/schema';
+import { eq, and, gte } from 'drizzle-orm';
+import dayjs from 'dayjs';
+
+export const addressRouter = router({
+ getDefaultAddress: protectedProcedure
+ .query(async ({ ctx }) => {
+ const userId = ctx.user.userId;
+
+ const [defaultAddress] = await db
+ .select()
+ .from(addresses)
+ .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))
+ .limit(1);
+
+ return { success: true, data: defaultAddress || null };
+ }),
+
+ getUserAddresses: protectedProcedure
+ .query(async ({ ctx }) => {
+ const userId = ctx.user.userId;
+ const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId));
+ return { success: true, data: userAddresses };
+ }),
+
+ createAddress: protectedProcedure
+ .input(z.object({
+ name: z.string().min(1, 'Name is required'),
+ phone: z.string().min(1, 'Phone is required'),
+ addressLine1: z.string().min(1, 'Address line 1 is required'),
+ addressLine2: z.string().optional(),
+ city: z.string().min(1, 'City is required'),
+ state: z.string().min(1, 'State is required'),
+ pincode: z.string().min(1, 'Pincode is required'),
+ isDefault: z.boolean().optional(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault } = input;
+
+ // Validate required fields
+ if (!name || !phone || !addressLine1 || !city || !state || !pincode) {
+ throw new Error('Missing required fields');
+ }
+
+ // If setting as default, unset other defaults
+ if (isDefault) {
+ await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));
+ }
+
+ const [newAddress] = await db.insert(addresses).values({
+ userId,
+ name,
+ phone,
+ addressLine1,
+ addressLine2,
+ city,
+ state,
+ pincode,
+ isDefault: isDefault || false,
+ }).returning();
+
+ return { success: true, data: newAddress };
+ }),
+
+ updateAddress: protectedProcedure
+ .input(z.object({
+ id: z.number().int().positive(),
+ name: z.string().min(1, 'Name is required'),
+ phone: z.string().min(1, 'Phone is required'),
+ addressLine1: z.string().min(1, 'Address line 1 is required'),
+ addressLine2: z.string().optional(),
+ city: z.string().min(1, 'City is required'),
+ state: z.string().min(1, 'State is required'),
+ pincode: z.string().min(1, 'Pincode is required'),
+ isDefault: z.boolean().optional(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault } = input;
+
+ // Check if address exists and belongs to user
+ const existingAddress = await db.select().from(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).limit(1);
+ if (existingAddress.length === 0) {
+ throw new Error('Address not found');
+ }
+
+ // If setting as default, unset other defaults
+ if (isDefault) {
+ await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));
+ }
+
+ const [updatedAddress] = await db.update(addresses).set({
+ name,
+ phone,
+ addressLine1,
+ addressLine2,
+ city,
+ state,
+ pincode,
+ isDefault: isDefault || false,
+ }).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).returning();
+
+ return { success: true, data: updatedAddress };
+ }),
+
+ deleteAddress: protectedProcedure
+ .input(z.object({
+ id: z.number().int().positive(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { id } = input;
+
+ // Check if address exists and belongs to user
+ const existingAddress = await db.select().from(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).limit(1);
+ if (existingAddress.length === 0) {
+ throw new Error('Address not found or does not belong to user');
+ }
+
+ // Check if address is attached to any ongoing orders using joins
+ const ongoingOrders = await db.select({
+ order: orders,
+ status: orderStatus,
+ slot: deliverySlotInfo
+ })
+ .from(orders)
+ .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))
+ .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))
+ .where(and(
+ eq(orders.addressId, id),
+ eq(orderStatus.isCancelled, false),
+ gte(deliverySlotInfo.deliveryTime, new Date())
+ ))
+ .limit(1);
+
+ if (ongoingOrders.length > 0) {
+ throw new Error('Address is attached to an ongoing order. Please cancel the order first.');
+ }
+
+ // Prevent deletion of default address
+ if (existingAddress[0].isDefault) {
+ throw new Error('Cannot delete default address. Please set another address as default first.');
+ }
+
+ // Delete the address
+ await db.delete(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId)));
+
+ return { success: true, message: 'Address deleted successfully' };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/auth.ts b/apps/backend/src/trpc/user-apis/auth.ts
new file mode 100644
index 0000000..40b04a5
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/auth.ts
@@ -0,0 +1,463 @@
+import { router, publicProcedure, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import bcrypt from 'bcryptjs';
+import jwt from 'jsonwebtoken';
+import { eq } from 'drizzle-orm';
+import { db } from '../../db/db_index';
+import {
+ users, userCreds, userDetails, addresses, cartItems, complaints,
+ couponApplicableUsers, couponUsage, notifCreds, notifications,
+ orderItems, orderStatus, orders, payments, refunds,
+ productReviews, reservedCoupons
+} from '../../db/schema';
+import { generateSignedUrlFromS3Url } from '../../lib/s3-client';
+import { ApiError } from '../../lib/api-error';
+import catchAsync from '../../lib/catch-async';
+import { jwtSecret } from 'src/lib/env-exporter';
+import { sendOtp, verifyOtpUtil, getOtpCreds } from '../../lib/otp-utils';
+
+interface LoginRequest {
+ identifier: string; // email or mobile
+ password: string;
+}
+
+interface RegisterRequest {
+ name: string;
+ email: string;
+ mobile: string;
+ password: string;
+}
+
+interface AuthResponse {
+ token: string;
+ user: {
+ id: number;
+ name?: string | null;
+ email: string | null;
+ mobile: string | null;
+ createdAt: string;
+ profileImage: string | null;
+ bio?: string | null;
+ dateOfBirth?: string | null;
+ gender?: string | null;
+ occupation?: string | null;
+ };
+}
+
+const generateToken = (userId: number): string => {
+ const secret = jwtSecret;
+ if (!secret) {
+ throw new ApiError('JWT secret not configured', 500);
+ }
+
+ return jwt.sign({ userId }, secret, { expiresIn: '7d' });
+};
+
+
+
+export const authRouter = router({
+ login: publicProcedure
+ .input(z.object({
+ identifier: z.string().min(1, 'Email/mobile is required'),
+ password: z.string().min(1, 'Password is required'),
+ }))
+ .mutation(async ({ input }) => {
+ const { identifier, password }: LoginRequest = input;
+
+ if (!identifier || !password) {
+ throw new ApiError('Email/mobile and password are required', 400);
+ }
+
+ // Find user by email or mobile
+ const [user] = await db
+ .select()
+ .from(users)
+ .where(eq(users.email, identifier.toLowerCase()))
+ .limit(1);
+
+ let foundUser = user;
+
+ if (!foundUser) {
+ // Try mobile if email didn't work
+ const [userByMobile] = await db
+ .select()
+ .from(users)
+ .where(eq(users.mobile, identifier))
+ .limit(1);
+ foundUser = userByMobile;
+ }
+
+ if (!foundUser) {
+ throw new ApiError('Invalid credentials', 401);
+ }
+
+ // Get user credentials
+ const [userCredentials] = await db
+ .select()
+ .from(userCreds)
+ .where(eq(userCreds.userId, foundUser.id))
+ .limit(1);
+
+ if (!userCredentials) {
+ throw new ApiError('Account setup incomplete. Please contact support.', 401);
+ }
+
+ // Get user details for profile image
+ const [userDetail] = await db
+ .select()
+ .from(userDetails)
+ .where(eq(userDetails.userId, foundUser.id))
+ .limit(1);
+
+ // Generate signed URL for profile image if it exists
+ const profileImageSignedUrl = userDetail?.profileImage
+ ? await generateSignedUrlFromS3Url(userDetail.profileImage)
+ : null;
+
+ // Verify password
+ const isPasswordValid = await bcrypt.compare(password, userCredentials.userPassword);
+ if (!isPasswordValid) {
+ throw new ApiError('Invalid credentials', 401);
+ }
+
+ // Check if user is suspended
+ if (userDetail?.isSuspended) {
+ throw new ApiError('Account suspended', 403);
+ }
+
+ const token = generateToken(foundUser.id);
+
+ const response: AuthResponse = {
+ token,
+ user: {
+ id: foundUser.id,
+ name: foundUser.name,
+ email: foundUser.email,
+ mobile: foundUser.mobile,
+ createdAt: foundUser.createdAt.toISOString(),
+ profileImage: profileImageSignedUrl,
+ bio: userDetail?.bio || null,
+ dateOfBirth: userDetail?.dateOfBirth || null,
+ gender: userDetail?.gender || null,
+ occupation: userDetail?.occupation || null,
+ },
+ };
+
+ return {
+ success: true,
+ data: response,
+ };
+ }),
+
+ register: publicProcedure
+ .input(z.object({
+ name: z.string().min(1, 'Name is required'),
+ email: z.string().email('Invalid email format'),
+ mobile: z.string().min(1, 'Mobile is required'),
+ password: z.string().min(1, 'Password is required'),
+ }))
+ .mutation(async ({ input }) => {
+ const { name, email, mobile, password }: RegisterRequest = input;
+
+ if (!name || !email || !mobile || !password) {
+ throw new ApiError('All fields are required', 400);
+ }
+
+ // Validate email format
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
+ if (!emailRegex.test(email)) {
+ throw new ApiError('Invalid email format', 400);
+ }
+
+ // Validate mobile format (Indian mobile numbers)
+ const cleanMobile = mobile.replace(/\D/g, '');
+ if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {
+ throw new ApiError('Invalid mobile number', 400);
+ }
+
+ // Check if email already exists
+ const [existingEmail] = await db
+ .select()
+ .from(users)
+ .where(eq(users.email, email.toLowerCase()))
+ .limit(1);
+
+ if (existingEmail) {
+ throw new ApiError('Email already registered', 409);
+ }
+
+ // Check if mobile already exists
+ const [existingMobile] = await db
+ .select()
+ .from(users)
+ .where(eq(users.mobile, cleanMobile))
+ .limit(1);
+
+ if (existingMobile) {
+ throw new ApiError('Mobile number already registered', 409);
+ }
+
+ // Hash password
+ const hashedPassword = await bcrypt.hash(password, 12);
+
+ // Create user and credentials in a transaction
+ const newUser = await db.transaction(async (tx) => {
+ // Create user
+ const [user] = await tx
+ .insert(users)
+ .values({
+ name: name.trim(),
+ email: email.toLowerCase().trim(),
+ mobile: cleanMobile,
+ })
+ .returning();
+
+ // Create user credentials
+ await tx
+ .insert(userCreds)
+ .values({
+ userId: user.id,
+ userPassword: hashedPassword,
+ });
+
+ return user;
+ });
+
+ const token = generateToken(newUser.id);
+
+ const response: AuthResponse = {
+ token,
+ user: {
+ id: newUser.id,
+ name: newUser.name,
+ email: newUser.email,
+ mobile: newUser.mobile,
+ createdAt: newUser.createdAt.toISOString(),
+ profileImage: null,
+ },
+ };
+
+ return {
+ success: true,
+ data: response,
+ };
+ }),
+
+ sendOtp: publicProcedure
+ .input(z.object({
+ mobile: z.string(),
+ }))
+ .mutation(async ({ input }) => {
+
+ return await sendOtp(input.mobile);
+ }),
+
+ verifyOtp: publicProcedure
+ .input(z.object({
+ mobile: z.string(),
+ otp: z.string(),
+ }))
+ .mutation(async ({ input }) => {
+ const verificationId = getOtpCreds(input.mobile);
+ if (!verificationId) {
+ throw new ApiError("OTP not sent or expired", 400);
+ }
+ const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId);
+
+ if (!isVerified) {
+ throw new ApiError("Invalid OTP", 400);
+ }
+
+ // Find user
+ let user = await db.query.users.findFirst({
+ where: eq(users.mobile, input.mobile),
+ });
+
+ // If user doesn't exist, create one
+ if (!user) {
+ const [newUser] = await db
+ .insert(users)
+ .values({
+ name: null,
+ email: null,
+ mobile: input.mobile,
+ })
+ .returning();
+ user = newUser;
+ }
+
+ // Check if user is suspended (only if userDetails exists)
+ const [userDetail] = await db
+ .select()
+ .from(userDetails)
+ .where(eq(userDetails.userId, user.id))
+ .limit(1);
+
+ if (userDetail?.isSuspended) {
+ throw new ApiError('Account suspended', 403);
+ }
+
+ // Generate JWT
+ const token = generateToken(user.id);
+
+ return {
+ success: true,
+ token,
+ user: {
+ id: user.id,
+ name: user.name,
+ email: user.email,
+ mobile: user.mobile,
+ createdAt: user.createdAt.toISOString(),
+ profileImage: null,
+ },
+ };
+ }),
+
+ updatePassword: protectedProcedure
+ .input(z.object({
+ password: z.string().min(6, 'Password must be at least 6 characters'),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ if (!userId) {
+ throw new ApiError('User not authenticated', 401);
+ }
+
+ const hashedPassword = await bcrypt.hash(input.password, 10);
+
+ // Insert if not exists, then update if exists
+ try {
+ await db.insert(userCreds).values({
+ userId: userId,
+ userPassword: hashedPassword,
+ });
+ // Insert succeeded - new credentials created
+ } catch (error: any) {
+ // Insert failed - check if it's a unique constraint violation
+ if (error.code === '23505') { // PostgreSQL unique constraint violation
+ // Update existing credentials
+ await db.update(userCreds).set({
+ userPassword: hashedPassword,
+ }).where(eq(userCreds.userId, userId));
+ } else {
+ // Re-throw if it's a different error
+ throw error;
+ }
+ }
+
+ return { success: true, message: 'Password updated successfully' };
+ }),
+
+ getProfile: protectedProcedure
+ .query(async ({ ctx }) => {
+ const userId = ctx.user.userId;
+
+ if (!userId) {
+ throw new ApiError('User not authenticated', 401);
+ }
+
+ const [user] = await db
+ .select()
+ .from(users)
+ .where(eq(users.id, userId))
+ .limit(1);
+
+ if (!user) {
+ throw new ApiError('User not found', 404);
+ }
+
+ return {
+ success: true,
+ data: {
+ id: user.id,
+ name: user.name,
+ email: user.email,
+ mobile: user.mobile,
+ },
+ };
+ }),
+
+ deleteAccount: protectedProcedure
+ .input(z.object({
+ mobile: z.string().min(10, 'Mobile number is required'),
+ }))
+ .mutation(async ({ ctx, input }) => {
+ const userId = ctx.user.userId;
+ const { mobile } = input;
+
+ if (!userId) {
+ throw new ApiError('User not authenticated', 401);
+ }
+
+ // Double-check: verify user exists and is the authenticated user
+ const existingUser = await db.query.users.findFirst({
+ where: eq(users.id, userId),
+ columns: { id: true, mobile: true },
+ });
+
+ if (!existingUser) {
+ throw new ApiError('User not found', 404);
+ }
+
+ // Additional verification: ensure we're not deleting someone else's data
+ // The JWT token should already ensure this, but double-checking
+ if (existingUser.id !== userId) {
+ throw new ApiError('Unauthorized: Cannot delete another user\'s account', 403);
+ }
+
+ // Verify mobile number matches user's registered mobile
+ const cleanInputMobile = mobile.replace(/\D/g, '');
+ const cleanUserMobile = existingUser.mobile?.replace(/\D/g, '');
+
+ if (cleanInputMobile !== cleanUserMobile) {
+ throw new ApiError('Mobile number does not match your registered number', 400);
+ }
+
+ // Use transaction for atomic deletion
+ await db.transaction(async (tx) => {
+ // Phase 1: Direct references (safe to delete first)
+ await tx.delete(notifCreds).where(eq(notifCreds.userId, userId));
+ await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId));
+ await tx.delete(couponUsage).where(eq(couponUsage.userId, userId));
+ await tx.delete(complaints).where(eq(complaints.userId, userId));
+ await tx.delete(cartItems).where(eq(cartItems.userId, userId));
+ await tx.delete(notifications).where(eq(notifications.userId, userId));
+ await tx.delete(productReviews).where(eq(productReviews.userId, userId));
+
+ // Update reserved coupons (set redeemedBy to null)
+ await tx.update(reservedCoupons)
+ .set({ redeemedBy: null })
+ .where(eq(reservedCoupons.redeemedBy, userId));
+
+ // Phase 2: Order dependencies
+ const userOrders = await tx
+ .select({ id: orders.id })
+ .from(orders)
+ .where(eq(orders.userId, userId));
+
+ for (const order of userOrders) {
+ await tx.delete(orderItems).where(eq(orderItems.orderId, order.id));
+ await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id));
+ await tx.delete(payments).where(eq(payments.orderId, order.id));
+ await tx.delete(refunds).where(eq(refunds.orderId, order.id));
+ // Additional coupon usage entries linked to specific orders
+ await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id));
+ await tx.delete(complaints).where(eq(complaints.orderId, order.id));
+ }
+
+ // Delete orders
+ await tx.delete(orders).where(eq(orders.userId, userId));
+
+ // Phase 3: Addresses (now safe since orders are deleted)
+ await tx.delete(addresses).where(eq(addresses.userId, userId));
+
+ // Phase 4: Core user data
+ await tx.delete(userDetails).where(eq(userDetails.userId, userId));
+ await tx.delete(userCreds).where(eq(userCreds.userId, userId));
+ await tx.delete(users).where(eq(users.id, userId));
+ });
+
+ return { success: true, message: 'Account deleted successfully' };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/banners.ts b/apps/backend/src/trpc/user-apis/banners.ts
new file mode 100644
index 0000000..beabbee
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/banners.ts
@@ -0,0 +1,37 @@
+import { db } from '../../db/db_index';
+import { homeBanners } from '../../db/schema';
+import { publicProcedure, router } from '../trpc-index';
+import { generateSignedUrlFromS3Url } from '../../lib/s3-client';
+import { isNotNull, asc } from 'drizzle-orm';
+
+export const bannerRouter = router({
+ getBanners: publicProcedure
+ .query(async () => {
+ const banners = await db.query.homeBanners.findMany({
+ where: isNotNull(homeBanners.serialNum), // Only show assigned banners
+ orderBy: asc(homeBanners.serialNum), // Order by slot number 1-4
+ });
+
+ // Convert S3 keys to signed URLs for client
+ const bannersWithSignedUrls = await Promise.all(
+ banners.map(async (banner) => {
+ try {
+ return {
+ ...banner,
+ imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl,
+ };
+ } catch (error) {
+ console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);
+ return {
+ ...banner,
+ imageUrl: banner.imageUrl, // Keep original on error
+ };
+ }
+ })
+ );
+
+ return {
+ banners: bannersWithSignedUrls,
+ };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/cart.ts b/apps/backend/src/trpc/user-apis/cart.ts
new file mode 100644
index 0000000..c4a8952
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/cart.ts
@@ -0,0 +1,227 @@
+import { router, protectedProcedure, publicProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { cartItems, productInfo, units, productSlots, deliverySlotInfo } from '../../db/schema';
+import { eq, and, sql, inArray, gt } from 'drizzle-orm';
+import { ApiError } from '../../lib/api-error';
+import { generateSignedUrlsFromS3Urls } from '../../lib/s3-client';
+
+interface CartResponse {
+ items: any[];
+ totalItems: number;
+ totalAmount: number;
+}
+
+const getCartData = async (userId: number): Promise => {
+ const cartItemsWithProducts = await db
+ .select({
+ cartId: cartItems.id,
+ productId: productInfo.id,
+ productName: productInfo.name,
+ productPrice: productInfo.price,
+ productImages: productInfo.images,
+ productQuantity: productInfo.productQuantity,
+ isOutOfStock: productInfo.isOutOfStock,
+ unitShortNotation: units.shortNotation,
+ quantity: cartItems.quantity,
+ addedAt: cartItems.addedAt,
+ })
+ .from(cartItems)
+ .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))
+ .innerJoin(units, eq(productInfo.unitId, units.id))
+ .where(eq(cartItems.userId, userId));
+
+ // Generate signed URLs for images
+ const cartWithSignedUrls = await Promise.all(
+ cartItemsWithProducts.map(async (item) => ({
+ id: item.cartId,
+ productId: item.productId,
+ quantity: parseFloat(item.quantity),
+ addedAt: item.addedAt,
+ product: {
+ id: item.productId,
+ name: item.productName,
+ price: item.productPrice,
+ productQuantity: item.productQuantity,
+ unit: item.unitShortNotation,
+ isOutOfStock: item.isOutOfStock,
+ images: await generateSignedUrlsFromS3Urls((item.productImages as string[]) || []),
+ },
+ subtotal: parseFloat(item.productPrice.toString()) * parseFloat(item.quantity),
+ }))
+ );
+
+ const totalAmount = cartWithSignedUrls.reduce((sum, item) => sum + item.subtotal, 0);
+
+ return {
+ items: cartWithSignedUrls,
+ totalItems: cartWithSignedUrls.length,
+ totalAmount,
+ };
+};
+
+export const cartRouter = router({
+ getCart: protectedProcedure
+ .query(async ({ ctx }): Promise => {
+ const userId = ctx.user.userId;
+ return await getCartData(userId);
+ }),
+
+ addToCart: protectedProcedure
+ .input(z.object({
+ productId: z.number().int().positive(),
+ quantity: z.number().int().positive(),
+ }))
+ .mutation(async ({ input, ctx }): Promise => {
+ const userId = ctx.user.userId;
+ const { productId, quantity } = input;
+
+ // Validate input
+ if (!productId || !quantity || quantity <= 0) {
+ throw new ApiError("Product ID and positive quantity required", 400);
+ }
+
+ // Check if product exists
+ const product = await db.query.productInfo.findFirst({
+ where: eq(productInfo.id, productId),
+ });
+
+ if (!product) {
+ throw new ApiError("Product not found", 404);
+ }
+
+ // Check if item already exists in cart
+ const existingItem = await db.query.cartItems.findFirst({
+ where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),
+ });
+
+ if (existingItem) {
+ // Update quantity
+ await db.update(cartItems)
+ .set({
+ quantity: sql`${cartItems.quantity} + ${quantity}`,
+ })
+ .where(eq(cartItems.id, existingItem.id));
+ } else {
+ // Insert new item
+ await db.insert(cartItems).values({
+ userId,
+ productId,
+ quantity: quantity.toString(),
+ });
+ }
+
+ // Return updated cart
+ return await getCartData(userId);
+ }),
+
+ updateCartItem: protectedProcedure
+ .input(z.object({
+ itemId: z.number().int().positive(),
+ quantity: z.number().int().min(0),
+ }))
+ .mutation(async ({ input, ctx }): Promise => {
+ const userId = ctx.user.userId;
+ const { itemId, quantity } = input;
+
+ if (!quantity || quantity <= 0) {
+ throw new ApiError("Positive quantity required", 400);
+ }
+
+ const [updatedItem] = await db.update(cartItems)
+ .set({ quantity: quantity.toString() })
+ .where(and(
+ eq(cartItems.id, itemId),
+ eq(cartItems.userId, userId)
+ ))
+ .returning();
+
+ if (!updatedItem) {
+ throw new ApiError("Cart item not found", 404);
+ }
+
+ // Return updated cart
+ return await getCartData(userId);
+ }),
+
+ removeFromCart: protectedProcedure
+ .input(z.object({
+ itemId: z.number().int().positive(),
+ }))
+ .mutation(async ({ input, ctx }): Promise => {
+ const userId = ctx.user.userId;
+ const { itemId } = input;
+
+ const [deletedItem] = await db.delete(cartItems)
+ .where(and(
+ eq(cartItems.id, itemId),
+ eq(cartItems.userId, userId)
+ ))
+ .returning();
+
+ if (!deletedItem) {
+ throw new ApiError("Cart item not found", 404);
+ }
+
+ // Return updated cart
+ return await getCartData(userId);
+ }),
+
+ clearCart: protectedProcedure
+ .mutation(async ({ ctx }) => {
+ const userId = ctx.user.userId;
+
+ await db.delete(cartItems).where(eq(cartItems.userId, userId));
+
+ return {
+ items: [],
+ totalItems: 0,
+ totalAmount: 0,
+ message: "Cart cleared successfully",
+ };
+ }),
+
+ getCartSlots: publicProcedure
+ .input(z.object({
+ productIds: z.array(z.number().int().positive())
+ }))
+ .query(async ({ input }) => {
+ const { productIds } = input;
+
+ if (productIds.length === 0) {
+ return {};
+ }
+
+ // Get slots for these products where freeze time is after current time
+ const slotsData = await db
+ .select({
+ productId: productSlots.productId,
+ slotId: deliverySlotInfo.id,
+ deliveryTime: deliverySlotInfo.deliveryTime,
+ freezeTime: deliverySlotInfo.freezeTime,
+ isActive: deliverySlotInfo.isActive,
+ })
+ .from(productSlots)
+ .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))
+ .where(and(
+ inArray(productSlots.productId, productIds),
+ gt(deliverySlotInfo.freezeTime, sql`NOW()`),
+ eq(deliverySlotInfo.isActive, true)
+ ));
+
+ // Group by productId
+ const result: Record = {};
+ slotsData.forEach(slot => {
+ if (!result[slot.productId]) {
+ result[slot.productId] = [];
+ }
+ result[slot.productId].push({
+ id: slot.slotId,
+ deliveryTime: slot.deliveryTime,
+ freezeTime: slot.freezeTime,
+ });
+ });
+
+ return result;
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/complaint.ts b/apps/backend/src/trpc/user-apis/complaint.ts
new file mode 100644
index 0000000..284d748
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/complaint.ts
@@ -0,0 +1,63 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { complaints } from '../../db/schema';
+import { eq } from 'drizzle-orm';
+
+export const complaintRouter = router({
+ getAll: protectedProcedure
+ .query(async ({ ctx }) => {
+ const userId = ctx.user.userId;
+
+ const userComplaints = await db
+ .select({
+ id: complaints.id,
+ complaintBody: complaints.complaintBody,
+ response: complaints.response,
+ isResolved: complaints.isResolved,
+ createdAt: complaints.createdAt,
+ orderId: complaints.orderId,
+ })
+ .from(complaints)
+ .where(eq(complaints.userId, userId))
+ .orderBy(complaints.createdAt);
+
+ return {
+ complaints: userComplaints.map(c => ({
+ id: c.id,
+ complaintBody: c.complaintBody,
+ response: c.response,
+ isResolved: c.isResolved,
+ createdAt: c.createdAt,
+ orderId: c.orderId,
+ })),
+ };
+ }),
+
+ raise: protectedProcedure
+ .input(z.object({
+ orderId: z.string().optional(),
+ complaintBody: z.string().min(1, 'Complaint body is required'),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { orderId, complaintBody } = input;
+
+ let orderIdNum: number | null = null;
+
+ if (orderId) {
+ const readableIdMatch = orderId.match(/^ORD(\d+)$/);
+ if (readableIdMatch) {
+ orderIdNum = parseInt(readableIdMatch[1]);
+ }
+ }
+
+ await db.insert(complaints).values({
+ userId,
+ orderId: orderIdNum,
+ complaintBody: complaintBody.trim(),
+ });
+
+ return { success: true, message: 'Complaint raised successfully' };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/coupon.ts b/apps/backend/src/trpc/user-apis/coupon.ts
new file mode 100644
index 0000000..d3a5555
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/coupon.ts
@@ -0,0 +1,296 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { coupons, couponUsage, couponApplicableUsers, reservedCoupons, couponApplicableProducts } from '../../db/schema';
+import { eq, and, or, gt, isNull, sql } from 'drizzle-orm';
+import { ApiError } from 'src/lib/api-error';
+
+import { users } from '../../db/schema';
+
+type CouponWithRelations = typeof coupons.$inferSelect & {
+ applicableUsers: (typeof couponApplicableUsers.$inferSelect & { user: typeof users.$inferSelect })[];
+ usages: typeof couponUsage.$inferSelect[];
+};
+
+export interface EligibleCoupon {
+ id: number;
+ code: string;
+ discountType: 'percentage' | 'flat';
+ discountValue: number;
+ maxValue?: number;
+ minOrder?: number;
+ description: string;
+ exclusiveApply?: boolean;
+ isEligible: boolean;
+ ineligibilityReason?: string;
+}
+
+const generateCouponDescription = (coupon: any): string => {
+ let desc = '';
+
+ if (coupon.discountPercent) {
+ desc += `${coupon.discountPercent}% off`;
+ } else if (coupon.flatDiscount) {
+ desc += `₹${coupon.flatDiscount} off`;
+ }
+
+ if (coupon.minOrder) {
+ desc += ` on orders above ₹${coupon.minOrder}`;
+ }
+
+ if (coupon.maxValue) {
+ desc += ` (max discount ₹${coupon.maxValue})`;
+ }
+
+ return desc;
+};
+
+export interface CouponDisplay {
+ id: number;
+ code: string;
+ discountType: 'percentage' | 'flat';
+ discountValue: number;
+ maxValue?: number;
+ minOrder?: number;
+ description: string;
+ validTill?: Date;
+ usageCount: number;
+ maxLimitForUser?: number;
+ isExpired: boolean;
+ isUsedUp: boolean;
+}
+
+export const userCouponRouter = router({
+ getEligible: protectedProcedure
+ .query(async ({ ctx }) => {
+ try {
+
+ const userId = ctx.user.userId;
+
+ // Get all active, non-expired coupons
+ const allCoupons = await db.query.coupons.findMany({
+ where: and(
+ eq(coupons.isInvalidated, false),
+ or(
+ isNull(coupons.validTill),
+ gt(coupons.validTill, new Date())
+ )
+ ),
+ with: {
+ usages: {
+ where: eq(couponUsage.userId, userId)
+ },
+ applicableUsers: {
+ with: {
+ user: true
+ }
+ },
+ applicableProducts: {
+ with: {
+ product: true
+ }
+ },
+ }
+ });
+
+ // Filter to only coupons applicable to current user
+ const applicableCoupons = allCoupons.filter(coupon => {
+ if(!coupon.isUserBased) return true;
+ const applicableUsers = coupon.applicableUsers || [];
+ return applicableUsers.some(au => au.userId === userId);
+ });
+
+ return { success: true, data: applicableCoupons };
+ }
+ catch(e) {
+ console.log(e)
+ throw new ApiError("Unable to get coupons")
+ }
+ }),
+
+ getProductCoupons: protectedProcedure
+ .input(z.object({ productId: z.number().int().positive() }))
+ .query(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { productId } = input;
+
+ // Get all active, non-expired coupons
+ const allCoupons = await db.query.coupons.findMany({
+ where: and(
+ eq(coupons.isInvalidated, false),
+ or(
+ isNull(coupons.validTill),
+ gt(coupons.validTill, new Date())
+ )
+ ),
+ with: {
+ usages: {
+ where: eq(couponUsage.userId, userId)
+ },
+ applicableUsers: {
+ with: {
+ user: true
+ }
+ },
+ applicableProducts: {
+ with: {
+ product: true
+ }
+ },
+ }
+ });
+
+ // Filter to only coupons applicable to current user and product
+ const applicableCoupons = allCoupons.filter(coupon => {
+ const applicableUsers = coupon.applicableUsers || [];
+ const userApplicable = !coupon.isUserBased || applicableUsers.some(au => au.userId === userId);
+
+ const applicableProducts = coupon.applicableProducts || [];
+ const productApplicable = applicableProducts.length === 0 || applicableProducts.some(ap => ap.productId === productId);
+
+ return userApplicable && productApplicable;
+ });
+
+ return { success: true, data: applicableCoupons };
+ }),
+
+ getMyCoupons: protectedProcedure
+ .query(async ({ ctx }) => {
+ const userId = ctx.user.userId;
+
+ // Get all coupons
+ const allCoupons = await db.query.coupons.findMany({
+ with: {
+ usages: {
+ where: eq(couponUsage.userId, userId)
+ },
+ applicableUsers: {
+ with: {
+ user: true
+ }
+ }
+ }
+ });
+
+ // Filter coupons in JS: not invalidated, applicable to user, and not expired
+ const applicableCoupons = (allCoupons as CouponWithRelations[]).filter(coupon => {
+ const isNotInvalidated = !coupon.isInvalidated;
+ const applicableUsers = coupon.applicableUsers || [];
+ const isApplicable = coupon.isApplyForAll || applicableUsers.some(au => au.userId === userId);
+ const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > new Date();
+ return isNotInvalidated && isApplicable && isNotExpired;
+ });
+
+ // Categorize coupons
+ const personalCoupons: CouponDisplay[] = [];
+ const generalCoupons: CouponDisplay[] = [];
+
+ applicableCoupons.forEach(coupon => {
+ const usageCount = coupon.usages.length;
+ const isExpired = false; // Already filtered out expired coupons
+ const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser);
+
+ const couponDisplay: CouponDisplay = {
+ id: coupon.id,
+ code: coupon.couponCode,
+ discountType: coupon.discountPercent ? 'percentage' : 'flat',
+ discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || '0'),
+ maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : undefined,
+ minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : undefined,
+ description: generateCouponDescription(coupon),
+ validTill: coupon.validTill ? new Date(coupon.validTill) : undefined,
+ usageCount,
+ maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : undefined,
+ isExpired,
+ isUsedUp,
+ };
+
+ if ((coupon.applicableUsers || []).some(au => au.userId === userId) && !coupon.isApplyForAll) {
+ // Personal coupon
+ personalCoupons.push(couponDisplay);
+ } else if (coupon.isApplyForAll) {
+ // General coupon
+ generalCoupons.push(couponDisplay);
+ }
+ });
+
+ return {
+ success: true,
+ data: {
+ personal: personalCoupons,
+ general: generalCoupons,
+ }
+ };
+ }),
+
+ redeemReservedCoupon: protectedProcedure
+ .input(z.object({ secretCode: z.string() }))
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { secretCode } = input;
+
+ // Find the reserved coupon
+ const reservedCoupon = await db.query.reservedCoupons.findFirst({
+ where: and(
+ eq(reservedCoupons.secretCode, secretCode.toUpperCase()),
+ eq(reservedCoupons.isRedeemed, false)
+ ),
+ });
+
+ if (!reservedCoupon) {
+ throw new ApiError("Invalid or already redeemed coupon code", 400);
+ }
+
+ // Check if already redeemed by this user (in case of multiple attempts)
+ if (reservedCoupon.redeemedBy === userId) {
+ throw new ApiError("You have already redeemed this coupon", 400);
+ }
+
+ // Create the coupon in the main table
+ const couponResult = await db.transaction(async (tx) => {
+ // Insert into coupons
+ const couponInsert = await tx.insert(coupons).values({
+ couponCode: reservedCoupon.couponCode,
+ isUserBased: true,
+ discountPercent: reservedCoupon.discountPercent,
+ flatDiscount: reservedCoupon.flatDiscount,
+ minOrder: reservedCoupon.minOrder,
+ productIds: reservedCoupon.productIds,
+ maxValue: reservedCoupon.maxValue,
+ isApplyForAll: false,
+ validTill: reservedCoupon.validTill,
+ maxLimitForUser: reservedCoupon.maxLimitForUser,
+ exclusiveApply: reservedCoupon.exclusiveApply,
+ createdBy: reservedCoupon.createdBy,
+ }).returning();
+
+ const coupon = couponInsert[0];
+
+ // Insert into couponApplicableUsers
+ await tx.insert(couponApplicableUsers).values({
+ couponId: coupon.id,
+ userId,
+ });
+
+ // Copy applicable products
+ if (reservedCoupon.productIds && Array.isArray(reservedCoupon.productIds) && reservedCoupon.productIds.length > 0) {
+ // Assuming productIds are the IDs, but wait, in schema, productIds is jsonb, but in relations, couponApplicableProducts has productId
+ // For simplicity, since reservedCoupons has productIds as jsonb, but to match, perhaps insert into couponApplicableProducts if needed
+ // But in createReservedCoupon, I inserted applicableProducts into couponApplicableProducts
+ // So for reserved, perhaps do the same, but since it's jsonb, maybe not.
+ // For now, skip, as the coupon will have productIds in coupons table.
+ }
+
+ // Update reserved coupon as redeemed
+ await tx.update(reservedCoupons).set({
+ isRedeemed: true,
+ redeemedBy: userId,
+ redeemedAt: new Date(),
+ }).where(eq(reservedCoupons.id, reservedCoupon.id));
+
+ return coupon;
+ });
+
+ return { success: true, coupon: couponResult };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/file-upload.ts b/apps/backend/src/trpc/user-apis/file-upload.ts
new file mode 100644
index 0000000..f5c5d9d
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/file-upload.ts
@@ -0,0 +1,51 @@
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { generateUploadUrl } from '../../lib/s3-client';
+import { ApiError } from '../../lib/api-error';
+
+export const fileUploadRouter = router({
+ generateUploadUrls: protectedProcedure
+ .input(z.object({
+ contextString: z.enum(['review', 'product_info']),
+ mimeTypes: z.array(z.string()),
+ }))
+ .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {
+ const { contextString, mimeTypes } = input;
+
+ const uploadUrls: string[] = [];
+ const keys: string[] = [];
+
+ for (const mimeType of mimeTypes) {
+ // Generate key based on context and mime type
+ let folder: string;
+ if (contextString === 'review') {
+ folder = 'review-images';
+ } else if(contextString === 'product_info') {
+ folder = 'product-images';
+ } else if(contextString === 'review_response') {
+ folder = 'review-response-images'
+ } else {
+ folder = '';
+ }
+
+ const extension = mimeType === 'image/jpeg' ? '.jpg' :
+ mimeType === 'image/png' ? '.png' :
+ mimeType === 'image/gif' ? '.gif' : '.jpg';
+ const key = `${folder}/${Date.now()}${extension}`;
+
+ try {
+ const uploadUrl = await generateUploadUrl(key, mimeType);
+ uploadUrls.push(uploadUrl);
+ keys.push(key);
+
+ } catch (error) {
+ console.error('Error generating upload URL:', error);
+ throw new ApiError('Failed to generate upload URL', 500);
+ }
+ }
+
+ return { uploadUrls };
+ }),
+});
+
+export type FileUploadRouter = typeof fileUploadRouter;
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/order.ts b/apps/backend/src/trpc/user-apis/order.ts
new file mode 100644
index 0000000..7582559
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/order.ts
@@ -0,0 +1,972 @@
+import { router, protectedProcedure } from "../trpc-index";
+import { z } from "zod";
+import { db } from "../../db/db_index";
+import {
+ orders,
+ orderItems,
+ orderStatus,
+ addresses,
+ productInfo,
+ paymentInfoTable,
+ keyValStore,
+ coupons,
+ couponUsage,
+ payments,
+ cartItems,
+ refunds,
+ units,
+} from "../../db/schema";
+import { eq, and, inArray, desc, gte, lte } from "drizzle-orm";
+import { generateSignedUrlsFromS3Urls } from "../../lib/s3-client";
+import { ApiError } from "../../lib/api-error";
+import {
+ sendOrderPlacedNotification,
+ sendOrderCancelledNotification,
+} from "../../lib/notif-job";
+import { RazorpayPaymentService } from "../../lib/payments-utils";
+import { deliveryCharge, minOrderValue } from "../../lib/env-exporter";
+import { getNextDeliveryDate } from "../common-apis/common";
+import { CONST_KEYS, getConstant } from "../../lib/const-store";
+
+
+const validateAndGetCoupon = async (
+ couponId: number | undefined,
+ userId: number,
+ totalAmount: number
+) => {
+ if (!couponId) return null;
+
+ const coupon = await db.query.coupons.findFirst({
+ where: eq(coupons.id, couponId),
+ with: {
+ usages: { where: eq(couponUsage.userId, userId) },
+ },
+ });
+
+ if (!coupon) throw new ApiError("Invalid coupon", 400);
+ if (coupon.isInvalidated)
+ throw new ApiError("Coupon is no longer valid", 400);
+ if (coupon.validTill && new Date(coupon.validTill) < new Date())
+ throw new ApiError("Coupon has expired", 400);
+ if (
+ coupon.maxLimitForUser &&
+ coupon.usages.length >= coupon.maxLimitForUser
+ )
+ throw new ApiError("Coupon usage limit exceeded", 400);
+ if (
+ coupon.minOrder &&
+ parseFloat(coupon.minOrder.toString()) > totalAmount
+ )
+ throw new ApiError(
+ "Order amount does not meet coupon minimum requirement",
+ 400
+ );
+
+ return coupon;
+};
+
+const applyDiscountToOrder = (
+ orderTotal: number,
+ totalAmount: number,
+ appliedCoupon: typeof coupons.$inferSelect | null,
+ proportion: number
+) => {
+ let finalOrderTotal = orderTotal;
+ // const proportion = totalAmount / orderTotal;
+ if (appliedCoupon) {
+ if (appliedCoupon.discountPercent) {
+ const discount = Math.min(
+ (orderTotal *
+ parseFloat(appliedCoupon.discountPercent.toString())) /
+ 100,
+ appliedCoupon.maxValue
+ ? parseFloat(appliedCoupon.maxValue.toString()) * proportion
+ : Infinity
+ );
+ finalOrderTotal -= discount;
+ } else if (appliedCoupon.flatDiscount) {
+ const discount = Math.min(
+ parseFloat(appliedCoupon.flatDiscount.toString()) * proportion,
+ appliedCoupon.maxValue
+ ? parseFloat(appliedCoupon.maxValue.toString()) * proportion
+ : finalOrderTotal
+ );
+ finalOrderTotal -= discount;
+ }
+ }
+
+ // let orderDeliveryCharge = 0;
+ // if (isFirstOrder && finalOrderTotal < minOrderValue) {
+ // orderDeliveryCharge = deliveryCharge;
+ // finalOrderTotal += deliveryCharge;
+ // }
+
+
+ return { finalOrderTotal, orderGroupProportion: proportion };
+};
+
+const placeOrderUtil = async (params: {
+ userId: number;
+ selectedItems: Array<{
+ productId: number;
+ quantity: number;
+ slotId: number | null;
+ }>;
+ addressId: number;
+ paymentMethod: "online" | "cod";
+ couponId?: number;
+ userNotes?: string;
+ deliveryPrice?: number;
+ isFlash?: boolean;
+}) => {
+ const {
+ userId,
+ selectedItems,
+ addressId,
+ paymentMethod,
+ couponId,
+ userNotes,
+ deliveryPrice,
+ } = params;
+
+ const orderGroupId = `${Date.now()}-${userId}`;
+ // Validate address belongs to user
+ const address = await db.query.addresses.findFirst({
+ where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)),
+ });
+ if (!address) {
+ throw new ApiError("Invalid address", 400);
+ }
+
+ // Group items by slotId and validate products
+ const ordersBySlot = new Map<
+ number | null,
+ Array<{
+ productId: number;
+ quantity: number;
+ slotId: number | null;
+ product: any;
+ }>
+ >();
+
+ for (const item of selectedItems) {
+ const product = await db.query.productInfo.findFirst({
+ where: eq(productInfo.id, item.productId),
+ });
+ if (!product) {
+ throw new ApiError(`Product ${item.productId} not found`, 400);
+ }
+
+ if (!ordersBySlot.has(item.slotId)) {
+ ordersBySlot.set(item.slotId, []);
+ }
+ ordersBySlot.get(item.slotId)!.push({ ...item, product });
+ }
+
+ // Validate flash delivery product availability if isFlash is true
+ if (params.isFlash) {
+ // Check if all products are flash-available (flashPrice is optional - fallback to regular price)
+ for (const item of selectedItems) {
+ const product = await db.query.productInfo.findFirst({
+ where: eq(productInfo.id, item.productId),
+ });
+ if (!product?.isFlashAvailable) {
+ throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400);
+ }
+ // Note: flashPrice validation removed - frontend falls back to regular price if not set
+ }
+ }
+
+ // Calculate total amount across all orders
+ let totalAmount = 0;
+ for (const [slotId, items] of ordersBySlot) {
+ const orderTotal = items.reduce(
+ (sum, item) => {
+ const itemPrice = params.isFlash
+ ? parseFloat((item.product.flashPrice || item.product.price).toString())
+ : parseFloat(item.product.price.toString());
+ return sum + itemPrice * item.quantity;
+ },
+ 0
+ );
+ totalAmount += orderTotal;
+ }
+
+ const appliedCoupon = await validateAndGetCoupon(couponId, userId, totalAmount);
+
+ // Calculate and verify delivery charge
+ const expectedDeliveryCharge =
+ totalAmount < minOrderValue ? deliveryCharge : 0;
+ if (
+ deliveryPrice !== undefined &&
+ deliveryPrice !== expectedDeliveryCharge
+ ) {
+ throw new ApiError("Invalid delivery charge amount", 400);
+ }
+
+ // Create orders in transaction
+ const createdOrders = await db.transaction(async (tx) => {
+ // Get and increment readable order ID counter
+ let currentReadableId = 1;
+ const existing = await tx.query.keyValStore.findFirst({
+ where: eq(keyValStore.key, CONST_KEYS.readableOrderId),
+ });
+ if (existing?.value != null) {
+ const storedValue = existing.value;
+ const parsedValue = typeof storedValue === 'number'
+ ? storedValue
+ : parseInt(String(storedValue), 10) || 0;
+ currentReadableId = parsedValue + 1;
+ }
+
+ // Create shared payment info for all orders
+ let sharedPaymentInfoId: number | null = null;
+ if (paymentMethod === "online") {
+ const [paymentInfo] = await tx
+ .insert(paymentInfoTable)
+ .values({
+ status: "pending",
+ gateway: "razorpay",
+ merchantOrderId: `multi_order_${Date.now()}`,
+ })
+ .returning();
+ sharedPaymentInfoId = paymentInfo.id;
+ }
+
+ const createdOrders: any[] = [];
+ let isFirstOrder = true;
+
+ // Create separate order for each slot group
+ for (const [slotId, items] of ordersBySlot) {
+ // Calculate order-specific total
+ const orderTotal = items.reduce(
+ (sum, item) => {
+ const itemPrice = params.isFlash
+ ? parseFloat((item.product.flashPrice || item.product.price).toString())
+ : parseFloat(item.product.price.toString());
+ return sum + itemPrice * item.quantity;
+ },
+ 0
+ );
+
+ const orderGroupProportion = orderTotal / totalAmount;
+ const { finalOrderTotal } = applyDiscountToOrder(
+ orderTotal,
+ totalAmount,
+ appliedCoupon,
+ orderGroupProportion
+ );
+
+ // const orderGroupProportion = orderTotal / totalAmount;
+
+ // Create order record
+ const [order] = await tx
+ .insert(orders)
+ .values({
+ userId,
+ addressId,
+ slotId: params.isFlash ? null : slotId, // No slot assignment for flash delivery
+ isCod: paymentMethod === "cod",
+ isOnlinePayment: paymentMethod === "online",
+ paymentInfoId: sharedPaymentInfoId,
+ totalAmount: finalOrderTotal.toString(),
+ deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : '0',
+ readableId: currentReadableId++,
+ userNotes: userNotes || null,
+ orderGroupId,
+ orderGroupProportion: orderGroupProportion.toString(),
+ isFlashDelivery: params.isFlash,
+ })
+ .returning();
+
+ // Create order items
+ const orderItemsData = items.map((item) => ({
+ orderId: order.id as number,
+ productId: item.productId,
+ quantity: item.quantity.toString(),
+ price: params.isFlash ? (item.product.flashPrice || item.product.price) : item.product.price,
+ discountedPrice: (params.isFlash ? (item.product.flashPrice || item.product.price) : item.product.price).toString(),
+ }));
+
+ await tx.insert(orderItems).values(orderItemsData);
+
+ // Create order status
+ await tx.insert(orderStatus).values({
+ userId,
+ orderId: order.id as number,
+ paymentStatus: paymentMethod === "cod" ? "cod" : "pending",
+ });
+
+ createdOrders.push(order);
+ isFirstOrder = false;
+ }
+
+ // Update readable ID counter
+ await tx
+ .insert(keyValStore)
+ .values({
+ key: CONST_KEYS.readableOrderId,
+ value: currentReadableId,
+ })
+ .onConflictDoUpdate({
+ target: keyValStore.key,
+ set: { value: currentReadableId },
+ });
+
+ // Create Razorpay order for online payments
+ if (paymentMethod === "online" && sharedPaymentInfoId) {
+ const razorpayOrder = await RazorpayPaymentService.createOrder(
+ sharedPaymentInfoId,
+ (totalAmount+expectedDeliveryCharge).toString()
+ );
+ await RazorpayPaymentService.insertPaymentRecord(
+ sharedPaymentInfoId,
+ razorpayOrder,
+ tx
+ );
+ }
+
+ // Remove ordered items from cart
+ await tx.delete(cartItems).where(
+ and(
+ eq(cartItems.userId, userId),
+ inArray(
+ cartItems.productId,
+ selectedItems.map((item) => item.productId)
+ )
+ )
+ );
+
+ return createdOrders;
+ });
+
+ // Record single coupon usage if applied (regardless of number of orders)
+ if (appliedCoupon && createdOrders.length > 0) {
+ await db.insert(couponUsage).values({
+ userId,
+ couponId: appliedCoupon.id,
+ orderId: createdOrders[0].id as number, // Use first order ID
+ orderItemId: null,
+ usedAt: new Date(),
+ });
+ }
+
+ // Send notifications for each order
+ for (const order of createdOrders) {
+ sendOrderPlacedNotification(userId, order.id.toString());
+ }
+
+ return { success: true, data: createdOrders };
+};
+
+export const orderRouter = router({
+ placeOrder: protectedProcedure
+ .input(
+ z.object({
+ selectedItems: z.array(
+ z.object({
+ productId: z.number().int().positive(),
+ quantity: z.number().int().positive(),
+ slotId: z.union([z.number().int(), z.null()]),
+ })
+ ),
+ addressId: z.number().int().positive(),
+ paymentMethod: z.enum(["online", "cod"]),
+ couponId: z.number().int().positive().optional(),
+ userNotes: z.string().optional(),
+ deliveryPrice: z.number().min(0).optional(),
+ isFlashDelivery: z.boolean().optional().default(false),
+ })
+ )
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const {
+ selectedItems,
+ addressId,
+ paymentMethod,
+ couponId,
+ userNotes,
+ deliveryPrice,
+ isFlashDelivery,
+ } = input;
+
+ // Check if flash delivery is enabled when placing a flash delivery order
+ if (isFlashDelivery) {
+ const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled);
+ if (!isFlashDeliveryEnabled) {
+ throw new ApiError("Flash delivery is currently unavailable. Please opt for scheduled delivery.", 403);
+ }
+ }
+
+ let processedItems = selectedItems;
+
+ // Handle flash delivery slot resolution
+ if (isFlashDelivery) {
+ // For flash delivery, set slotId to null (no specific slot assigned)
+ processedItems = selectedItems.map(item => ({
+ ...item,
+ slotId: null as any, // Type override for flash delivery
+ }));
+ }
+
+ console.log({isFlashDelivery, processedItems})
+
+ return await placeOrderUtil({
+ userId,
+ selectedItems: processedItems,
+ addressId,
+ paymentMethod,
+ couponId,
+ userNotes,
+ deliveryPrice,
+ isFlash: isFlashDelivery,
+ });
+ }),
+
+ getOrders: protectedProcedure
+ .input(
+ z
+ .object({
+ page: z.number().min(1).default(1),
+ pageSize: z.number().min(1).max(50).default(10),
+ })
+ .optional()
+ )
+ .query(async ({ input, ctx }) => {
+ const { page = 1, pageSize = 10 } = input || {};
+ const userId = ctx.user.userId;
+ const offset = (page - 1) * pageSize;
+
+ // Get total count for pagination
+ const totalCountResult = await db.$count(
+ orders,
+ eq(orders.userId, userId)
+ );
+ const totalCount = totalCountResult;
+
+ const userOrders = await db.query.orders.findMany({
+ where: eq(orders.userId, userId),
+ with: {
+ orderItems: {
+ with: {
+ product: true,
+ },
+ },
+ slot: true,
+ paymentInfo: true,
+ orderStatus: true,
+ refunds: true,
+ },
+ orderBy: (orders, { desc }) => [desc(orders.createdAt)],
+ limit: pageSize,
+ offset: offset,
+ });
+
+ const mappedOrders = await Promise.all(
+ userOrders.map(async (order) => {
+ const status = order.orderStatus[0];
+ const refund = order.refunds[0];
+
+ type DeliveryStatus = "cancelled" | "success" | "pending" | "packaged";
+ type OrderStatus = "cancelled" | "success";
+
+ let deliveryStatus: DeliveryStatus;
+ let orderStatus: OrderStatus;
+
+ const allItemsPackaged = order.orderItems.every(
+ (item) => item.is_packaged
+ );
+
+ if (status?.isCancelled) {
+ deliveryStatus = "cancelled";
+ orderStatus = "cancelled";
+ } else if (status?.isDelivered) {
+ deliveryStatus = "success";
+ orderStatus = "success";
+ } else if (allItemsPackaged) {
+ deliveryStatus = "packaged";
+ orderStatus = "success";
+ } else {
+ deliveryStatus = "pending";
+ orderStatus = "success";
+ }
+
+ const paymentMode = order.isCod ? "CoD" : "Online";
+ const paymentStatus = status?.paymentStatus || "pending";
+ const refundStatus = refund?.refundStatus || "none";
+ const refundAmount = refund?.refundAmount
+ ? parseFloat(refund.refundAmount.toString())
+ : null;
+
+ const items = await Promise.all(
+ order.orderItems.map(async (item) => {
+
+ const signedImages = item.product.images
+ ? await generateSignedUrlsFromS3Urls(
+ item.product.images as string[]
+ )
+ : [];
+ return {
+ productName: item.product.name,
+ quantity: parseFloat(item.quantity),
+ price: parseFloat(item.price.toString()),
+ discountedPrice: parseFloat(
+ item.discountedPrice?.toString() || item.price.toString()
+ ),
+ amount:
+ parseFloat(item.price.toString()) * parseFloat(item.quantity),
+ image: signedImages[0] || null,
+ };
+ })
+ );
+
+ return {
+ id: order.id,
+ orderId: `ORD${order.readableId.toString().padStart(3, "0")}`,
+ orderDate: order.createdAt.toISOString(),
+ deliveryStatus,
+ deliveryDate: order.slot?.deliveryTime.toISOString(),
+ orderStatus,
+ cancelReason: status?.cancelReason || null,
+ paymentMode,
+ totalAmount: Number(order.totalAmount),
+ deliveryCharge: Number(order.deliveryCharge),
+ paymentStatus,
+ refundStatus,
+ refundAmount,
+ userNotes: order.userNotes || null,
+ items,
+ isFlashDelivery: order.isFlashDelivery,
+ createdAt: order.createdAt.toISOString(),
+ };
+ })
+ );
+
+ return {
+ success: true,
+ data: mappedOrders,
+ pagination: {
+ page,
+ pageSize,
+ totalCount,
+ totalPages: Math.ceil(totalCount / pageSize),
+ },
+ };
+ }),
+
+ getOrderById: protectedProcedure
+ .input(z.object({ orderId: z.string() }))
+ .query(async ({ input, ctx }) => {
+ const { orderId } = input;
+ const userId = ctx.user.userId;
+
+ const order = await db.query.orders.findFirst({
+ where: and(eq(orders.id, parseInt(orderId)), eq(orders.userId, userId)),
+ with: {
+ orderItems: {
+ with: {
+ product: true,
+ },
+ },
+ slot: true,
+ paymentInfo: true,
+ orderStatus: {
+ with: {
+ refundCoupon: true,
+ },
+ },
+ refunds: true,
+ },
+ });
+
+ if (!order) {
+ throw new Error("Order not found");
+ }
+
+ // Get coupon usage for this specific order using new orderId field
+ const couponUsageData = await db.query.couponUsage.findMany({
+ where: eq(couponUsage.orderId, order.id), // Use new orderId field
+ with: {
+ coupon: true,
+ },
+ });
+
+ let couponData = null;
+ if (couponUsageData.length > 0) {
+ // Calculate total discount from multiple coupons
+ let totalDiscountAmount = 0;
+ const orderTotal = parseFloat(order.totalAmount.toString());
+
+ for (const usage of couponUsageData) {
+ let discountAmount = 0;
+
+ if (usage.coupon.discountPercent) {
+ discountAmount =
+ (orderTotal *
+ parseFloat(usage.coupon.discountPercent.toString())) /
+ 100;
+ } else if (usage.coupon.flatDiscount) {
+ discountAmount = parseFloat(usage.coupon.flatDiscount.toString());
+ }
+
+ // Apply max value limit if set
+ if (
+ usage.coupon.maxValue &&
+ discountAmount > parseFloat(usage.coupon.maxValue.toString())
+ ) {
+ discountAmount = parseFloat(usage.coupon.maxValue.toString());
+ }
+
+ totalDiscountAmount += discountAmount;
+ }
+
+ couponData = {
+ couponCode: couponUsageData
+ .map((u) => u.coupon.couponCode)
+ .join(", "),
+ couponDescription: `${couponUsageData.length} coupons applied`,
+ discountAmount: totalDiscountAmount,
+ };
+ }
+
+ const status = order.orderStatus[0];
+ const refund = order.refunds[0];
+
+ type DeliveryStatus = "cancelled" | "success" | "pending" | "packaged";
+ type OrderStatus = "cancelled" | "success";
+
+ let deliveryStatus: DeliveryStatus;
+ let orderStatus: OrderStatus;
+
+ const allItemsPackaged = order.orderItems.every(
+ (item) => item.is_packaged
+ );
+
+ if (status?.isCancelled) {
+ deliveryStatus = "cancelled";
+ orderStatus = "cancelled";
+ } else if (status?.isDelivered) {
+ deliveryStatus = "success";
+ orderStatus = "success";
+ } else if (allItemsPackaged) {
+ deliveryStatus = "packaged";
+ orderStatus = "success";
+ } else {
+ deliveryStatus = "pending";
+ orderStatus = "success";
+ }
+
+ const paymentMode = order.isCod ? "CoD" : "Online";
+ const paymentStatus = status?.paymentStatus || "pending";
+ const refundStatus = refund?.refundStatus || "none";
+ const refundAmount = refund?.refundAmount
+ ? parseFloat(refund.refundAmount.toString())
+ : null;
+
+ const items = await Promise.all(
+ order.orderItems.map(async (item) => {
+ const signedImages = item.product.images
+ ? await generateSignedUrlsFromS3Urls(
+ item.product.images as string[]
+ )
+ : [];
+ return {
+ productName: item.product.name,
+ quantity: parseFloat(item.quantity),
+ price: parseFloat(item.price.toString()),
+ discountedPrice: parseFloat(
+ item.discountedPrice?.toString() || item.price.toString()
+ ),
+ amount:
+ parseFloat(item.price.toString()) * parseFloat(item.quantity),
+ image: signedImages[0] || null,
+ };
+ })
+ );
+
+ return {
+ id: order.id,
+ orderId: `ORD${order.readableId.toString().padStart(3, "0")}`,
+ orderDate: order.createdAt.toISOString(),
+ deliveryStatus,
+ deliveryDate: order.slot?.deliveryTime.toISOString(),
+ orderStatus: order.orderStatus,
+ cancellationStatus: orderStatus,
+ cancelReason: status?.cancelReason || null,
+ paymentMode,
+ paymentStatus,
+ refundStatus,
+ refundAmount,
+ userNotes: order.userNotes || null,
+ items,
+ couponCode: couponData?.couponCode || null,
+ couponDescription: couponData?.couponDescription || null,
+ discountAmount: couponData?.discountAmount || null,
+ orderAmount: parseFloat(order.totalAmount.toString()),
+ isFlashDelivery: order.isFlashDelivery,
+ createdAt: order.createdAt.toISOString(),
+ };
+ }),
+
+ cancelOrder: protectedProcedure
+ .input(
+ z.object({
+ // id: z.string().regex(/^ORD\d+$/, "Invalid order ID format"),
+ id: z.string(),
+ reason: z.string().min(1, "Cancellation reason is required"),
+ })
+ )
+ .mutation(async ({ input, ctx }) => {
+ try {
+ const userId = ctx.user.userId;
+ const { id, reason } = input;
+
+ const readableId = Number(id);
+
+ // Check if order exists and belongs to user
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, Number(id)),
+ with: {
+ orderStatus: true,
+ },
+ });
+
+ if (!order) {
+ console.error("Order not found:", id);
+ throw new ApiError("Order not found", 404);
+ }
+
+ if (order.userId !== userId) {
+ console.error("Order does not belong to user:", {
+ orderId: id,
+ orderUserId: order.userId,
+ requestUserId: userId,
+ });
+
+ throw new ApiError("Order not found", 404);
+ }
+
+ const status = order.orderStatus[0];
+ if (!status) {
+ console.error("Order status not found for order:", id);
+ throw new ApiError("Order status not found", 400);
+ }
+
+ if (status.isCancelled) {
+ console.error("Order is already cancelled:", id);
+ throw new ApiError("Order is already cancelled", 400);
+ }
+
+ if (status.isDelivered) {
+ console.error("Cannot cancel delivered order:", id);
+ throw new ApiError("Cannot cancel delivered order", 400);
+ }
+
+ // Perform database operations in transaction
+ const result = await db.transaction(async (tx) => {
+ // Update order status
+ await tx
+ .update(orderStatus)
+ .set({
+ isCancelled: true,
+ cancelReason: reason,
+ cancellationUserNotes: reason,
+ cancellationReviewed: false,
+ })
+ .where(eq(orderStatus.id, status.id));
+
+ // Determine refund status based on payment method
+ const refundStatus = order.isCod ? "na" : "pending";
+
+ // Insert refund record
+ await tx.insert(refunds).values({
+ orderId: order.id,
+ refundStatus,
+ });
+
+ return { orderId: order.id, userId };
+ });
+
+ // Send notification outside transaction (idempotent operation)
+ await sendOrderCancelledNotification(
+ result.userId,
+ result.orderId.toString()
+ );
+
+ return { success: true, message: "Order cancelled successfully" };
+ } catch (e) {
+ console.log(e);
+ throw new ApiError("failed to cancel order");
+ }
+ }),
+
+ updateUserNotes: protectedProcedure
+ .input(
+ z.object({
+ id: z.string(),
+ userNotes: z.string(),
+ })
+ )
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { id, userNotes } = input;
+
+ // Extract readable ID from orderId (e.g., ORD001 -> 1)
+ // const readableIdMatch = id.match(/^ORD(\d+)$/);
+ // if (!readableIdMatch) {
+ // console.error("Invalid order ID format:", id);
+ // throw new ApiError("Invalid order ID format", 400);
+ // }
+ // const readableId = parseInt(readableIdMatch[1]);
+
+ // Check if order exists and belongs to user
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, Number(id)),
+ with: {
+ orderStatus: true,
+ },
+ });
+
+ if (!order) {
+ console.error("Order not found:", id);
+ throw new ApiError("Order not found", 404);
+ }
+
+ if (order.userId !== userId) {
+ console.error("Order does not belong to user:", {
+ orderId: id,
+ orderUserId: order.userId,
+ requestUserId: userId,
+ });
+ throw new ApiError("Order not found", 404);
+ }
+
+ const status = order.orderStatus[0];
+ if (!status) {
+ console.error("Order status not found for order:", id);
+ throw new ApiError("Order status not found", 400);
+ }
+
+ // Only allow updating notes for orders that are not delivered or cancelled
+ if (status.isDelivered) {
+ console.error("Cannot update notes for delivered order:", id);
+ throw new ApiError("Cannot update notes for delivered order", 400);
+ }
+
+ if (status.isCancelled) {
+ console.error("Cannot update notes for cancelled order:", id);
+ throw new ApiError("Cannot update notes for cancelled order", 400);
+ }
+
+ // Update user notes
+ await db
+ .update(orders)
+ .set({
+ userNotes: userNotes || null,
+ })
+ .where(eq(orders.id, order.id));
+
+ return { success: true, message: "Notes updated successfully" };
+ }),
+
+ getRecentlyOrderedProducts: protectedProcedure
+ .input(
+ z
+ .object({
+ limit: z.number().min(1).max(50).default(20),
+ })
+ .optional()
+ )
+ .query(async ({ input, ctx }) => {
+ const { limit = 20 } = input || {};
+ const userId = ctx.user.userId;
+
+ // Get user's recent delivered orders (last 30 days)
+ const thirtyDaysAgo = new Date();
+ thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);
+
+ const recentOrders = await db
+ .select({ id: orders.id })
+ .from(orders)
+ .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))
+ .where(
+ and(
+ eq(orders.userId, userId),
+ eq(orderStatus.isDelivered, true),
+ gte(orders.createdAt, thirtyDaysAgo)
+ )
+ )
+ .orderBy(desc(orders.createdAt))
+ .limit(10); // Get last 10 orders
+
+ if (recentOrders.length === 0) {
+ return { success: true, products: [] };
+ }
+
+ const orderIds = recentOrders.map((order) => order.id);
+
+ // Get unique product IDs from recent orders
+ const orderItemsResult = await db
+ .select({ productId: orderItems.productId })
+ .from(orderItems)
+ .where(inArray(orderItems.orderId, orderIds));
+
+ const productIds = [
+ ...new Set(orderItemsResult.map((item) => item.productId)),
+ ];
+
+ if (productIds.length === 0) {
+ return { success: true, products: [] };
+ }
+
+ // Get product details
+ const productsWithUnits = await db
+ .select({
+ id: productInfo.id,
+ name: productInfo.name,
+ shortDescription: productInfo.shortDescription,
+ price: productInfo.price,
+ images: productInfo.images,
+ isOutOfStock: productInfo.isOutOfStock,
+ unitShortNotation: units.shortNotation,
+ incrementStep: productInfo.incrementStep,
+ })
+ .from(productInfo)
+ .innerJoin(units, eq(productInfo.unitId, units.id))
+ .where(
+ and(
+ inArray(productInfo.id, productIds),
+ eq(productInfo.isSuspended, false)
+ )
+ )
+ .orderBy(desc(productInfo.createdAt))
+ .limit(limit);
+
+ // Generate signed URLs for product images
+ const formattedProducts = await Promise.all(
+ productsWithUnits.map(async (product) => {
+ const nextDeliveryDate = await getNextDeliveryDate(product.id);
+ return {
+ id: product.id,
+ name: product.name,
+ shortDescription: product.shortDescription,
+ price: product.price,
+ unit: product.unitShortNotation,
+ incrementStep: product.incrementStep,
+ isOutOfStock: product.isOutOfStock,
+ nextDeliveryDate: nextDeliveryDate
+ ? nextDeliveryDate.toISOString()
+ : null,
+ images: await generateSignedUrlsFromS3Urls(
+ (product.images as string[]) || []
+ ),
+ };
+ })
+ );
+
+ return {
+ success: true,
+ products: formattedProducts,
+ };
+ }),
+});
diff --git a/apps/backend/src/trpc/user-apis/payments.ts b/apps/backend/src/trpc/user-apis/payments.ts
new file mode 100644
index 0000000..851f232
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/payments.ts
@@ -0,0 +1,159 @@
+
+import { router, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { orders, payments, orderStatus } from '../../db/schema';
+import { eq } from 'drizzle-orm';
+import { ApiError } from '../../lib/api-error';
+import crypto from 'crypto';
+import { razorpayId, razorpaySecret } from "../../lib/env-exporter";
+import { DiskPersistedSet } from "src/lib/disk-persisted-set";
+import { RazorpayPaymentService } from "../../lib/payments-utils";
+
+
+
+
+export const paymentRouter = router({
+ createRazorpayOrder: protectedProcedure //either create a new payment order or return the existing one
+ .input(z.object({
+ orderId: z.string(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { orderId } = input;
+
+ // Validate order exists and belongs to user
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, parseInt(orderId)),
+ });
+
+ if (!order) {
+ throw new ApiError("Order not found", 404);
+ }
+
+ if (order.userId !== userId) {
+ throw new ApiError("Order does not belong to user", 403);
+ }
+
+ // Check for existing pending payment
+ const existingPayment = await db.query.payments.findFirst({
+ where: eq(payments.orderId, parseInt(orderId)),
+ });
+
+ if (existingPayment && existingPayment.status === 'pending') {
+ return {
+ razorpayOrderId: existingPayment.merchantOrderId,
+ key: razorpayId,
+ };
+ }
+
+ // Create Razorpay order and insert payment record
+ const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount);
+ await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder);
+
+ return {
+ razorpayOrderId: razorpayOrder.id,
+ key: razorpayId,
+ };
+ }),
+
+
+
+ verifyPayment: protectedProcedure
+ .input(z.object({
+ razorpay_payment_id: z.string(),
+ razorpay_order_id: z.string(),
+ razorpay_signature: z.string(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input;
+
+ // Verify signature
+ const expectedSignature = crypto
+ .createHmac('sha256', razorpaySecret)
+ .update(razorpay_order_id + '|' + razorpay_payment_id)
+ .digest('hex');
+
+ if (expectedSignature !== razorpay_signature) {
+ throw new ApiError("Invalid payment signature", 400);
+ }
+
+ // Get current payment record
+ const currentPayment = await db.query.payments.findFirst({
+ where: eq(payments.merchantOrderId, razorpay_order_id),
+ });
+
+ if (!currentPayment) {
+ throw new ApiError("Payment record not found", 404);
+ }
+
+ // Update payment status and payload
+ const updatedPayload = {
+ ...((currentPayment.payload as any) || {}),
+ payment_id: razorpay_payment_id,
+ signature: razorpay_signature,
+ };
+
+ const [updatedPayment] = await db
+ .update(payments)
+ .set({
+ status: 'success',
+ payload: updatedPayload,
+ })
+ .where(eq(payments.merchantOrderId, razorpay_order_id))
+ .returning();
+
+ // Update order status to mark payment as processed
+ await db
+ .update(orderStatus)
+ .set({
+ paymentStatus: 'success',
+ })
+ .where(eq(orderStatus.orderId, updatedPayment.orderId));
+
+ return {
+ success: true,
+ message: "Payment verified successfully",
+ };
+ }),
+
+ markPaymentFailed: protectedProcedure
+ .input(z.object({
+ merchantOrderId: z.string(),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const userId = ctx.user.userId;
+ const { merchantOrderId } = input;
+
+ // Find payment by merchantOrderId
+ const payment = await db.query.payments.findFirst({
+ where: eq(payments.merchantOrderId, merchantOrderId),
+ });
+
+ if (!payment) {
+ throw new ApiError("Payment not found", 404);
+ }
+
+ // Check if payment belongs to user's order
+ const order = await db.query.orders.findFirst({
+ where: eq(orders.id, payment.orderId),
+ });
+
+ if (!order || order.userId !== userId) {
+ throw new ApiError("Payment does not belong to user", 403);
+ }
+
+ // Update payment status to failed
+ await db
+ .update(payments)
+ .set({ status: 'failed' })
+ .where(eq(payments.id, payment.id));
+
+ return {
+ success: true,
+ message: "Payment marked as failed",
+ };
+ }),
+
+});
+
diff --git a/apps/backend/src/trpc/user-apis/product.ts b/apps/backend/src/trpc/user-apis/product.ts
new file mode 100644
index 0000000..d1380a1
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/product.ts
@@ -0,0 +1,349 @@
+import { router, publicProcedure, protectedProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { productInfo, units, productSlots, deliverySlotInfo, specialDeals, storeInfo, productTagInfo, productTags, productReviews, users } from '../../db/schema';
+import { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url, generateUploadUrl, claimUploadUrl, extractKeyFromPresignedUrl } from '../../lib/s3-client';
+import { ApiError } from '../../lib/api-error';
+import { eq, and, gt, sql, inArray, desc } from 'drizzle-orm';
+
+export const productRouter = router({
+ getDashboardTags: publicProcedure
+ .query(async () => {
+ const tags = await db
+ .select()
+ .from(productTagInfo)
+ .where(eq(productTagInfo.isDashboardTag, true))
+ .orderBy(productTagInfo.tagName);
+
+ // Generate signed URLs for tag images
+ const tagsWithSignedUrls = await Promise.all(
+ tags.map(async (tag) => ({
+ ...tag,
+ imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,
+ }))
+ );
+
+ return {
+ tags: tagsWithSignedUrls,
+ };
+ }),
+
+ getProductDetails: publicProcedure
+ .input(z.object({
+ id: z.string().regex(/^\d+$/, 'Invalid product ID'),
+ }))
+ .query(async ({ input }) => {
+ const { id } = input;
+ const productId = parseInt(id);
+
+ if (isNaN(productId)) {
+ throw new Error('Invalid product ID');
+ }
+
+ // Fetch product with unit information
+ const productData = await db
+ .select({
+ id: productInfo.id,
+ name: productInfo.name,
+ shortDescription: productInfo.shortDescription,
+ longDescription: productInfo.longDescription,
+ price: productInfo.price,
+ marketPrice: productInfo.marketPrice,
+ images: productInfo.images,
+ isOutOfStock: productInfo.isOutOfStock,
+ storeId: productInfo.storeId,
+ unitShortNotation: units.shortNotation,
+ isFlashAvailable: productInfo.isFlashAvailable,
+ flashPrice: productInfo.flashPrice,
+ })
+ .from(productInfo)
+ .innerJoin(units, eq(productInfo.unitId, units.id))
+ .where(eq(productInfo.id, productId))
+ .limit(1);
+
+ if (productData.length === 0) {
+ throw new Error('Product not found');
+ }
+
+ const product = productData[0];
+
+ // Fetch store info for this product
+ const storeData = product.storeId ? await db.query.storeInfo.findFirst({
+ where: eq(storeInfo.id, product.storeId),
+ columns: { id: true, name: true, description: true },
+ }) : null;
+
+ // Fetch delivery slots for this product
+ const deliverySlotsData = await db
+ .select({
+ id: deliverySlotInfo.id,
+ deliveryTime: deliverySlotInfo.deliveryTime,
+ freezeTime: deliverySlotInfo.freezeTime,
+ })
+ .from(productSlots)
+ .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))
+ .where(
+ and(
+ eq(productSlots.productId, productId),
+ eq(deliverySlotInfo.isActive, true),
+ gt(deliverySlotInfo.deliveryTime, sql`NOW()`)
+ )
+ )
+ .orderBy(deliverySlotInfo.deliveryTime);
+
+ // Fetch special deals for this product
+ const specialDealsData = await db
+ .select({
+ quantity: specialDeals.quantity,
+ price: specialDeals.price,
+ validTill: specialDeals.validTill,
+ })
+ .from(specialDeals)
+ .where(
+ and(
+ eq(specialDeals.productId, productId),
+ gt(specialDeals.validTill, sql`NOW()`)
+ )
+ )
+ .orderBy(specialDeals.quantity);
+
+ // Generate signed URLs for images
+ const signedImages = await generateSignedUrlsFromS3Urls((product.images as string[]) || []);
+
+ const response = {
+ id: product.id,
+ name: product.name,
+ shortDescription: product.shortDescription,
+ longDescription: product.longDescription,
+ price: product.price,
+ marketPrice: product.marketPrice,
+ unit: product.unitShortNotation,
+ images: signedImages,
+ isOutOfStock: product.isOutOfStock,
+ isFlashAvailable: product.isFlashAvailable,
+ flashPrice: product.flashPrice,
+ store: storeData ? {
+ id: storeData.id,
+ name: storeData.name,
+ description: storeData.description,
+ } : null,
+ deliverySlots: deliverySlotsData,
+ specialPackageDeals: specialDealsData,
+ };
+
+ return response;
+ }),
+
+ getProductReviews: publicProcedure
+ .input(z.object({
+ productId: z.number().int().positive(),
+ limit: z.number().int().min(1).max(50).optional().default(10),
+ offset: z.number().int().min(0).optional().default(0),
+ }))
+ .query(async ({ input }) => {
+ const { productId, limit, offset } = input;
+
+ const reviews = await db
+ .select({
+ id: productReviews.id,
+ reviewBody: productReviews.reviewBody,
+ ratings: productReviews.ratings,
+ imageUrls: productReviews.imageUrls,
+ reviewTime: productReviews.reviewTime,
+ userName: users.name,
+ })
+ .from(productReviews)
+ .innerJoin(users, eq(productReviews.userId, users.id))
+ .where(eq(productReviews.productId, productId))
+ .orderBy(desc(productReviews.reviewTime))
+ .limit(limit)
+ .offset(offset);
+
+ // Generate signed URLs for images
+ const reviewsWithSignedUrls = await Promise.all(
+ reviews.map(async (review) => ({
+ ...review,
+ signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),
+ }))
+ );
+
+ // Check if more reviews exist
+ const totalCountResult = await db
+ .select({ count: sql`count(*)` })
+ .from(productReviews)
+ .where(eq(productReviews.productId, productId));
+
+ const totalCount = Number(totalCountResult[0].count);
+ const hasMore = offset + limit < totalCount;
+
+ return { reviews: reviewsWithSignedUrls, hasMore };
+ }),
+
+ createReview: protectedProcedure
+ .input(z.object({
+ productId: z.number().int().positive(),
+ reviewBody: z.string().min(1, 'Review body is required'),
+ ratings: z.number().int().min(1).max(5),
+ imageUrls: z.array(z.string()).optional().default([]),
+ uploadUrls: z.array(z.string()).optional().default([]),
+ }))
+ .mutation(async ({ input, ctx }) => {
+ const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input;
+ const userId = ctx.user.userId;
+
+ // Optional: Check if product exists
+ const product = await db.query.productInfo.findFirst({
+ where: eq(productInfo.id, productId),
+ });
+ if (!product) {
+ throw new ApiError('Product not found', 404);
+ }
+
+ // Insert review
+ const [newReview] = await db.insert(productReviews).values({
+ userId,
+ productId,
+ reviewBody,
+ ratings,
+ imageUrls: uploadUrls.map(item => extractKeyFromPresignedUrl(item)),
+ }).returning();
+
+ // Claim upload URLs
+ if (uploadUrls && uploadUrls.length > 0) {
+ try {
+ await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));
+ } catch (error) {
+ console.error('Error claiming upload URLs:', error);
+ // Don't fail the review creation
+ }
+ }
+
+ return { success: true, review: newReview };
+ }),
+
+ getAllProductsSummary: publicProcedure
+ .query(async () => {
+ const products = await db
+ .select({
+ id: productInfo.id,
+ name: productInfo.name,
+ price: productInfo.price,
+ marketPrice: productInfo.marketPrice,
+ images: productInfo.images,
+ isOutOfStock: productInfo.isOutOfStock,
+ storeId: productInfo.storeId,
+ unitShortNotation: units.shortNotation,
+ incrementStep: productInfo.incrementStep,
+ isFlashAvailable: productInfo.isFlashAvailable,
+ flashPrice: productInfo.flashPrice,
+ productQuantity: productInfo.productQuantity,
+ })
+ .from(productInfo)
+ .innerJoin(units, eq(productInfo.unitId, units.id));
+
+ // Generate signed URLs for images
+ const productsWithSignedUrls = await Promise.all(
+ products.map(async (product) => ({
+ id: product.id,
+ name: product.name,
+ price: product.price,
+ marketPrice: product.marketPrice,
+ unit: product.unitShortNotation,
+ isOutOfStock: product.isOutOfStock,
+ storeId: product.storeId,
+ images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),
+ incrementStep: product.incrementStep,
+ isFlashAvailable: product.isFlashAvailable,
+ flashPrice: product.flashPrice,
+ productQuantity: product.productQuantity,
+ }))
+ );
+
+ return productsWithSignedUrls;
+ }),
+
+ productMega: publicProcedure
+ .query(async () => {
+ // Fetch all products with unit info
+ const productsData = await db
+ .select({
+ id: productInfo.id,
+ name: productInfo.name,
+ shortDescription: productInfo.shortDescription,
+ longDescription: productInfo.longDescription,
+ price: productInfo.price,
+ marketPrice: productInfo.marketPrice,
+ images: productInfo.images,
+ isOutOfStock: productInfo.isOutOfStock,
+ storeId: productInfo.storeId,
+ unitShortNotation: units.shortNotation,
+ })
+ .from(productInfo)
+ .innerJoin(units, eq(productInfo.unitId, units.id));
+
+ // Fetch all stores
+ const allStores = await db.query.storeInfo.findMany({
+ columns: { id: true, name: true, description: true },
+ });
+ const storeMap = new Map(allStores.map(s => [s.id, s]));
+
+ // Fetch all delivery slots for all products
+ const allDeliverySlots = await db
+ .select({
+ productId: productSlots.productId,
+ id: deliverySlotInfo.id,
+ deliveryTime: deliverySlotInfo.deliveryTime,
+ freezeTime: deliverySlotInfo.freezeTime,
+ })
+ .from(productSlots)
+ .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))
+ .where(
+ and(
+ eq(deliverySlotInfo.isActive, true),
+ gt(deliverySlotInfo.deliveryTime, sql`NOW()`)
+ )
+ )
+ .orderBy(deliverySlotInfo.deliveryTime);
+
+ // Group by productId
+ const deliverySlotsMap = new Map();
+ for (const slot of allDeliverySlots) {
+ if (!deliverySlotsMap.has(slot.productId)) {
+ deliverySlotsMap.set(slot.productId, []);
+ }
+ deliverySlotsMap.get(slot.productId)!.push(slot);
+ }
+
+
+
+ // Build the response
+ const response = await Promise.all(
+ productsData.map(async (product) => {
+ const signedImages = await generateSignedUrlsFromS3Urls((product.images as string[]) || []);
+ const store = product.storeId ? storeMap.get(product.storeId) || null : null;
+ const deliverySlots = deliverySlotsMap.get(product.id) || [];
+
+ return {
+ id: product.id,
+ name: product.name,
+ shortDescription: product.shortDescription,
+ longDescription: product.longDescription,
+ price: product.price,
+ marketPrice: product.marketPrice,
+ unit: product.unitShortNotation,
+ images: signedImages,
+ isOutOfStock: product.isOutOfStock,
+ store: store ? {
+ id: store.id,
+ name: store.name,
+ description: store.description,
+ } : null,
+ deliverySlots: deliverySlots.map(s => ({ id: s.id, deliveryTime: s.deliveryTime, freezeTime: s.freezeTime })),
+ specialPackageDeals: [], // Empty since not fetching
+ };
+ })
+ );
+
+ return response;
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/slots.ts b/apps/backend/src/trpc/user-apis/slots.ts
new file mode 100644
index 0000000..c0511a8
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/slots.ts
@@ -0,0 +1,148 @@
+import { router, publicProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { deliverySlotInfo, productSlots, productInfo, units } from '../../db/schema';
+import { eq, and, gt, asc } from 'drizzle-orm';
+import { generateSignedUrlsFromS3Urls } from '../../lib/s3-client';
+
+// Helper method to get formatted slot data by ID
+async function getSlotData(slotId: number) {
+ const slot = await db.query.deliverySlotInfo.findFirst({
+ where: eq(deliverySlotInfo.id, slotId),
+ with: {
+ productSlots: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ store: true,
+ },
+ },
+ },
+ },
+ },
+ });
+
+ if (!slot) {
+ return null; // Slot not found
+ }
+
+ // Filter out out-of-stock products and format to match home page display structure
+ const products = await Promise.all(
+ slot.productSlots
+ .filter(productSlot => !productSlot.product.isOutOfStock)
+ .map(async (productSlot) => ({
+ id: productSlot.product.id,
+ name: productSlot.product.name,
+ price: productSlot.product.price,
+ unit: productSlot.product.unit?.shortNotation || 'unit',
+ images: await generateSignedUrlsFromS3Urls(
+ (productSlot.product.images as string[]) || []
+ ),
+ isOutOfStock: productSlot.product.isOutOfStock,
+ storeId: productSlot.product.storeId,
+ nextDeliveryDate: slot.deliveryTime, // For home page compatibility
+ }))
+ );
+
+ return {
+ deliveryTime: slot.deliveryTime,
+ freezeTime: slot.freezeTime,
+ slotId: slot.id,
+ products,
+ };
+}
+
+export const slotsRouter = router({
+ getSlots: publicProcedure
+ .query(async () => {
+ const slots = await db.query.deliverySlotInfo.findMany({
+ where: eq(deliverySlotInfo.isActive, true),
+ });
+ return {
+ slots,
+ count: slots.length,
+ };
+ }),
+
+ getSlotsWithProducts: publicProcedure
+ .query(async () => {
+ const now = new Date();
+
+ // Fetch active delivery slots with future delivery times
+ const slots = await db.query.deliverySlotInfo.findMany({
+ where: and(
+ eq(deliverySlotInfo.isActive, true),
+ gt(deliverySlotInfo.deliveryTime, now) // Only future slots
+ ),
+ with: {
+ productSlots: {
+ with: {
+ product: {
+ with: {
+ unit: true,
+ },
+ },
+ },
+ },
+ },
+ orderBy: asc(deliverySlotInfo.deliveryTime),
+ });
+
+ // Transform data for frontend
+ const slotsWithProducts = await Promise.all(
+ slots.map(async (slot) => ({
+ id: slot.id,
+ deliveryTime: slot.deliveryTime,
+ freezeTime: slot.freezeTime,
+ isActive: slot.isActive,
+ products: await Promise.all(
+ slot.productSlots.map(async (productSlot) => ({
+ id: productSlot.product.id,
+ name: productSlot.product.name,
+ shortDescription: productSlot.product.shortDescription,
+ price: productSlot.product.price,
+ marketPrice: productSlot.product.marketPrice,
+ unit: productSlot.product.unit?.shortNotation,
+ images: await generateSignedUrlsFromS3Urls(
+ (productSlot.product.images as string[]) || []
+ ),
+ isOutOfStock: productSlot.product.isOutOfStock,
+ }))
+ ),
+ }))
+ );
+
+ return {
+ slots: slotsWithProducts,
+ count: slotsWithProducts.length,
+ };
+ }),
+
+ nextMajorDelivery: publicProcedure
+ .query(async () => {
+ const now = new Date();
+
+ // Find the next upcoming active delivery slot ID
+ const nextSlot = await db.query.deliverySlotInfo.findFirst({
+ where: and(
+ eq(deliverySlotInfo.isActive, true),
+ gt(deliverySlotInfo.deliveryTime, now)
+ ),
+ orderBy: asc(deliverySlotInfo.deliveryTime),
+ });
+
+ if (!nextSlot) {
+ return null; // No upcoming delivery slots
+ }
+
+ // Get formatted data using helper method
+ return await getSlotData(nextSlot.id);
+ }),
+
+ getSlotById: publicProcedure
+ .input(z.object({ slotId: z.number() }))
+ .query(async ({ input }) => {
+ return await getSlotData(input.slotId);
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/stores.ts b/apps/backend/src/trpc/user-apis/stores.ts
new file mode 100644
index 0000000..4a25a0c
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/stores.ts
@@ -0,0 +1,141 @@
+import { router, publicProcedure } from '../trpc-index';
+import { z } from 'zod';
+import { db } from '../../db/db_index';
+import { storeInfo, productInfo, units } from '../../db/schema';
+import { eq, and, sql } from 'drizzle-orm';
+import { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url } from '../../lib/s3-client';
+import { ApiError } from '../../lib/api-error';
+
+export const storesRouter = router({
+ getStores: publicProcedure
+ .query(async () => {
+ const storesData = await db
+ .select({
+ id: storeInfo.id,
+ name: storeInfo.name,
+ description: storeInfo.description,
+ imageUrl: storeInfo.imageUrl,
+ productCount: sql`count(${productInfo.id})`.as('productCount'),
+ })
+ .from(storeInfo)
+ .leftJoin(
+ productInfo,
+ and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))
+ )
+ .groupBy(storeInfo.id);
+
+ // Generate signed URLs for store images and fetch sample products
+ const storesWithDetails = await Promise.all(
+ storesData.map(async (store) => {
+ const signedImageUrl = store.imageUrl ? await generateSignedUrlFromS3Url(store.imageUrl) : null;
+
+ // Fetch up to 3 products for this store
+ const sampleProducts = await db
+ .select({
+ id: productInfo.id,
+ name: productInfo.name,
+ images: productInfo.images,
+ })
+ .from(productInfo)
+ .where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false)))
+ .limit(3);
+
+ // Generate signed URLs for product images
+ const productsWithSignedUrls = await Promise.all(
+ sampleProducts.map(async (product) => {
+ const images = product.images as string[];
+ return {
+ id: product.id,
+ name: product.name,
+ signedImageUrl: (images && images.length > 0) ? await generateSignedUrlFromS3Url(images[0]) : null,
+ };
+ })
+ );
+
+ return {
+ id: store.id,
+ name: store.name,
+ description: store.description,
+ signedImageUrl,
+ productCount: store.productCount,
+ sampleProducts: productsWithSignedUrls,
+ };
+ })
+ );
+
+ return {
+ stores: storesWithDetails,
+ };
+ }),
+
+ getStoreWithProducts: publicProcedure
+ .input(z.object({
+ storeId: z.number(),
+ }))
+ .query(async ({ input }) => {
+ const { storeId } = input;
+
+ // Fetch store info
+ const storeData = await db.query.storeInfo.findFirst({
+ where: eq(storeInfo.id, storeId),
+ columns: {
+ id: true,
+ name: true,
+ description: true,
+ imageUrl: true,
+ },
+ });
+
+ if (!storeData) {
+ throw new ApiError('Store not found', 404);
+ }
+
+ // Generate signed URL for store image
+ const signedImageUrl = storeData.imageUrl ? await generateSignedUrlFromS3Url(storeData.imageUrl) : null;
+
+ // Fetch products for this store
+ const productsData = await db
+ .select({
+ id: productInfo.id,
+ name: productInfo.name,
+ shortDescription: productInfo.shortDescription,
+ price: productInfo.price,
+ marketPrice: productInfo.marketPrice,
+ images: productInfo.images,
+ isOutOfStock: productInfo.isOutOfStock,
+ incrementStep: productInfo.incrementStep,
+ unitShortNotation: units.shortNotation,
+ productQuantity: productInfo.productQuantity,
+ })
+ .from(productInfo)
+ .innerJoin(units, eq(productInfo.unitId, units.id))
+ .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)));
+
+
+ // Generate signed URLs for product images
+ const productsWithSignedUrls = await Promise.all(
+ productsData.map(async (product) => ({
+ id: product.id,
+ name: product.name,
+ shortDescription: product.shortDescription,
+ price: product.price,
+ marketPrice: product.marketPrice,
+ incrementStep: product.incrementStep,
+ unit: product.unitShortNotation,
+ images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),
+ isOutOfStock: product.isOutOfStock,
+ productQuantity: product.productQuantity
+ }))
+ );
+
+ return {
+ store: {
+ id: storeData.id,
+ name: storeData.name,
+ description: storeData.description,
+ signedImageUrl,
+ },
+ products: productsWithSignedUrls,
+ };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/user-trpc-index.ts b/apps/backend/src/trpc/user-apis/user-trpc-index.ts
new file mode 100644
index 0000000..247edee
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/user-trpc-index.ts
@@ -0,0 +1,32 @@
+import { router } from '../trpc-index';
+import { addressRouter } from './address';
+import { authRouter } from './auth';
+import { bannerRouter } from './banners';
+import { cartRouter } from './cart';
+import { complaintRouter } from './complaint';
+import { orderRouter } from './order';
+import { productRouter } from './product';
+import { slotsRouter } from './slots';
+import { userRouter as userDataRouter } from './user';
+import { userCouponRouter } from './coupon';
+import { paymentRouter } from './payments';
+import { storesRouter } from './stores';
+import { fileUploadRouter } from './file-upload';
+
+export const userRouter = router({
+ address: addressRouter,
+ auth: authRouter,
+ banner: bannerRouter,
+ cart: cartRouter,
+ complaint: complaintRouter,
+ order: orderRouter,
+ product: productRouter,
+ slots: slotsRouter,
+ user: userDataRouter,
+ coupon: userCouponRouter,
+ payment: paymentRouter,
+ stores: storesRouter,
+ fileUpload: fileUploadRouter,
+});
+
+export type UserRouter = typeof userRouter;
\ No newline at end of file
diff --git a/apps/backend/src/trpc/user-apis/user.ts b/apps/backend/src/trpc/user-apis/user.ts
new file mode 100644
index 0000000..1d7de74
--- /dev/null
+++ b/apps/backend/src/trpc/user-apis/user.ts
@@ -0,0 +1,110 @@
+import { router, protectedProcedure } from '../trpc-index';
+import jwt from 'jsonwebtoken';
+import { eq } from 'drizzle-orm';
+import { db } from '../../db/db_index';
+import { users, userDetails, userCreds } from '../../db/schema';
+import { ApiError } from '../../lib/api-error';
+import { jwtSecret } from 'src/lib/env-exporter';
+import { generateSignedUrlFromS3Url } from '../../lib/s3-client';
+
+interface AuthResponse {
+ token: string;
+ user: {
+ id: number;
+ name: string | null;
+ email: string | null;
+ mobile: string | null;
+ profileImage?: string | null;
+ bio?: string | null;
+ dateOfBirth?: string | null;
+ gender?: string | null;
+ occupation?: string | null;
+ };
+}
+
+const generateToken = (userId: number): string => {
+ const secret = jwtSecret;
+ if (!secret) {
+ throw new ApiError('JWT secret not configured', 500);
+ }
+
+ return jwt.sign({ userId }, secret, { expiresIn: '7d' });
+};
+
+export const userRouter = router({
+ getSelfData: protectedProcedure
+ .query(async ({ ctx }) => {
+ const userId = ctx.user.userId;
+
+ if (!userId) {
+ throw new ApiError('User not authenticated', 401);
+ }
+
+ const [user] = await db
+ .select()
+ .from(users)
+ .where(eq(users.id, userId))
+ .limit(1);
+
+ if (!user) {
+ throw new ApiError('User not found', 404);
+ }
+
+ // Get user details for profile image
+ const [userDetail] = await db
+ .select()
+ .from(userDetails)
+ .where(eq(userDetails.userId, userId))
+ .limit(1);
+
+ // Generate signed URL for profile image if it exists
+ const profileImageSignedUrl = userDetail?.profileImage
+ ? await generateSignedUrlFromS3Url(userDetail.profileImage)
+ : null;
+
+ const response: Omit = {
+ user: {
+ id: user.id,
+ name: user.name,
+ email: user.email,
+ mobile: user.mobile,
+ profileImage: profileImageSignedUrl,
+ bio: userDetail?.bio || null,
+ dateOfBirth: userDetail?.dateOfBirth || null,
+ gender: userDetail?.gender || null,
+ occupation: userDetail?.occupation || null,
+ },
+ };
+
+ return {
+ success: true,
+ data: response,
+ };
+ }),
+
+ checkProfileComplete: protectedProcedure
+ .query(async ({ ctx }) => {
+ const userId = ctx.user.userId;
+
+ if (!userId) {
+ throw new ApiError('User not authenticated', 401);
+ }
+
+ const result = await db
+ .select()
+ .from(users)
+ .leftJoin(userCreds, eq(users.id, userCreds.userId))
+ .where(eq(users.id, userId))
+ .limit(1);
+
+ if (result.length === 0) {
+ throw new ApiError('User not found', 404);
+ }
+
+ const { users: user, user_creds: creds } = result[0];
+
+ return {
+ isComplete: !!(user.name && user.email && creds),
+ };
+ }),
+});
\ No newline at end of file
diff --git a/apps/backend/src/uv-apis/auth.controller.ts b/apps/backend/src/uv-apis/auth.controller.ts
new file mode 100644
index 0000000..6bb54f9
--- /dev/null
+++ b/apps/backend/src/uv-apis/auth.controller.ts
@@ -0,0 +1,321 @@
+import { Request, Response, NextFunction } from 'express';
+import bcrypt from 'bcryptjs';
+import jwt from 'jsonwebtoken';
+import { eq } from 'drizzle-orm';
+import { db } from '../db/db_index';
+import { users, userCreds, userDetails } from '../db/schema';
+import { ApiError } from '../lib/api-error';
+import catchAsync from '../lib/catch-async';
+import { jwtSecret } from 'src/lib/env-exporter';
+import uploadHandler from '../lib/upload-handler';
+import { imageUploadS3, generateSignedUrlFromS3Url } from '../lib/s3-client';
+
+interface RegisterRequest {
+ name: string;
+ email: string;
+ mobile: string;
+ password: string;
+ profileImage?: string;
+}
+
+interface UpdateProfileRequest {
+ name?: string;
+ email?: string;
+ mobile?: string;
+ password?: string;
+ bio?: string;
+ dateOfBirth?: string;
+ gender?: string;
+ occupation?: string;
+}
+
+interface AuthResponse {
+ token: string;
+ user: {
+ id: number;
+ name: string | null;
+ email: string | null;
+ mobile: string | null;
+ profileImage?: string | null;
+ bio?: string | null;
+ dateOfBirth?: string | null;
+ gender?: string | null;
+ occupation?: string | null;
+ };
+}
+
+const generateToken = (userId: number): string => {
+ const secret = jwtSecret;
+ if (!secret) {
+ throw new ApiError('JWT secret not configured', 500);
+ }
+
+ return jwt.sign({ userId }, secret, { expiresIn: '7d' });
+};
+
+export const register = catchAsync(async (req: Request, res: Response, next: NextFunction) => {
+ const { name, email, mobile, password }: RegisterRequest = req.body;
+
+ // Handle profile image upload
+ let profileImageUrl: string | undefined;
+ if (req.file) {
+ const key = `profile-images/${Date.now()}-${req.file.originalname}`;
+ profileImageUrl = await imageUploadS3(req.file.buffer, req.file.mimetype, key);
+ }
+
+ if (!name || !email || !mobile || !password) {
+ throw new ApiError('All fields are required', 400);
+ }
+
+ // Validate email format
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
+ if (!emailRegex.test(email)) {
+ throw new ApiError('Invalid email format', 400);
+ }
+
+ // Validate mobile format (Indian mobile numbers)
+ const cleanMobile = mobile.replace(/\D/g, '');
+ if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {
+ throw new ApiError('Invalid mobile number', 400);
+ }
+
+ // Check if email already exists
+ const [existingEmail] = await db
+ .select()
+ .from(users)
+ .where(eq(users.email, email.toLowerCase()))
+ .limit(1);
+
+ if (existingEmail) {
+ throw new ApiError('Email already registered', 409);
+ }
+
+ // Check if mobile already exists
+ const [existingMobile] = await db
+ .select()
+ .from(users)
+ .where(eq(users.mobile, cleanMobile))
+ .limit(1);
+
+ if (existingMobile) {
+ throw new ApiError('Mobile number already registered', 409);
+ }
+
+ // Hash password
+ const hashedPassword = await bcrypt.hash(password, 12);
+
+ // Create user and credentials in a transaction
+ const newUser = await db.transaction(async (tx) => {
+ // Create user
+ const [user] = await tx
+ .insert(users)
+ .values({
+ name: name.trim(),
+ email: email.toLowerCase().trim(),
+ mobile: cleanMobile,
+ })
+ .returning();
+
+ // Create user credentials
+ await tx
+ .insert(userCreds)
+ .values({
+ userId: user.id,
+ userPassword: hashedPassword,
+ });
+
+ // Create user details with profile image
+ await tx
+ .insert(userDetails)
+ .values({
+ userId: user.id,
+ profileImage: profileImageUrl,
+ });
+
+ return user;
+ });
+
+ const token = generateToken(newUser.id);
+
+ // Generate signed URL for profile image if it was uploaded
+ const profileImageSignedUrl = profileImageUrl
+ ? await generateSignedUrlFromS3Url(profileImageUrl)
+ : null;
+
+ const response: AuthResponse = {
+ token,
+ user: {
+ id: newUser.id,
+ name: newUser.name,
+ email: newUser.email,
+ mobile: newUser.mobile,
+ profileImage: profileImageSignedUrl,
+ bio: null,
+ dateOfBirth: null,
+ gender: null,
+ occupation: null,
+ },
+ };
+
+ res.status(201).json({
+ success: true,
+ data: response,
+ });
+});
+
+export const updateProfile = catchAsync(async (req: Request, res: Response, next: NextFunction) => {
+ const userId = req.user?.userId;
+
+ if (!userId) {
+ throw new ApiError('User not authenticated', 401);
+ }
+
+ const { name, email, mobile, password, bio, dateOfBirth, gender, occupation }: UpdateProfileRequest = req.body;
+
+ // Handle profile image upload
+ let profileImageUrl: string | undefined;
+ if (req.file) {
+ const key = `profile-images/${Date.now()}-${req.file.originalname}`;
+ profileImageUrl = await imageUploadS3(req.file.buffer, req.file.mimetype, key);
+ }
+
+ // Validate email format if provided
+ if (email) {
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
+ if (!emailRegex.test(email)) {
+ throw new ApiError('Invalid email format', 400);
+ }
+ }
+
+ // Validate mobile format if provided
+ if (mobile) {
+ const cleanMobile = mobile.replace(/\D/g, '');
+ if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {
+ throw new ApiError('Invalid mobile number', 400);
+ }
+ }
+
+ // Check if email already exists (if changing email)
+ if (email) {
+ const [existingEmail] = await db
+ .select()
+ .from(users)
+ .where(eq(users.email, email.toLowerCase()))
+ .limit(1);
+
+ if (existingEmail && existingEmail.id !== userId) {
+ throw new ApiError('Email already registered', 409);
+ }
+ }
+
+ // Check if mobile already exists (if changing mobile)
+ if (mobile) {
+ const cleanMobile = mobile.replace(/\D/g, '');
+ const [existingMobile] = await db
+ .select()
+ .from(users)
+ .where(eq(users.mobile, cleanMobile))
+ .limit(1);
+
+ if (existingMobile && existingMobile.id !== userId) {
+ throw new ApiError('Mobile number already registered', 409);
+ }
+ }
+
+ // Update user and user details in a transaction
+ const updatedUser = await db.transaction(async (tx) => {
+ // Update user table
+ const updateData: any = {};
+ if (name) updateData.name = name.trim();
+ if (email) updateData.email = email.toLowerCase().trim();
+ if (mobile) updateData.mobile = mobile.replace(/\D/g, '');
+
+ if (Object.keys(updateData).length > 0) {
+ await tx
+ .update(users)
+ .set(updateData)
+ .where(eq(users.id, userId));
+ }
+
+ // Update password if provided
+ if (password) {
+ const hashedPassword = await bcrypt.hash(password, 12);
+ await tx
+ .update(userCreds)
+ .set({ userPassword: hashedPassword })
+ .where(eq(userCreds.userId, userId));
+ }
+
+ // Update or insert user details
+ const userDetailsUpdate: any = {};
+ if (bio !== undefined) userDetailsUpdate.bio = bio;
+ if (dateOfBirth !== undefined) userDetailsUpdate.dateOfBirth = dateOfBirth ? new Date(dateOfBirth) : null;
+ if (gender !== undefined) userDetailsUpdate.gender = gender;
+ if (occupation !== undefined) userDetailsUpdate.occupation = occupation;
+ if (profileImageUrl) userDetailsUpdate.profileImage = profileImageUrl;
+ userDetailsUpdate.updatedAt = new Date();
+
+ // Check if user details record exists
+ const [existingDetails] = await tx
+ .select()
+ .from(userDetails)
+ .where(eq(userDetails.userId, userId))
+ .limit(1);
+
+ if (existingDetails) {
+ // Update existing record
+ await tx
+ .update(userDetails)
+ .set(userDetailsUpdate)
+ .where(eq(userDetails.userId, userId));
+ } else {
+ // Create new record
+ userDetailsUpdate.userId = userId;
+ userDetailsUpdate.createdAt = new Date();
+ await tx
+ .insert(userDetails)
+ .values(userDetailsUpdate);
+ }
+
+ // Return updated user data
+ const [user] = await tx
+ .select()
+ .from(users)
+ .where(eq(users.id, userId))
+ .limit(1);
+
+ return user;
+ });
+
+ // Get updated user details for response
+ const [userDetail] = await db
+ .select()
+ .from(userDetails)
+ .where(eq(userDetails.userId, userId))
+ .limit(1);
+
+ // Generate signed URL for profile image if it exists
+ const profileImageSignedUrl = userDetail?.profileImage
+ ? await generateSignedUrlFromS3Url(userDetail.profileImage)
+ : null;
+
+ const response: AuthResponse = {
+ token: req.headers.authorization?.replace('Bearer ', '') || '', // Keep existing token
+ user: {
+ id: updatedUser.id,
+ name: updatedUser.name,
+ email: updatedUser.email,
+ mobile: updatedUser.mobile,
+ profileImage: profileImageSignedUrl,
+ bio: userDetail?.bio || null,
+ dateOfBirth: userDetail?.dateOfBirth || null,
+ gender: userDetail?.gender || null,
+ occupation: userDetail?.occupation || null,
+ },
+ };
+
+ res.status(200).json({
+ success: true,
+ data: response,
+ });
+});
\ No newline at end of file
diff --git a/apps/backend/src/uv-apis/auth.router.ts b/apps/backend/src/uv-apis/auth.router.ts
new file mode 100644
index 0000000..829e5cd
--- /dev/null
+++ b/apps/backend/src/uv-apis/auth.router.ts
@@ -0,0 +1,12 @@
+import { Router } from 'express';
+import { register, updateProfile } from './auth.controller';
+import { verifyToken } from '../middleware/auth';
+import uploadHandler from '../lib/upload-handler';
+
+const router = Router();
+
+router.post('/register', uploadHandler.single('profileImage'), register);
+router.put('/profile', verifyToken, uploadHandler.single('profileImage'), updateProfile);
+
+const authRouter = router;
+export default authRouter;
\ No newline at end of file
diff --git a/apps/backend/src/uv-apis/user-rest.controller.ts b/apps/backend/src/uv-apis/user-rest.controller.ts
new file mode 100644
index 0000000..c4e08c2
--- /dev/null
+++ b/apps/backend/src/uv-apis/user-rest.controller.ts
@@ -0,0 +1,57 @@
+import { Request, Response, NextFunction } from 'express';
+import { db } from '../db/db_index';
+import { complaints } from '../db/schema';
+import { ApiError } from '../lib/api-error';
+import catchAsync from '../lib/catch-async';
+import { imageUploadS3 } from '../lib/s3-client';
+
+interface RaiseComplaintRequest {
+ orderId?: string;
+ complaintBody: string;
+}
+
+export const raiseComplaint = catchAsync(async (req: Request, res: Response, next: NextFunction) => {
+ console.log('raising complaint')
+
+ const userId = req.user?.userId;
+
+ if (!userId) {
+ throw new ApiError('User not authenticated', 401);
+ }
+
+ const { orderId, complaintBody }: RaiseComplaintRequest = req.body;
+
+ let orderIdNum: number | null = null;
+
+ if (orderId) {
+ const readableIdMatch = orderId.match(/^ORD(\d+)$/);
+ if (readableIdMatch) {
+ orderIdNum = parseInt(readableIdMatch[1]);
+ }
+ }
+
+ // Handle image uploads
+ const images = (req.files as Express.Multer.File[])?.filter(item => item.fieldname === 'images');
+ let uploadedImageUrls: string[] = [];
+
+ if (images && Array.isArray(images)) {
+ const imageUploadPromises = images.map((file, index) => {
+ const key = `complaint-images/${Date.now()}-${index}`;
+ return imageUploadS3(file.buffer, file.mimetype, key);
+ });
+
+ uploadedImageUrls = await Promise.all(imageUploadPromises);
+ }
+
+ await db.insert(complaints).values({
+ userId,
+ orderId: orderIdNum,
+ complaintBody: complaintBody.trim(),
+ images: uploadedImageUrls.length > 0 ? uploadedImageUrls : null,
+ });
+
+ res.status(200).json({
+ success: true,
+ message: 'Complaint raised successfully'
+ });
+});
\ No newline at end of file
diff --git a/apps/backend/src/uv-apis/uv-router.ts b/apps/backend/src/uv-apis/uv-router.ts
new file mode 100644
index 0000000..28a71fe
--- /dev/null
+++ b/apps/backend/src/uv-apis/uv-router.ts
@@ -0,0 +1,12 @@
+import { Router } from "express";
+import authRouter from "./auth.router";
+import { raiseComplaint } from "./user-rest.controller";
+import uploadHandler from "src/lib/upload-handler";
+
+const router = Router();
+
+router.use("/auth", authRouter);
+router.use("/complaints/raise", uploadHandler.array('images'),raiseComplaint)
+
+const uvRouter = router;
+export default uvRouter;
\ No newline at end of file
diff --git a/apps/backend/src/v1-router.ts b/apps/backend/src/v1-router.ts
new file mode 100644
index 0000000..8af0e58
--- /dev/null
+++ b/apps/backend/src/v1-router.ts
@@ -0,0 +1,15 @@
+ import { Router } from "express";
+ import avRouter from "./admin-apis/av-router";
+ import commonRouter from "./common-apis/common.router";
+ import uvRouter from "./uv-apis/uv-router";
+
+const router = Router();
+
+ router.use('/av', avRouter);
+ router.use('/cm', commonRouter);
+ router.use('/uv', uvRouter);
+
+
+const v1Router = router;
+
+export default v1Router;
\ No newline at end of file
diff --git a/apps/backend/tsconfig.json b/apps/backend/tsconfig.json
new file mode 100755
index 0000000..c6bb974
--- /dev/null
+++ b/apps/backend/tsconfig.json
@@ -0,0 +1,119 @@
+{
+ "compilerOptions": {
+ /* Visit https://aka.ms/tsconfig to read more about this file */
+
+ /* Projects */
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
+
+ /* Language and Environment */
+ "target": "es2020", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
+ // "libReplacement": true, /* Enable lib replacement. */
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
+
+ /* Modules */
+ "module": "commonjs",
+ "baseUrl": ".",
+ "paths": {
+ "shared-types": ["../shared-types"],
+ "@commonTypes": ["../../packages/ui/shared-types"],
+ "@commonTypes/*": ["../../packages/ui/shared-types/*"]
+ },
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
+ // "typeRoots": [""], /* Specify multiple folders that act like './node_modules/@types'. */
+ "typeRoots": ["./node_modules/@types", "../shared-types"],
+
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
+ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
+ // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
+ "resolveJsonModule": true, /* Enable importing .json files. */
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
+ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */
+
+ /* JavaScript Support */
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
+
+ /* Emit */
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
+ // "noEmit": true, /* Disable emitting files from a compilation. */
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
+ "outDir": "./dist", /* Specify an output folder for all emitted files. */
+ // "removeComments": true, /* Disable emitting comments. */
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
+
+ /* Interop Constraints */
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
+ // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
+
+ /* Type Checking */
+ "strict": true, /* Enable all strict type-checking options. */
+ // "strictNullChecks": false, /* When type checking, take into account 'null' and 'undefined'. */
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
+ // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
+
+ /* Completeness */
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
+ },
+ "include": ["src", "types", "index.ts", "../shared-types"]
+}
diff --git a/apps/fallback-ui/components.json b/apps/fallback-ui/components.json
new file mode 100644
index 0000000..07bc023
--- /dev/null
+++ b/apps/fallback-ui/components.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "https://ui.shadcn.com/schema.json",
+ "style": "new-york",
+ "rsc": false,
+ "tsx": true,
+ "tailwind": {
+ "config": "tailwind.config.ts",
+ "css": "src/index.css",
+ "baseColor": "slate",
+ "cssVariables": true
+ },
+ "aliases": {
+ "components": "@/components",
+ "utils": "@/lib/utils"
+ }
+}
diff --git a/apps/fallback-ui/env.d.ts b/apps/fallback-ui/env.d.ts
new file mode 100644
index 0000000..11f02fe
--- /dev/null
+++ b/apps/fallback-ui/env.d.ts
@@ -0,0 +1 @@
+///
diff --git a/apps/fallback-ui/eslint.config.js b/apps/fallback-ui/eslint.config.js
new file mode 100644
index 0000000..21c8f61
--- /dev/null
+++ b/apps/fallback-ui/eslint.config.js
@@ -0,0 +1,34 @@
+import eslint from '@eslint/js'
+import tseslint from 'typescript-eslint'
+import reactHooks from 'eslint-plugin-react-hooks'
+import reactRefresh from 'eslint-plugin-react-refresh'
+
+export default tseslint.config(
+ {
+ ignores: ['dist']
+ },
+ {
+ extends: [
+ eslint.configs.recommended,
+ ...tseslint.configs.recommended
+ ],
+ files: ['src/**/*.{ts,tsx}'],
+ languageOptions: {
+ parserOptions: {
+ project: false
+ }
+ },
+ plugins: {
+ 'react-hooks': reactHooks,
+ 'react-refresh': reactRefresh
+ },
+ rules: {
+ 'react-hooks/rules-of-hooks': 'error',
+ 'react-hooks/exhaustive-deps': 'warn',
+ 'react-refresh/only-export-components': [
+ 'warn',
+ { allowConstantExport: true }
+ ]
+ }
+ }
+)
diff --git a/apps/fallback-ui/index.html b/apps/fallback-ui/index.html
new file mode 100644
index 0000000..375e39a
--- /dev/null
+++ b/apps/fallback-ui/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Freshyo Admin
+
+
+
+
+
+
diff --git a/apps/fallback-ui/package.json b/apps/fallback-ui/package.json
new file mode 100644
index 0000000..4d7aa7b
--- /dev/null
+++ b/apps/fallback-ui/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "fallback-ui",
+ "version": "0.1.0",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "vite build",
+ "preview": "vite preview",
+ "lint": "eslint \"src/**/*.{ts,tsx}\""
+ },
+ "dependencies": {
+ "@radix-ui/react-slot": "^1.1.2",
+ "@tanstack/react-query": "^5.59.16",
+ "@tanstack/react-router": "^1.92.8",
+ "@tanstack/router-devtools": "^1.92.8",
+ "@trpc/client": "^11.6.0",
+ "@trpc/react-query": "^11.6.0",
+ "axios": "^1.7.9",
+ "class-variance-authority": "^0.7.0",
+ "clsx": "^2.1.1",
+ "formik": "^2.4.9",
+ "jwt-decode": "^4.0.0",
+ "react": "19.0.0",
+ "react-dom": "19.0.0",
+ "superjson": "^2.2.1",
+ "tailwind-merge": "^2.5.5",
+ "yup": "^1.7.1",
+ "zod": "^3.24.1",
+ "zustand": "^5.0.10"
+ },
+ "devDependencies": {
+ "@types/node": "^20.17.10",
+ "@types/react": "~19.0.10",
+ "@types/react-dom": "~19.0.4",
+ "@typescript-eslint/eslint-plugin": "^8.18.1",
+ "@typescript-eslint/parser": "^8.18.1",
+ "@vitejs/plugin-react-swc": "^3.7.2",
+ "autoprefixer": "^10.4.20",
+ "eslint": "^9.25.0",
+ "eslint-plugin-react-hooks": "^5.1.0",
+ "eslint-plugin-react-refresh": "^0.4.9",
+ "postcss": "^8.4.49",
+ "tailwindcss": "^3.4.16",
+ "tailwindcss-animate": "^1.0.7",
+ "typescript": "~5.8.3",
+ "vite": "^6.0.5"
+ }
+}
diff --git a/apps/fallback-ui/postcss.config.cjs b/apps/fallback-ui/postcss.config.cjs
new file mode 100644
index 0000000..85f717c
--- /dev/null
+++ b/apps/fallback-ui/postcss.config.cjs
@@ -0,0 +1,6 @@
+module.exports = {
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {}
+ }
+}
diff --git a/apps/fallback-ui/src/components/AuthWrapper.tsx b/apps/fallback-ui/src/components/AuthWrapper.tsx
new file mode 100644
index 0000000..4af3353
--- /dev/null
+++ b/apps/fallback-ui/src/components/AuthWrapper.tsx
@@ -0,0 +1,65 @@
+import { useEffect } from 'react'
+import { useNavigate } from '@tanstack/react-router'
+import { trpc } from '@/trpc/client'
+import { useUserStore } from '@/stores/userStore'
+import { getCurrentUserId } from '@/services/auth'
+
+interface AuthWrapperProps {
+ children: React.ReactNode
+}
+
+export function AuthWrapper({ children }: AuthWrapperProps) {
+ const navigate = useNavigate()
+ const { setUser, setLoading, setError, user, isLoading } = useUserStore()
+
+ const { data: staffData, isLoading: isStaffLoading, error: staffError } = trpc.admin.staffUser.getStaff.useQuery()
+
+ useEffect(() => {
+ const initializeAuth = async () => {
+ const userId = await getCurrentUserId()
+
+ if (!userId) {
+ navigate({ to: '/login' as any })
+ return
+ }
+
+ if (staffData && !isStaffLoading && !staffError) {
+ const currentUser = staffData.staff.find((staff: any) => staff.id === userId)
+
+ if (currentUser) {
+ setUser({
+ id: currentUser.id,
+ name: currentUser.name,
+ role: currentUser.role,
+ permissions: currentUser.permissions,
+ })
+ } else {
+ setError('User not found in staff list')
+ navigate({ to: '/login' as any })
+ }
+ } else if (staffError) {
+ setError('Failed to load user data')
+ navigate({ to: '/login' as any })
+ }
+ }
+
+ initializeAuth()
+ }, [staffData, isStaffLoading, staffError, navigate, setUser, setError])
+
+ if (isLoading || isStaffLoading) {
+ return (
+
+
+
+
Loading user data...
+
+
+ )
+ }
+
+ if (!user) {
+ return null // Will redirect
+ }
+
+ return <>{children}>
+}
\ No newline at end of file
diff --git a/apps/fallback-ui/src/components/StaffUserForm.tsx b/apps/fallback-ui/src/components/StaffUserForm.tsx
new file mode 100644
index 0000000..d83ba12
--- /dev/null
+++ b/apps/fallback-ui/src/components/StaffUserForm.tsx
@@ -0,0 +1,115 @@
+import { useState } from 'react';
+import { Formik, Form, Field, ErrorMessage } from 'formik';
+import * as Yup from 'yup';
+import { trpc } from '@/trpc/client';
+import { Button } from '@/components/ui/button';
+
+const validationSchema = Yup.object({
+ name: Yup.string()
+ .min(2, 'Name must be at least 2 characters')
+ .required('Name is required'),
+ password: Yup.string()
+ .min(6, 'Password must be at least 6 characters')
+ .required('Password is required'),
+ roleId: Yup.number()
+ .required('Role is required'),
+});
+
+interface StaffUserFormProps {
+ onSuccess?: () => void;
+}
+
+export function StaffUserForm({ onSuccess }: StaffUserFormProps) {
+ const createStaffMutation = trpc.admin.staffUser.createStaffUser.useMutation({
+ onSuccess: (data) => {
+ alert(`Staff user "${data.user.name}" created successfully!`);
+ onSuccess?.();
+ },
+ onError: (error: any) => {
+ alert(`Error: ${error.message}`);
+ }
+ });
+
+ // Fetch available roles
+ const { data: rolesData } = trpc.admin.staffUser.getRoles.useQuery();
+
+ // Filter out super_admin role from dropdown
+ const availableRoles = rolesData?.roles?.filter(role => role.name !== 'super_admin') || [];
+
+ return (
+
+
Add New Staff User
+
+
{
+ createStaffMutation.mutate({
+ name: values.name,
+ password: values.password,
+ roleId: parseInt(values.roleId),
+ });
+ resetForm();
+ }}
+ >
+ {({ isSubmitting }) => (
+
+ )}
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/fallback-ui/src/components/SuperAdminGuard.tsx b/apps/fallback-ui/src/components/SuperAdminGuard.tsx
new file mode 100644
index 0000000..1c1231e
--- /dev/null
+++ b/apps/fallback-ui/src/components/SuperAdminGuard.tsx
@@ -0,0 +1,28 @@
+import { useUserStore } from '@/stores/userStore';
+
+interface SuperAdminGuardProps {
+ children: React.ReactNode;
+}
+
+export function SuperAdminGuard({ children }: SuperAdminGuardProps) {
+ const { user } = useUserStore();
+ const allowedRoles = ['super_admin']; // Only super_admin role can access super admin features
+
+ if (!allowedRoles.includes(user?.role?.name || '')) {
+ return (
+
+
+
+
Access Denied
+
You don't have permission to access the super admin area.
+
+
+ );
+ }
+
+ return <>{children}>;
+}
\ No newline at end of file
diff --git a/apps/fallback-ui/src/components/ui/button.tsx b/apps/fallback-ui/src/components/ui/button.tsx
new file mode 100644
index 0000000..63760a8
--- /dev/null
+++ b/apps/fallback-ui/src/components/ui/button.tsx
@@ -0,0 +1,55 @@
+import * as React from 'react'
+import { Slot } from '@radix-ui/react-slot'
+import { cva, type VariantProps } from 'class-variance-authority'
+import { cn } from '@/lib/utils'
+
+const buttonVariants = cva(
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
+ {
+ variants: {
+ variant: {
+ default:
+ 'bg-slate-900 text-slate-50 shadow hover:bg-slate-900/90',
+ secondary:
+ 'bg-slate-100 text-slate-900 hover:bg-slate-200',
+ outline:
+ 'border border-slate-200 bg-white hover:bg-slate-100 hover:text-slate-900',
+ ghost:
+ 'hover:bg-slate-100 hover:text-slate-900',
+ destructive:
+ 'bg-red-500 text-white hover:bg-red-600',
+ link: 'text-slate-900 underline-offset-4 hover:underline'
+ },
+ size: {
+ default: 'h-10 px-4 py-2',
+ sm: 'h-9 rounded-md px-3',
+ lg: 'h-11 rounded-md px-8',
+ icon: 'h-10 w-10'
+ }
+ },
+ defaultVariants: {
+ variant: 'default',
+ size: 'default'
+ }
+ }
+)
+
+export interface ButtonProps
+ extends React.ButtonHTMLAttributes,
+ VariantProps {
+ asChild?: boolean
+}
+
+export const Button = React.forwardRef(
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
+ const Comp = asChild ? Slot : 'button'
+ return (
+
+ )
+ }
+)
+Button.displayName = 'Button'
diff --git a/apps/fallback-ui/src/constants.ts b/apps/fallback-ui/src/constants.ts
new file mode 100644
index 0000000..242ed1b
--- /dev/null
+++ b/apps/fallback-ui/src/constants.ts
@@ -0,0 +1,7 @@
+const webUiConstants = {
+ // baseUrl: 'http://localhost:4000/'
+ baseUrl: '/'
+}
+
+
+export default webUiConstants;
\ No newline at end of file
diff --git a/apps/fallback-ui/src/index.css b/apps/fallback-ui/src/index.css
new file mode 100644
index 0000000..68b987d
--- /dev/null
+++ b/apps/fallback-ui/src/index.css
@@ -0,0 +1,51 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+@layer base {
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 222.2 47.4% 11.2%;
+ --card: 0 0% 100%;
+ --card-foreground: 222.2 47.4% 11.2%;
+ --popover: 0 0% 100%;
+ --popover-foreground: 222.2 47.4% 11.2%;
+ --primary: 222.2 47.4% 11.2%;
+ --primary-foreground: 210 40% 98%;
+ --secondary: 210 40% 96.1%;
+ --secondary-foreground: 222.2 47.4% 11.2%;
+ --muted: 210 40% 96.1%;
+ --muted-foreground: 215.4 16.3% 46.9%;
+ --accent: 210 40% 96.1%;
+ --accent-foreground: 222.2 47.4% 11.2%;
+ --destructive: 0 84.2% 60.2%;
+ --destructive-foreground: 210 40% 98%;
+ --border: 214.3 31.8% 91.4%;
+ --input: 214.3 31.8% 91.4%;
+ --ring: 222.2 84% 4.9%;
+ --radius: 0.75rem;
+ }
+
+ body {
+ @apply bg-slate-100 text-slate-900 antialiased;
+ }
+}
+
+@layer base {
+ * {
+ @apply border-border;
+ }
+
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ @apply font-semibold;
+ }
+
+ a {
+ @apply text-primary hover:text-primary/80;
+ }
+}
diff --git a/apps/fallback-ui/src/lib/http.ts b/apps/fallback-ui/src/lib/http.ts
new file mode 100644
index 0000000..6143362
--- /dev/null
+++ b/apps/fallback-ui/src/lib/http.ts
@@ -0,0 +1,17 @@
+import webUiConstants from '@/constants'
+import axios from 'axios'
+
+export const httpClient = axios.create({
+ baseURL: webUiConstants.baseUrl+'api',
+ withCredentials: true
+})
+
+httpClient.interceptors.response.use(
+ (response) => response,
+ (error) => {
+ if (import.meta.env.DEV) {
+ console.error('HTTP error', error)
+ }
+ return Promise.reject(error)
+ }
+)
diff --git a/apps/fallback-ui/src/lib/jwt.ts b/apps/fallback-ui/src/lib/jwt.ts
new file mode 100644
index 0000000..56df722
--- /dev/null
+++ b/apps/fallback-ui/src/lib/jwt.ts
@@ -0,0 +1,28 @@
+import { jwtDecode } from 'jwt-decode';
+
+interface JWTPayload {
+ staffId?: number;
+ name?: string;
+ iat: number;
+ exp: number;
+}
+
+export const parseJWT = (token: string): JWTPayload | null => {
+ try {
+ return jwtDecode(token);
+ } catch (error) {
+ console.error('Failed to parse JWT:', error);
+ return null;
+ }
+};
+
+export const getUserIdFromToken = (token: string): number | null => {
+ const payload = parseJWT(token);
+ return payload?.staffId || null;
+};
+
+export const isTokenExpired = (token: string): boolean => {
+ const payload = parseJWT(token);
+ if (!payload?.exp) return true;
+ return Date.now() >= payload.exp * 1000;
+};
\ No newline at end of file
diff --git a/apps/fallback-ui/src/lib/utils.ts b/apps/fallback-ui/src/lib/utils.ts
new file mode 100644
index 0000000..fed2fe9
--- /dev/null
+++ b/apps/fallback-ui/src/lib/utils.ts
@@ -0,0 +1,6 @@
+import { clsx, type ClassValue } from 'clsx'
+import { twMerge } from 'tailwind-merge'
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs))
+}
diff --git a/apps/fallback-ui/src/main.tsx b/apps/fallback-ui/src/main.tsx
new file mode 100644
index 0000000..002e7a8
--- /dev/null
+++ b/apps/fallback-ui/src/main.tsx
@@ -0,0 +1,27 @@
+import { StrictMode } from 'react'
+import { createRoot } from 'react-dom/client'
+import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
+import { RouterProvider } from '@tanstack/react-router'
+import { trpc, createTRPCClient } from './trpc/client'
+import { createAppRouter } from './router'
+import './index.css'
+
+const queryClient = new QueryClient()
+const trpcClient = createTRPCClient()
+const router = createAppRouter()
+
+const container = document.getElementById('root')
+
+if (!container) {
+ throw new Error('Failed to find root element for the application')
+}
+
+createRoot(container).render(
+
+
+
+
+
+
+
+)
diff --git a/apps/fallback-ui/src/router.tsx b/apps/fallback-ui/src/router.tsx
new file mode 100644
index 0000000..07aca3b
--- /dev/null
+++ b/apps/fallback-ui/src/router.tsx
@@ -0,0 +1,136 @@
+import { Link, Outlet, RootRoute, Route, createRouter } from '@tanstack/react-router'
+import { Suspense } from 'react'
+import { TanStackRouterDevtools } from '@tanstack/router-devtools'
+import { z } from 'zod'
+import { HomeRoute } from './routes/home'
+import { VendorOrderListRoute } from './routes/vendor-order-list'
+import { LoginRoute } from './routes/login'
+import { UserHomeRoute } from './routes/user-home'
+import { SuperAdminRoute } from './routes/super-admin'
+import { CreateCouponRoute } from './routes/create-coupon'
+import { AuthWrapper } from './components/AuthWrapper'
+import { SuperAdminGuard } from './components/SuperAdminGuard'
+import { cn } from '@/lib/utils'
+
+const basepath = normalizeBasePath(import.meta.env.BASE_URL)
+
+const rootRoute = new RootRoute({
+ component: RootComponent
+})
+
+const dashboardRoute = new Route({
+ getParentRoute: () => rootRoute,
+ path: '/',
+ component: () => (
+ Loading route…
}>
+
+
+ )
+})
+
+const vendorOrderListRoute = new Route({
+ getParentRoute: () => rootRoute,
+ path: '/vendor-order-list',
+ validateSearch: z.object({
+ id: z.string().optional(),
+ }),
+ component: () => (
+ Loading vendor orders…}>
+
+
+ )
+})
+
+const loginRoute = new Route({
+ getParentRoute: () => rootRoute,
+ path: '/login',
+ component: () => (
+ Loading login…}>
+
+
+ )
+})
+
+const userHomeRoute = new Route({
+ getParentRoute: () => rootRoute,
+ path: '/user-home',
+ component: () => (
+ Loading user home…}>
+
+
+
+
+ )
+})
+
+const superAdminRoute = new Route({
+ getParentRoute: () => rootRoute,
+ path: '/super-admin',
+ component: () => (
+ Loading super admin…}>
+
+
+
+
+
+
+ )
+})
+
+const createCouponRoute = new Route({
+ getParentRoute: () => rootRoute,
+ path: '/create-coupon',
+ component: () => (
+ Loading create coupon…}>
+
+
+
+
+ )
+})
+
+const routeTree = rootRoute.addChildren([dashboardRoute, vendorOrderListRoute, loginRoute, userHomeRoute, superAdminRoute, createCouponRoute])
+
+export function createAppRouter() {
+ return createRouter({
+ routeTree,
+ basepath
+ })
+}
+
+export type AppRouterInstance = ReturnType
+
+declare module '@tanstack/react-router' {
+ interface Register {
+ router: AppRouterInstance
+ }
+}
+
+const navItems = [
+ { to: '/', label: 'Dashboard', exact: true },
+ { to: '/vendor-order-list', label: 'Vendor Order List' }
+] as const
+
+function RootComponent() {
+ return (
+
+
+
+
+
+
+ {import.meta.env.DEV ? (
+
+ ) : null}
+
+
+ )
+}
+
+function normalizeBasePath(value: string): string {
+ if (!value) return '/'
+ if (value === '/') return '/'
+ return value.endsWith('/') ? value.slice(0, -1) : value
+}
diff --git a/apps/fallback-ui/src/routes/create-coupon.tsx b/apps/fallback-ui/src/routes/create-coupon.tsx
new file mode 100644
index 0000000..34e905e
--- /dev/null
+++ b/apps/fallback-ui/src/routes/create-coupon.tsx
@@ -0,0 +1,102 @@
+import { useState } from 'react'
+import { trpc } from '../trpc/client'
+
+export function CreateCouponRoute() {
+ const [mobileNumber, setMobileNumber] = useState('')
+ const [isLoading, setIsLoading] = useState(false)
+ const [success, setSuccess] = useState('')
+ const [error, setError] = useState('')
+
+ const createCouponMutation = trpc.admin.coupon.createCoupon.useMutation()
+
+ const handleSubmit = async (e: React.FormEvent) => {
+ e.preventDefault()
+ setIsLoading(true)
+ setSuccess('')
+ setError('')
+
+ try {
+ const result = await createCouponMutation.mutateAsync({
+ mobile: mobileNumber.trim(),
+ })
+
+ if (result.success) {
+ setSuccess(`Coupon created successfully! Code: ${result.coupon.couponCode} for mobile: ${result.coupon.userMobile}`)
+ setMobileNumber('')
+ }
+ } catch (err: any) {
+ setError(err.message || 'Failed to create coupon')
+ } finally {
+ setIsLoading(false)
+ }
+ }
+
+ const handleMobileChange = (e: React.ChangeEvent) => {
+ const value = e.target.value.replace(/\D/g, '') // Only allow digits
+ if (value.length <= 10) {
+ setMobileNumber(value)
+ }
+ }
+
+ return (
+
+
+
+ Create Coupon
+
+
+
+
+
+
Coupon Details:
+
+ - 20% discount
+ - Minimum order: ₹1000
+ - Maximum discount: ₹500
+ - One-time use per user
+ - Valid for 90 days from creation
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/apps/fallback-ui/src/routes/home.tsx b/apps/fallback-ui/src/routes/home.tsx
new file mode 100644
index 0000000..757314a
--- /dev/null
+++ b/apps/fallback-ui/src/routes/home.tsx
@@ -0,0 +1,57 @@
+import { Link, useNavigate } from '@tanstack/react-router'
+import { useEffect, useState } from 'react'
+import { isAuthenticated } from '@/services/auth'
+
+export function HomeRoute() {
+ const navigate = useNavigate()
+ const [isAuthChecked, setIsAuthChecked] = useState(false)
+ const [isUserAuthenticated, setIsUserAuthenticated] = useState(false)
+
+ useEffect(() => {
+ const checkAuth = async () => {
+ const authenticated = await isAuthenticated()
+ setIsUserAuthenticated(authenticated)
+ setIsAuthChecked(true)
+
+ if (authenticated) {
+ navigate({ to: '/user-home' as any })
+ }
+ }
+
+ checkAuth()
+ }, [navigate])
+
+ if (!isAuthChecked) {
+ return (
+
+
+
+
Checking authentication...
+
+
+ )
+ }
+
+ if (isUserAuthenticated) {
+ return null // Will redirect via useEffect
+ }
+
+ return (
+
+
+
+ Welcome to Freshyo Admin
+
+
+ Manage your meat delivery platform with ease
+
+
+ Login to Dashboard
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/apps/fallback-ui/src/routes/login.tsx b/apps/fallback-ui/src/routes/login.tsx
new file mode 100644
index 0000000..a475ec3
--- /dev/null
+++ b/apps/fallback-ui/src/routes/login.tsx
@@ -0,0 +1,98 @@
+import { useState, useEffect } from 'react'
+import { useNavigate } from '@tanstack/react-router'
+import { trpc } from '@/trpc/client'
+import { Button } from '@/components/ui/button'
+import { setAuthToken, isAuthenticated } from '@/services/auth'
+
+export function LoginRoute() {
+ const [name, setName] = useState('')
+ const [password, setPassword] = useState('')
+ const [error, setError] = useState('')
+ const navigate = useNavigate()
+
+ useEffect(() => {
+ const checkAuth = async () => {
+ if (await isAuthenticated()) {
+ navigate({ to: '/user-home' as any })
+ }
+ }
+ checkAuth()
+ }, [navigate])
+
+ const loginMutation = trpc.admin.staffUser.login.useMutation({
+ onSuccess: async (data: any) => {
+ await setAuthToken(data.token);
+ navigate({ to: '/user-home' as any })
+ },
+ onError: (error: any) => {
+ setError(error.message || 'Login failed')
+ }
+ })
+
+ const handleSubmit = (e: React.FormEvent) => {
+ e.preventDefault()
+ setError('')
+ loginMutation.mutate({ name, password })
+ }
+
+ return (
+
+
+
Login
+
+
+
+
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/apps/fallback-ui/src/routes/super-admin.tsx b/apps/fallback-ui/src/routes/super-admin.tsx
new file mode 100644
index 0000000..3e5d07c
--- /dev/null
+++ b/apps/fallback-ui/src/routes/super-admin.tsx
@@ -0,0 +1,52 @@
+import { StaffUserForm } from '@/components/StaffUserForm';
+
+export function SuperAdminRoute() {
+ return (
+
+
+
Super Admin Dashboard
+
Advanced system management and user administration
+
+
+
+ {/* System Management Cards */}
+
+
System Overview
+
+
+ Total Users
+ 1,234
+
+
+ Active Sessions
+ 89
+
+
+ System Health
+ Good
+
+
+
+
+
+
Recent Activity
+
+
• New user registration
+
• Order completed
+
• System backup completed
+
+
+
+ {/* Staff User Management - Full Width */}
+
+ {
+ // Could refresh staff list or show additional success feedback
+ console.log('Staff user created successfully');
+ }}
+ />
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/fallback-ui/src/routes/user-home.tsx b/apps/fallback-ui/src/routes/user-home.tsx
new file mode 100644
index 0000000..225087c
--- /dev/null
+++ b/apps/fallback-ui/src/routes/user-home.tsx
@@ -0,0 +1,149 @@
+import { Link, useNavigate } from '@tanstack/react-router'
+import { removeAuthToken } from '@/services/auth'
+import { useUserStore } from '@/stores/userStore'
+
+
+
+function AdminDashboard() {
+ const navigate = useNavigate()
+
+ const handleLogout = async () => {
+ await removeAuthToken()
+ navigate({ to: '/' as any })
+ }
+
+ const { user } = useUserStore();
+
+ return (
+
+
+
Admin Dashboard
+
+
+
+
+
User Management
+
Manage staff users and permissions
+
+
+
System Settings
+
Configure system-wide settings
+
+
+
Analytics
+
View system analytics and reports
+
+ {user?.role?.name === 'super_admin' && (
+
+
Super Admin
+
Advanced system management and user creation
+
+ )}
+
+
+ );
+}
+
+function MarketerDashboard() {
+ const navigate = useNavigate()
+
+ const handleLogout = async () => {
+ await removeAuthToken()
+ navigate({ to: '/' as any })
+ }
+
+
+
+ const handleFirstUserCoupon = () => {
+ navigate({ to: '/create-coupon' as any })
+ }
+
+ const handleDiscountCoupon = () => {
+ navigate({ to: '/create-coupon' as any })
+ }
+
+ return (
+
+
+
Marketing Dashboard
+
+
+
+
+
Quick Actions
+
+
+
+
+
+
+ );
+}
+
+function ErrorPage() {
+ const navigate = useNavigate()
+
+ const handleLogout = async () => {
+ await removeAuthToken()
+ navigate({ to: '/' as any })
+ }
+
+ return (
+
+
+
Access Denied
+
+ Your role does not have access to this dashboard. Please contact an administrator.
+
+
+ );
+}
+
+export function UserHomeRoute() {
+ const { user } = useUserStore()
+
+ console.log({user})
+
+ return (
+
+ {(user?.role?.name === 'admin' || user?.role?.name === 'super_admin') &&
}
+ {user?.role?.name === 'marketer' &&
}
+ {user?.role && user.role.name !== 'admin' && user.role.name !== 'super_admin' && user.role.name !== 'marketer' &&
}
+
+ )
+}
\ No newline at end of file
diff --git a/apps/fallback-ui/src/routes/vendor-order-list.tsx b/apps/fallback-ui/src/routes/vendor-order-list.tsx
new file mode 100644
index 0000000..00f0e46
--- /dev/null
+++ b/apps/fallback-ui/src/routes/vendor-order-list.tsx
@@ -0,0 +1,221 @@
+import { useMemo, useState } from 'react'
+import { useSearch } from '@tanstack/react-router'
+import { trpc } from '../trpc/client'
+import { cn } from '@/lib/utils'
+import { Button } from '@/components/ui/button'
+
+interface VendorOrder {
+ orderId: string
+ customerName: string
+ orderDate: string
+ totalAmount: string
+ products: Array<{
+ orderItemId: number
+ productId: number
+ productName: string
+ quantity: number
+ unit: string
+ is_packaged: boolean
+ is_package_verified: boolean
+ }>
+}
+
+export function VendorOrderListRoute() {
+ const { id } = useSearch({ from: '/vendor-order-list' })
+
+ const { data, error, isLoading, isFetching, refetch } = id
+ ? trpc.admin.vendorSnippets.getOrdersBySnippet.useQuery({ snippetCode: id })
+ : { data: null, error: null, isLoading: false, isFetching: false, refetch: () => {} }
+
+ const updatePackagingMutation = trpc.admin.vendorSnippets.updateOrderItemPackaging.useMutation()
+
+ const [updatingItems, setUpdatingItems] = useState>(new Set())
+
+ const handlePackagingToggle = async (orderItemId: number, currentValue: boolean) => {
+ setUpdatingItems(prev => new Set(prev).add(orderItemId))
+
+ try {
+ await updatePackagingMutation.mutateAsync({
+ orderItemId,
+ is_packaged: !currentValue
+ })
+ // Refetch data to update the UI
+ refetch()
+ } catch (error) {
+ console.error('Failed to update packaging status:', error)
+ } finally {
+ setUpdatingItems(prev => {
+ const newSet = new Set(prev)
+ newSet.delete(orderItemId)
+ return newSet
+ })
+ }
+ }
+
+ const orders = data?.success ? data.data : []
+
+
+ const productSummary = useMemo(() => {
+ const summary: Record = {};
+
+ orders.forEach(order => {
+ order.products.forEach(product => {
+ const key = product.productName;
+ if (!summary[key]) {
+ summary[key] = { quantity: 0, unit: product.unit };
+ }
+ summary[key].quantity += product.quantity;
+ });
+ });
+
+ return Object.entries(summary).map(([name, data]) => ({
+ name,
+ quantity: data.quantity,
+ unit: data.unit
+ }));
+ }, [orders])
+
+ return (
+
+
+
Summary
+
+ {productSummary.map((item, index) => (
+
+ {item.name}:
+ {item.quantity} {item.unit}
+
+ ))}
+
+
+
+
+
+
+
Vendor Orders
+
+ Track incoming orders and fulfilment progress for vendor partners.
+ {id && Snippet: {id}}
+
+
+
+
+
+
+ {isLoading ? (
+
+ Loading orders…
+
+ ) : error ? (
+
+ {error.message ?? 'Unable to load vendor orders right now'}
+
+ ) : !id ? (
+
+ No snippet code provided
+
+ ) : orders.length === 0 ? (
+
+ No vendor orders found.
+
+ ) : (
+
+ {orders.map((order) => {
+ const parsedDate = order.orderDate
+ ? new Date(order.orderDate).toLocaleString()
+ : 'N/A'
+ const badgeClass = 'border-slate-200 bg-slate-100 text-slate-600 inline-flex items-center rounded-full border px-3 py-0.5 text-xs font-semibold uppercase'
+
+ return (
+
+
+
+ {order.orderId}
+
+
+ Pending
+
+
+
+
+
-
+ Products (Packaging Status)
+
+
-
+ {order.products.map((product) => (
+
+
+ {product.productName}: {product.quantity} {product.unit}
+
+
+ handlePackagingToggle(product.orderItemId, product.is_packaged)}
+ className="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"
+ />
+
+ ))}
+
+
+
+
-
+ Date
+
+ - {parsedDate}
+
+
+
-
+ Total Amount
+
+ -
+ ₹{order.totalAmount}
+
+
+
+
+ )
+ })}
+
+ )}
+
+
+ {isFetching && !isLoading ? (
+
Refreshing…
+ ) : null}
+
+
+ )
+}
+
+const statusBadgeStyles: Record = {
+ pending: 'border-amber-200 bg-amber-100 text-amber-700',
+ completed: 'border-emerald-200 bg-emerald-100 text-emerald-700',
+ cancelled: 'border-rose-200 bg-rose-100 text-rose-700',
+ inprogress: 'border-sky-200 bg-sky-100 text-sky-700',
+ dispatched: 'border-indigo-200 bg-indigo-100 text-indigo-700'
+}
diff --git a/apps/fallback-ui/src/services/StorageService.ts b/apps/fallback-ui/src/services/StorageService.ts
new file mode 100644
index 0000000..c61cadd
--- /dev/null
+++ b/apps/fallback-ui/src/services/StorageService.ts
@@ -0,0 +1,40 @@
+export const StorageService = {
+ async setItem(key: string, value: string): Promise {
+ try {
+ localStorage.setItem(key, value);
+ return true;
+ } catch (error) {
+ console.error('StorageService setItem error:', error);
+ return false;
+ }
+ },
+
+ async getItem(key: string): Promise {
+ try {
+ return localStorage.getItem(key);
+ } catch (error) {
+ console.error('StorageService getItem error:', error);
+ return null;
+ }
+ },
+
+ async removeItem(key: string): Promise {
+ try {
+ localStorage.removeItem(key);
+ return true;
+ } catch (error) {
+ console.error('StorageService removeItem error:', error);
+ return false;
+ }
+ },
+
+ async clearAll(keys: string[]): Promise {
+ try {
+ keys.forEach((key) => localStorage.removeItem(key));
+ return true;
+ } catch (error) {
+ console.error('StorageService clearAll error:', error);
+ return false;
+ }
+ },
+};
\ No newline at end of file
diff --git a/apps/fallback-ui/src/services/auth.ts b/apps/fallback-ui/src/services/auth.ts
new file mode 100644
index 0000000..4a0f263
--- /dev/null
+++ b/apps/fallback-ui/src/services/auth.ts
@@ -0,0 +1,32 @@
+import { StorageService } from './StorageService';
+import { getUserIdFromToken, isTokenExpired } from '@/lib/jwt';
+
+const AUTH_TOKEN_KEY = 'auth_token';
+
+export const getAuthToken = async (): Promise => {
+ return await StorageService.getItem(AUTH_TOKEN_KEY);
+};
+
+export const setAuthToken = async (token: string): Promise => {
+ return await StorageService.setItem(AUTH_TOKEN_KEY, token);
+};
+
+export const removeAuthToken = async (): Promise => {
+ return await StorageService.removeItem(AUTH_TOKEN_KEY);
+};
+
+export const clearAllAuthData = async (): Promise => {
+ return await StorageService.clearAll([AUTH_TOKEN_KEY]);
+};
+
+export const getCurrentUserId = async (): Promise => {
+ const token = await getAuthToken();
+ if (!token) return null;
+ return getUserIdFromToken(token);
+};
+
+export const isAuthenticated = async (): Promise => {
+ const token = await getAuthToken();
+ if (!token) return false;
+ return !isTokenExpired(token);
+};
\ No newline at end of file
diff --git a/apps/fallback-ui/src/stores/userStore.ts b/apps/fallback-ui/src/stores/userStore.ts
new file mode 100644
index 0000000..a9b28d1
--- /dev/null
+++ b/apps/fallback-ui/src/stores/userStore.ts
@@ -0,0 +1,47 @@
+import { create } from 'zustand';
+import { devtools } from 'zustand/middleware';
+
+interface User {
+ id: number;
+ name: string;
+}
+
+interface Role {
+ id: number;
+ name: string;
+}
+
+interface Permission {
+ id: number;
+ name: string;
+}
+
+interface UserWithRole extends User {
+ role: Role | null;
+ permissions: Permission[];
+}
+
+interface UserStore {
+ user: UserWithRole | null;
+ isLoading: boolean;
+ error: string | null;
+ setUser: (user: UserWithRole | null) => void;
+ setLoading: (loading: boolean) => void;
+ setError: (error: string | null) => void;
+ clearUser: () => void;
+}
+
+export const useUserStore = create()(
+ devtools(
+ (set) => ({
+ user: null,
+ isLoading: false,
+ error: null,
+ setUser: (user) => set({ user, error: null }),
+ setLoading: (loading) => set({ isLoading: loading }),
+ setError: (error) => set({ error, user: null }),
+ clearUser: () => set({ user: null, error: null, isLoading: false }),
+ }),
+ { name: 'user-store' }
+ )
+);
\ No newline at end of file
diff --git a/apps/fallback-ui/src/trpc/client.ts b/apps/fallback-ui/src/trpc/client.ts
new file mode 100644
index 0000000..d4cac38
--- /dev/null
+++ b/apps/fallback-ui/src/trpc/client.ts
@@ -0,0 +1,35 @@
+import { createTRPCReact } from '@trpc/react-query'
+import { httpBatchLink, loggerLink } from '@trpc/client'
+import type { AppRouter } from '../../../backend/src/trpc/router'
+import webUiConstants from '@/constants'
+import { getAuthToken } from '@/services/auth'
+
+export const trpc = createTRPCReact()
+
+
+
+export function createTRPCClient() {
+ return trpc.createClient({
+ // transformer: superjson,
+ links: [
+ loggerLink({
+ enabled: (opts) =>
+ import.meta.env.DEV ||
+ (opts.direction === 'down' && opts.result instanceof Error)
+ }),
+ httpBatchLink({
+ url: webUiConstants.baseUrl+`api/trpc`,
+ headers: async () => {
+ const token = await getAuthToken();
+ return token ? { Authorization: `Bearer ${token}` } : {};
+ },
+ fetch(url, options) {
+ return fetch(url, {
+ ...options,
+ credentials: 'include'
+ })
+ }
+ })
+ ]
+ })
+}
diff --git a/apps/fallback-ui/tailwind.config.ts b/apps/fallback-ui/tailwind.config.ts
new file mode 100644
index 0000000..08c20ca
--- /dev/null
+++ b/apps/fallback-ui/tailwind.config.ts
@@ -0,0 +1,72 @@
+import type { Config } from 'tailwindcss'
+import tailwindcssAnimate from 'tailwindcss-animate'
+
+const config: Config = {
+ darkMode: ['class'],
+ content: [
+ './index.html',
+ './src/**/*.{ts,tsx}',
+ '../../packages/ui/**/*.{ts,tsx}'
+ ],
+ theme: {
+ extend: {
+ colors: {
+ border: 'hsl(var(--border))',
+ input: 'hsl(var(--input))',
+ ring: 'hsl(var(--ring))',
+ background: 'hsl(var(--background))',
+ foreground: 'hsl(var(--foreground))',
+ primary: {
+ DEFAULT: 'hsl(var(--primary))',
+ foreground: 'hsl(var(--primary-foreground))'
+ },
+ secondary: {
+ DEFAULT: 'hsl(var(--secondary))',
+ foreground: 'hsl(var(--secondary-foreground))'
+ },
+ destructive: {
+ DEFAULT: 'hsl(var(--destructive))',
+ foreground: 'hsl(var(--destructive-foreground))'
+ },
+ muted: {
+ DEFAULT: 'hsl(var(--muted))',
+ foreground: 'hsl(var(--muted-foreground))'
+ },
+ accent: {
+ DEFAULT: 'hsl(var(--accent))',
+ foreground: 'hsl(var(--accent-foreground))'
+ },
+ popover: {
+ DEFAULT: 'hsl(var(--popover))',
+ foreground: 'hsl(var(--popover-foreground))'
+ },
+ card: {
+ DEFAULT: 'hsl(var(--card))',
+ foreground: 'hsl(var(--card-foreground))'
+ }
+ },
+ borderRadius: {
+ lg: 'var(--radius)',
+ md: 'calc(var(--radius) - 2px)',
+ sm: 'calc(var(--radius) - 4px)'
+ },
+ keyframes: {
+ 'accordion-down': {
+ from: { height: '0' },
+ to: { height: 'var(--radix-accordion-content-height)' }
+ },
+ 'accordion-up': {
+ from: { height: 'var(--radix-accordion-content-height)' },
+ to: { height: '0' }
+ }
+ },
+ animation: {
+ 'accordion-down': 'accordion-down 0.2s ease-out',
+ 'accordion-up': 'accordion-up 0.2s ease-out'
+ }
+ }
+ },
+ plugins: [tailwindcssAnimate]
+}
+
+export default config
diff --git a/apps/fallback-ui/tsconfig.json b/apps/fallback-ui/tsconfig.json
new file mode 100644
index 0000000..53fd815
--- /dev/null
+++ b/apps/fallback-ui/tsconfig.json
@@ -0,0 +1,28 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "useDefineForClassFields": true,
+ "module": "ESNext",
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
+ "skipLibCheck": true,
+ "moduleResolution": "Bundler",
+ "allowImportingTsExtensions": false,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "strict": true,
+ "forceConsistentCasingInFileNames": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "react-jsx",
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["./src/*"],
+ // "common-ui/shared-types": ["../../packages/ui/shared-types"]
+ "common-ui": ["../../packages/ui"],
+ "common-ui/*": ["../../packages/ui/*"]
+ },
+ "types": ["node"]
+ },
+ "include": ["./src", "./vite.config.ts", "./env.d.ts"]
+}
diff --git a/apps/fallback-ui/vite.config.ts b/apps/fallback-ui/vite.config.ts
new file mode 100644
index 0000000..78a2a00
--- /dev/null
+++ b/apps/fallback-ui/vite.config.ts
@@ -0,0 +1,27 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react-swc'
+import path from 'path'
+
+
+export default defineConfig({
+ base: '/',
+ plugins: [react()],
+ resolve: {
+ alias: {
+ '@': path.resolve(__dirname, 'src'),
+ }
+ },
+ server: {
+ port: 5174,
+ proxy: {
+ '/api': {
+ target: 'http://localhost:4000',
+ changeOrigin: true
+ }
+ }
+ },
+ build: {
+ outDir: 'dist',
+ emptyOutDir: true
+ }
+})
diff --git a/apps/info-site/Dockerfile b/apps/info-site/Dockerfile
new file mode 100644
index 0000000..b3ffe56
--- /dev/null
+++ b/apps/info-site/Dockerfile
@@ -0,0 +1,20 @@
+# Use lightweight Node.js 18 alpine image
+FROM node:18-alpine
+
+# Set working directory
+WORKDIR /app
+
+# Copy package files first to leverage Docker cache for dependencies
+COPY package*.json ./
+
+# Install dependencies (only production if possible, but standard npm install is fine here)
+RUN npm install
+
+# Copy the rest of the application code
+COPY . .
+
+# Expose the application port
+EXPOSE 3000
+
+# Start the application
+CMD ["npm", "start"]
diff --git a/apps/info-site/README.md b/apps/info-site/README.md
new file mode 100644
index 0000000..cb4d3b3
--- /dev/null
+++ b/apps/info-site/README.md
@@ -0,0 +1,157 @@
+# Symbuyote - Fresh Local Shopping Platform
+
+A modern, responsive web application for local farm-to-consumer shopping experience.
+
+## Features
+
+- 🎨 **Modern Design**: Beautiful gradient-based UI with smooth animations
+- 📱 **Responsive**: Works perfectly on all devices
+- ⚡ **Fast**: Built with HTMX for dynamic content without heavy JavaScript frameworks
+- 🖼️ **Rich Media**: High-quality images from Unsplash
+- ✨ **Interactive**: Smooth scroll animations, hover effects, and micro-interactions
+- 📧 **Newsletter**: Functional subscription form with feedback
+
+## Technology Stack
+
+- **Backend**: Node.js with Express
+- **Frontend**: HTML5, CSS3, JavaScript (ES6+)
+- **Dynamic Content**: HTMX
+- **Styling**: Custom CSS with CSS Grid and Flexbox
+- **Icons**: Font Awesome
+- **Images**: Unsplash API
+- **Fonts**: Google Fonts (Inter, Poppins)
+
+## Getting Started
+
+### Prerequisites
+
+- Node.js (v14 or higher)
+- npm
+
+### Installation
+
+1. Clone the repository
+2. Navigate to the info-site directory:
+ ```bash
+ cd apps/info-site
+ ```
+
+3. Install dependencies:
+ ```bash
+ npm install
+ ```
+
+4. Start the development server:
+ ```bash
+ npm start
+ ```
+
+5. Open your browser and navigate to:
+ ```
+ http://localhost:6446
+ ```
+
+## Project Structure
+
+```
+apps/info-site/
+├── public/
+│ ├── css/
+│ │ └── styles.css # Main stylesheet
+│ ├── js/
+│ │ └── main.js # JavaScript interactions
+│ ├── images/
+│ │ ├── logo.svg # Company logo
+│ │ └── [product-images] # Product and lifestyle images
+│ └── index.html # Main HTML file
+├── index.js # Express server
+├── package.json # Dependencies and scripts
+└── README.md # This file
+```
+
+## Features Overview
+
+### Hero Section
+- Eye-catching gradient background
+- Compelling headline and description
+- Call-to-action buttons with hover effects
+- Parallax scrolling effect
+
+### Product Categories
+- Three main categories: Meat, Fruits, Dry Fruits
+- Beautiful card layouts with images
+- Hover animations and transitions
+
+### How It Works
+- Three-step process visualization
+- Interactive step cards
+- Clear, concise descriptions
+
+### Quality Promise
+- Trust indicators
+- Feature highlights
+- Professional imagery
+
+### Testimonials
+- Customer reviews
+- Author avatars and information
+- Card-based layout
+
+### Newsletter
+- Email subscription form
+- Real-time validation
+- Success/error feedback
+
+### Footer
+- Company information
+- Quick links
+- Social media connections
+- Copyright information
+
+## Customization
+
+### Colors
+The color scheme is defined in CSS variables:
+- Primary: `#F83758` (Coral Red)
+- Secondary: `#FF6B9D` (Pink)
+- Accent: `#4ECDC4` (Teal)
+- Background: `#fff0f6` (Light Pink)
+
+### Images
+Replace images in the `public/images/` directory. Current images are from Unsplash and loaded via CDN.
+
+### Content
+Edit the HTML content in `public/index.html` to modify text, add new sections, or change the structure.
+
+## Deployment
+
+### Environment Variables
+- `PORT`: Server port (default: 6446)
+
+### Production Setup
+1. Set NODE_ENV to production
+2. Configure your preferred port
+3. Deploy to your hosting platform
+
+## Browser Support
+
+- Chrome/Chromium (latest)
+- Firefox (latest)
+- Safari (latest)
+- Edge (latest)
+
+## Contributing
+
+1. Fork the repository
+2. Create a feature branch
+3. Make your changes
+4. Test thoroughly
+5. Submit a pull request
+
+## License
+
+This project is proprietary to Symbuyote.
+
+## Support
+
+For support or questions, please contact the development team.
\ No newline at end of file
diff --git a/apps/info-site/index.js b/apps/info-site/index.js
new file mode 100644
index 0000000..1225c25
--- /dev/null
+++ b/apps/info-site/index.js
@@ -0,0 +1,61 @@
+const express = require('express');
+const path = require('path');
+
+const app = express();
+
+app.use(express.urlencoded({ extended: true }));
+
+// Set up Pug as the view engine
+app.set('view engine', 'pug');
+app.set('views', path.join(__dirname, 'views'));
+
+// Serve static files
+app.use(express.static(path.join(__dirname, 'public')));
+
+// Home route
+app.get('/', (_, res) => {
+ res.render('index', {
+ title: 'Freshyo - Freshness Redefined',
+ year: new Date().getFullYear()
+ });
+});
+
+// Privacy Policy route
+app.get('/privacy-policy', (_, res) => {
+ res.render('policy', {
+ title: 'Freshyo - Privacy Policy',
+ year: new Date().getFullYear()
+ });
+});
+
+// Delete Account route
+app.get('/delete-account', (_, res) => {
+ res.render('delete', {
+ title: 'Freshyo - Delete Account',
+ year: new Date().getFullYear()
+ });
+});
+
+// Handle Delete Account submission
+app.post('/delete-account', (req, res) => {
+ const { mobile } = req.body;
+ console.log(`Received deletion request for: ${mobile}`);
+
+ res.render('success', {
+ title: 'Freshyo - Request Submitted',
+ year: new Date().getFullYear()
+ });
+});
+
+// QR-based download route
+app.get('/qr-based-download', (_, res) => {
+ res.render('qr-download', {
+ title: 'Freshyo - Download App',
+ year: new Date().getFullYear()
+ });
+});
+
+const PORT = process.env.PORT || 3000;
+app.listen(PORT, () => {
+ console.log(`✨ Freshyo FRESH info site running at http://localhost:${PORT}`);
+});
\ No newline at end of file
diff --git a/apps/info-site/package.json b/apps/info-site/package.json
new file mode 100644
index 0000000..295029b
--- /dev/null
+++ b/apps/info-site/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "symbuyote-info-site",
+ "version": "1.0.0",
+ "description": "Info website for Freshyo - Local trust, online convenience",
+ "main": "index.js",
+ "scripts": {
+ "start": "node index.js",
+ "docker:deploy": "docker buildx build --platform linux/amd64 -t mohdshafiuddin54/freshyo-info:latest . && docker push mohdshafiuddin54/freshyo-info:latest"
+ },
+ "dependencies": {
+ "express": "^4.18.2",
+ "pug": "^3.0.2"
+ }
+}
\ No newline at end of file
diff --git a/apps/info-site/public/css/styles.css b/apps/info-site/public/css/styles.css
new file mode 100644
index 0000000..f793f31
--- /dev/null
+++ b/apps/info-site/public/css/styles.css
@@ -0,0 +1,796 @@
+@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
+
+:root {
+ /* Brand Colors - Matching user-ui app */
+ --brand-25: #F5FAFF;
+ --brand-50: #EFF8FF;
+ --brand-100: #D1E9FF;
+ --brand-200: #B2DDFF;
+ --brand-300: #84CAFF;
+ --brand-400: #53B1FD;
+ --brand-500: #2E90FA;
+ --brand-600: #1570EF;
+ --brand-700: #175CD3;
+ --brand-800: #1849A9;
+ --brand-900: #194185;
+
+ /* Semantic Colors */
+ --primary: var(--brand-500);
+ --primary-dark: var(--brand-600);
+ --primary-light: var(--brand-400);
+ --success: #22C55E;
+ --warning: #F59E0B;
+ --error: #EF4444;
+
+ /* Grays */
+ --gray-50: #FAFAFA;
+ --gray-100: #F5F5F5;
+ --gray-200: #E9EAEB;
+ --gray-300: #D5D7DA;
+ --gray-400: #A4A7AE;
+ --gray-500: #717680;
+ --gray-600: #535862;
+ --gray-700: #414651;
+ --gray-800: #252B37;
+ --gray-900: #101828;
+
+ /* Spacing */
+ --spacing-xs: 0.25rem;
+ --spacing-sm: 0.5rem;
+ --spacing-md: 1rem;
+ --spacing-lg: 1.5rem;
+ --spacing-xl: 2rem;
+ --spacing-2xl: 3rem;
+
+ /* Border Radius */
+ --radius-sm: 8px;
+ --radius-md: 12px;
+ --radius-lg: 16px;
+ --radius-xl: 24px;
+ --radius-full: 9999px;
+
+ /* Shadows */
+ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
+ --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
+
+ /* Container */
+ --container-max: 480px;
+ --nav-height: 70px;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+html {
+ font-size: 16px;
+}
+
+body {
+ font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ background-color: var(--brand-50);
+ color: var(--gray-900);
+ line-height: 1.5;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+/* Typography */
+h1 {
+ font-size: 2rem;
+ font-weight: 800;
+ color: var(--gray-900);
+ line-height: 1.2;
+}
+
+h2 {
+ font-size: 1.5rem;
+ font-weight: 700;
+ color: var(--gray-900);
+ line-height: 1.3;
+}
+
+h3 {
+ font-size: 1.25rem;
+ font-weight: 600;
+ color: var(--gray-900);
+ line-height: 1.4;
+}
+
+p {
+ font-size: 1rem;
+ color: var(--gray-600);
+ line-height: 1.6;
+}
+
+a {
+ color: var(--brand-500);
+ text-decoration: none;
+ transition: color 0.2s ease;
+}
+
+a:hover {
+ color: var(--brand-600);
+}
+
+/* App Container - Mobile First */
+.app-container {
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ background-color: var(--brand-50);
+}
+
+.app-content {
+ flex: 1;
+ padding: var(--spacing-lg);
+ max-width: var(--container-max);
+ margin: 0 auto;
+ width: 100%;
+ padding-top: calc(var(--nav-height) + var(--spacing-lg));
+}
+
+/* Navigation - Mobile App Style */
+.nav {
+ position: fixed;
+ top: 0;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 100%;
+ max-width: var(--container-max);
+ height: var(--nav-height);
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0 var(--spacing-lg);
+ background: rgba(255, 255, 255, 0.95);
+ backdrop-filter: blur(10px);
+ -webkit-backdrop-filter: blur(10px);
+ border-bottom: 1px solid var(--gray-100);
+ z-index: 1000;
+}
+
+.nav-logo {
+ display: flex;
+ align-items: center;
+ gap: var(--spacing-sm);
+ font-size: 1.25rem;
+ font-weight: 800;
+ color: var(--brand-600);
+}
+
+.nav-logo svg,
+.nav-logo i {
+ width: 28px;
+ height: 28px;
+ color: var(--brand-500);
+}
+
+.nav-links {
+ display: flex;
+ gap: var(--spacing-md);
+ list-style: none;
+}
+
+.nav-links a {
+ font-size: 0.875rem;
+ font-weight: 500;
+ color: var(--gray-600);
+ padding: var(--spacing-sm) var(--spacing-md);
+ border-radius: var(--radius-full);
+ transition: all 0.2s ease;
+}
+
+.nav-links a:hover,
+.nav-links a.active {
+ color: var(--brand-500);
+ background-color: var(--brand-50);
+}
+
+/* Cards */
+.card {
+ background: white;
+ border-radius: var(--radius-xl);
+ padding: var(--spacing-xl);
+ box-shadow: var(--shadow-md);
+ border: 1px solid var(--gray-100);
+ margin-bottom: var(--spacing-lg);
+}
+
+.card-header {
+ margin-bottom: var(--spacing-lg);
+ padding-bottom: var(--spacing-md);
+ border-bottom: 1px solid var(--gray-100);
+}
+
+.card-header h2 {
+ margin-bottom: var(--spacing-xs);
+}
+
+.card-header p {
+ font-size: 0.875rem;
+}
+
+/* Buttons */
+.btn {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: var(--spacing-sm);
+ padding: var(--spacing-md) var(--spacing-xl);
+ border-radius: var(--radius-lg);
+ font-size: 1rem;
+ font-weight: 600;
+ border: none;
+ cursor: pointer;
+ transition: all 0.2s ease;
+ text-decoration: none;
+}
+
+.btn-primary {
+ background: var(--brand-500);
+ color: white;
+ box-shadow: 0 4px 14px rgba(46, 144, 250, 0.4);
+}
+
+.btn-primary:hover {
+ background: var(--brand-600);
+ transform: translateY(-2px);
+ box-shadow: 0 6px 20px rgba(46, 144, 250, 0.5);
+}
+
+.btn-secondary {
+ background: white;
+ color: var(--gray-700);
+ border: 1px solid var(--gray-200);
+}
+
+.btn-secondary:hover {
+ background: var(--gray-50);
+ border-color: var(--gray-300);
+}
+
+.btn-danger {
+ background: var(--error);
+ color: white;
+}
+
+.btn-danger:hover {
+ background: #DC2626;
+}
+
+.btn-sm {
+ padding: var(--spacing-sm) var(--spacing-md);
+ font-size: 0.875rem;
+}
+
+.btn-lg {
+ padding: var(--spacing-lg) var(--spacing-2xl);
+ font-size: 1.125rem;
+}
+
+/* Form Elements */
+.form-group {
+ margin-bottom: var(--spacing-lg);
+}
+
+.form-label {
+ display: block;
+ font-size: 0.875rem;
+ font-weight: 500;
+ color: var(--gray-700);
+ margin-bottom: var(--spacing-sm);
+}
+
+.form-input {
+ width: 100%;
+ padding: var(--spacing-md);
+ border: 1px solid var(--gray-200);
+ border-radius: var(--radius-md);
+ font-size: 1rem;
+ font-family: inherit;
+ transition: all 0.2s ease;
+ background: white;
+}
+
+.form-input:focus {
+ outline: none;
+ border-color: var(--brand-500);
+ box-shadow: 0 0 0 3px rgba(46, 144, 250, 0.1);
+}
+
+.form-input::placeholder {
+ color: var(--gray-400);
+}
+
+/* Feature Items */
+.feature-grid {
+ display: grid;
+ gap: var(--spacing-lg);
+ margin: var(--spacing-xl) 0;
+}
+
+.feature-item {
+ display: flex;
+ align-items: flex-start;
+ gap: var(--spacing-md);
+ padding: var(--spacing-lg);
+ background: white;
+ border-radius: var(--radius-lg);
+ border: 1px solid var(--gray-100);
+}
+
+.feature-icon {
+ width: 48px;
+ height: 48px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: var(--brand-50);
+ border-radius: var(--radius-md);
+ color: var(--brand-500);
+ font-size: 1.25rem;
+ flex-shrink: 0;
+}
+
+.feature-content h3 {
+ margin-bottom: var(--spacing-xs);
+}
+
+.feature-content p {
+ font-size: 0.875rem;
+}
+
+/* Stats */
+.stats-row {
+ display: flex;
+ justify-content: space-around;
+ gap: var(--spacing-md);
+ padding: var(--spacing-xl);
+ background: var(--brand-500);
+ border-radius: var(--radius-xl);
+ margin: var(--spacing-xl) 0;
+}
+
+.stat-item {
+ text-align: center;
+ color: white;
+}
+
+.stat-value {
+ font-size: 2rem;
+ font-weight: 800;
+ display: block;
+}
+
+.stat-label {
+ font-size: 0.875rem;
+ opacity: 0.9;
+}
+
+/* Footer */
+.footer {
+ background: white;
+ padding: var(--spacing-xl);
+ margin-top: var(--spacing-2xl);
+ border-top: 1px solid var(--gray-100);
+}
+
+.footer-content {
+ max-width: var(--container-max);
+ margin: 0 auto;
+ display: flex;
+ flex-direction: column;
+ gap: var(--spacing-lg);
+ text-align: center;
+}
+
+.footer-brand {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: var(--spacing-sm);
+ font-size: 1.25rem;
+ font-weight: 700;
+ color: var(--brand-600);
+}
+
+.footer-brand svg,
+.footer-brand i {
+ color: var(--brand-500);
+}
+
+.footer-links {
+ display: flex;
+ justify-content: center;
+ gap: var(--spacing-lg);
+ flex-wrap: wrap;
+}
+
+.footer-links a {
+ color: var(--gray-500);
+ font-size: 0.875rem;
+}
+
+.footer-copyright {
+ font-size: 0.75rem;
+ color: var(--gray-400);
+}
+
+/* Hero Section */
+.hero {
+ text-align: center;
+ padding: var(--spacing-2xl) 0;
+}
+
+.hero-badge {
+ display: inline-block;
+ padding: var(--spacing-xs) var(--spacing-md);
+ background: var(--brand-100);
+ color: var(--brand-700);
+ font-size: 0.75rem;
+ font-weight: 600;
+ border-radius: var(--radius-full);
+ margin-bottom: var(--spacing-md);
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+}
+
+.hero h1 {
+ margin-bottom: var(--spacing-md);
+}
+
+.hero p {
+ margin-bottom: var(--spacing-xl);
+ max-width: 100%;
+}
+
+.hero-actions {
+ display: flex;
+ flex-direction: column;
+ gap: var(--spacing-md);
+ align-items: center;
+}
+
+/* Section Headers */
+.section-header {
+ margin-bottom: var(--spacing-xl);
+ text-align: center;
+}
+
+.section-header h2 {
+ margin-bottom: var(--spacing-sm);
+}
+
+.section-header p {
+ font-size: 0.875rem;
+}
+
+/* Alert/Banner */
+.alert {
+ padding: var(--spacing-md);
+ border-radius: var(--radius-md);
+ margin-bottom: var(--spacing-lg);
+}
+
+.alert-info {
+ background: var(--brand-50);
+ border: 1px solid var(--brand-100);
+ color: var(--brand-700);
+}
+
+.alert-warning {
+ background: #FFFBEB;
+ border: 1px solid #FDE68A;
+ color: #B45309;
+}
+
+.alert-danger {
+ background: #FEF2F2;
+ border: 1px solid #FECACA;
+ color: #B91C1C;
+}
+
+.alert-success {
+ background: #F0FDF4;
+ border: 1px solid #BBF7D0;
+ color: #15803D;
+}
+
+/* Icon styles */
+.icon {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.icon-sm { font-size: 1rem; }
+.icon-md { font-size: 1.25rem; }
+.icon-lg { font-size: 1.5rem; }
+.icon-xl { font-size: 2rem; }
+
+/* Utility Classes */
+.text-center { text-align: center; }
+.text-left { text-align: left; }
+.text-right { text-align: right; }
+
+.mt-sm { margin-top: var(--spacing-sm); }
+.mt-md { margin-top: var(--spacing-md); }
+.mt-lg { margin-top: var(--spacing-lg); }
+.mt-xl { margin-top: var(--spacing-xl); }
+
+.mb-sm { margin-bottom: var(--spacing-sm); }
+.mb-md { margin-bottom: var(--spacing-md); }
+.mb-lg { margin-bottom: var(--spacing-lg); }
+.mb-xl { margin-bottom: var(--spacing-xl); }
+
+.flex { display: flex; }
+.flex-col { flex-direction: column; }
+.items-center { align-items: center; }
+.justify-center { justify-content: center; }
+.justify-between { justify-content: space-between; }
+.gap-sm { gap: var(--spacing-sm); }
+.gap-md { gap: var(--spacing-md); }
+.gap-lg { gap: var(--spacing-lg); }
+
+/* Responsive */
+@media (min-width: 768px) {
+ :root {
+ --container-max: 700px;
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ }
+
+ .hero-actions {
+ flex-direction: row;
+ }
+
+ .feature-grid {
+ grid-template-columns: repeat(2, 1fr);
+ }
+
+ .footer-content {
+ flex-direction: row;
+ justify-content: space-between;
+ text-align: left;
+ }
+}
+
+@media (min-width: 1024px) {
+ :root {
+ --container-max: 800px;
+ }
+
+ .feature-grid {
+ grid-template-columns: repeat(3, 1fr);
+ }
+}
+
+/* Animations */
+@keyframes fadeIn {
+ from { opacity: 0; transform: translateY(10px); }
+ to { opacity: 1; transform: translateY(0); }
+}
+
+.animate-fade-in {
+ animation: fadeIn 0.5s ease forwards;
+}
+
+@keyframes pulse {
+ 0%, 100% { opacity: 1; }
+ 50% { opacity: 0.5; }
+}
+
+.animate-pulse {
+ animation: pulse 2s ease-in-out infinite;
+}
+
+/* Back Link */
+.back-link {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--spacing-sm);
+ color: var(--brand-500);
+ font-weight: 500;
+ margin-bottom: var(--spacing-lg);
+ transition: opacity 0.2s;
+}
+
+.back-link:hover {
+ opacity: 0.8;
+}
+
+/* Policy Page Specific */
+.policy-content {
+ background: white;
+ border-radius: var(--radius-xl);
+ padding: var(--spacing-xl);
+ box-shadow: var(--shadow-md);
+}
+
+.policy-content h1 {
+ margin-bottom: var(--spacing-md);
+}
+
+.policy-content h2 {
+ margin-top: var(--spacing-xl);
+ margin-bottom: var(--spacing-md);
+ font-size: 1.25rem;
+}
+
+.policy-content p,
+.policy-content li {
+ color: var(--gray-600);
+ margin-bottom: var(--spacing-md);
+ line-height: 1.7;
+}
+
+.policy-content ul {
+ padding-left: var(--spacing-xl);
+ margin-bottom: var(--spacing-lg);
+}
+
+/* Download Page Specific */
+.download-container {
+ min-height: 100vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: var(--spacing-lg);
+ background: linear-gradient(180deg, var(--brand-50) 0%, white 100%);
+}
+
+.download-card {
+ background: white;
+ border-radius: var(--radius-xl);
+ padding: var(--spacing-2xl);
+ box-shadow: var(--shadow-xl);
+ text-align: center;
+ max-width: 400px;
+ width: 100%;
+}
+
+.download-options {
+ display: flex;
+ flex-direction: column;
+ gap: var(--spacing-md);
+ margin-top: var(--spacing-xl);
+}
+
+.download-option {
+ display: flex;
+ align-items: center;
+ gap: var(--spacing-md);
+ padding: var(--spacing-lg);
+ background: white;
+ border: 2px solid var(--gray-200);
+ border-radius: var(--radius-lg);
+ text-decoration: none;
+ color: var(--gray-900);
+ transition: all 0.2s ease;
+}
+
+.download-option:hover {
+ border-color: var(--brand-300);
+ transform: translateX(4px);
+ box-shadow: var(--shadow-md);
+}
+
+.download-option.android:hover {
+ border-color: #3DDC84;
+}
+
+.download-option.ios:hover {
+ border-color: var(--brand-500);
+}
+
+.download-icon {
+ width: 48px;
+ height: 48px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: var(--radius-md);
+ font-size: 1.5rem;
+ color: white;
+}
+
+.download-icon.android {
+ background: linear-gradient(135deg, #3DDC84 0%, #2AA852 100%);
+}
+
+.download-icon.ios {
+ background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
+}
+
+.download-info {
+ text-align: left;
+ flex: 1;
+}
+
+.download-info h3 {
+ font-size: 1rem;
+ margin-bottom: 2px;
+}
+
+.download-info p {
+ font-size: 0.75rem;
+ color: var(--gray-500);
+}
+
+/* Success Page */
+.success-container {
+ min-height: 100vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: var(--spacing-lg);
+}
+
+.success-card {
+ background: white;
+ border-radius: var(--radius-xl);
+ padding: var(--spacing-2xl);
+ box-shadow: var(--shadow-xl);
+ text-align: center;
+ max-width: 400px;
+ width: 100%;
+}
+
+.success-icon {
+ font-size: 4rem;
+ color: var(--success);
+ margin-bottom: var(--spacing-lg);
+}
+
+/* Delete Account Page */
+.delete-container {
+ min-height: 100vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: var(--spacing-lg);
+ background: var(--brand-50);
+}
+
+.delete-card {
+ background: white;
+ border-radius: var(--radius-xl);
+ padding: var(--spacing-2xl);
+ box-shadow: var(--shadow-xl);
+ max-width: 450px;
+ width: 100%;
+}
+
+.warning-icon {
+ font-size: 3rem;
+ color: var(--error);
+ margin-bottom: var(--spacing-lg);
+ display: block;
+ text-align: center;
+}
+
+.delete-card h1 {
+ text-align: center;
+ margin-bottom: var(--spacing-md);
+}
+
+.delete-card p {
+ text-align: center;
+ margin-bottom: var(--spacing-xl);
+}
+
+.delete-card .form-group {
+ margin-bottom: var(--spacing-lg);
+}
+
+.delete-card .btn-danger {
+ width: 100%;
+ margin-top: var(--spacing-md);
+}
diff --git a/apps/info-site/views/delete.pug b/apps/info-site/views/delete.pug
new file mode 100644
index 0000000..2aca558
--- /dev/null
+++ b/apps/info-site/views/delete.pug
@@ -0,0 +1,51 @@
+doctype html
+html(lang="en")
+ head
+ meta(charset="utf-8")
+ meta(name="viewport" content="width=device-width, initial-scale=1")
+ title= title
+ link(rel="stylesheet" href="/css/styles.css")
+
+ body
+ .app-container
+ // Navigation
+ nav.nav
+ a.nav-logo(href="/")
+ svg(width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z")
+ path(d="M12 6v6l4 2")
+ span Freshyo
+ ul.nav-links
+ li: a(href="/privacy-policy") Back to Policy
+
+ // Main Content
+ .app-content
+ .delete-card
+ a.back-link(href="/privacy-policy")
+ span ← Back to Privacy Policy
+
+ span.warning-icon !
+ h1 Delete Account
+ p To delete your account and personal data, please verify your mobile number. This action cannot be undone.
+
+ form(action="/delete-account" method="POST")
+ .form-group
+ label.form-label(for="mobile") Mobile Number
+ input#mobile.form-input(type="tel" name="mobile" placeholder="+91 99999 99999" required minlength="10")
+
+ button.btn.btn-danger(type="submit")
+ span Delete My Account
+
+ // Footer
+ footer.footer
+ .footer-content
+ .footer-brand
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z")
+ span Freshyo
+ .footer-links
+ a(href="#") For Farmers
+ a(href="#") For Consumers
+ a(href="/privacy-policy") Privacy Policy
+ a(href="/delete-account") Delete Account
+ p.footer-copyright © #{year} Freshyo Inc.
diff --git a/apps/info-site/views/index.pug b/apps/info-site/views/index.pug
new file mode 100644
index 0000000..7b4b045
--- /dev/null
+++ b/apps/info-site/views/index.pug
@@ -0,0 +1,93 @@
+doctype html
+html(lang="en")
+ head
+ meta(charset="utf-8")
+ meta(name="viewport" content="width=device-width, initial-scale=1")
+ title= title
+ link(rel="stylesheet" href="/css/styles.css")
+
+ body
+ .app-container
+ // Navigation
+ nav.nav
+ a.nav-logo(href="/")
+ svg(width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z")
+ path(d="M12 6v6l4 2")
+ span Freshyo
+ ul.nav-links
+ li: a(href="#features") Features
+ li: a(href="/privacy-policy") Privacy
+
+ // Main Content
+ .app-content
+ // Hero Section
+ section.hero
+ span.hero-badge Fresh & Healthy
+ h1 Fresh Meat, Fruits & Veggies
+ p Experience the true taste of nature. 100% organic, fresh products delivered to your doorstep.
+ .hero-actions
+ a.btn.btn-primary(href="/qr-based-download")
+ span Download App
+ span.icon-sm →
+ a.btn.btn-secondary(href="#features") Learn More
+
+ // Features Section
+ section.section-header#features
+ h2 Why Choose Freshyo?
+ p Building an ecosystem where freshness meets fairness
+
+ .feature-grid
+ .feature-item(data-aos="fade-up")
+ .feature-icon
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z")
+ path(d="M12 6v6l4 2")
+ .feature-content
+ h3 Farm Fresh & Healthy
+ p Nutrient-rich products straight from nature, packed with health and vitality
+
+ .feature-item(data-aos="fade-up")
+ .feature-icon
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ rect(x="1" y="3" width="15" height="13")
+ polygon(points="16 8 20 8 23 11 23 16 16 16 16 8")
+ circle cx="5.5" cy="18.5" r="2.5"
+ circle cx="18.5" cy="18.5" r="2.5"
+ .feature-content
+ h3 Trusted Delivery
+ p Farm to your doorstep with care. Freshness guaranteed, no preservatives
+
+ .feature-item(data-aos="fade-up")
+ .feature-icon
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z")
+ .feature-content
+ h3 Quality Assured
+ p Every product vetted for quality. If it's not good enough for our family, it's not for yours
+
+ // Stats Section
+ .stats-row
+ .stat-item
+ span.stat-value 500+
+ span.stat-label Farmers
+ .stat-item
+ span.stat-value 10K+
+ span.stat-label Families
+ .stat-item
+ span.stat-value 100%
+ span.stat-label Organic
+
+ // Footer
+ footer.footer
+ .footer-content
+ .footer-brand
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z")
+ span Freshyo
+ .footer-links
+ a(href="#") For Farmers
+ a(href="#") For Consumers
+ a(href="/privacy-policy") Privacy Policy
+ a(href="/delete-account") Delete Account
+ p.footer-copyright © #{year} Freshyo Inc.
diff --git a/apps/info-site/views/policy.pug b/apps/info-site/views/policy.pug
new file mode 100644
index 0000000..6adb7f1
--- /dev/null
+++ b/apps/info-site/views/policy.pug
@@ -0,0 +1,66 @@
+doctype html
+html(lang="en")
+ head
+ meta(charset="utf-8")
+ meta(name="viewport" content="width=device-width, initial-scale=1")
+ title= title
+ link(rel="stylesheet" href="/css/styles.css")
+
+ body
+ .app-container
+ // Navigation
+ nav.nav
+ a.nav-logo(href="/")
+ svg(width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z")
+ path(d="M12 6v6l4 2")
+ span Freshyo
+ ul.nav-links
+ li: a(href="/") Home
+ li: a(href="/privacy-policy" class="active") Privacy
+
+ // Main Content
+ .app-content
+ .policy-content
+ a.back-link(href="/")
+ span ← Back to Home
+
+ h1 Privacy Policy
+ p.last-updated Last Updated: December 18, 2025
+
+ p At Freshyo, we value your trust and are committed to protecting your personal information. This Privacy Policy explains how we collect, use, and safeguard your data when you use our website and services.
+
+ h2 1. Information We Collect
+ p We collect information that you provide directly to us, such as when you create an account, place an order, or contact customer support. This may include your name, email address, phone number, and delivery address.
+
+ h2 2. How We Use Your Information
+ p We use your information to:
+ ul
+ li Process and deliver your orders for fresh meat, fruits, and veggies
+ li Communicate with you regarding order updates and promotions
+ li Improve our platform and user experience
+ li Ensure the security of our services
+
+ h2 3. Data Protection
+ p We implement industry-standard security measures to protect your personal data. We do not sell your personal information to third parties.
+
+ h2 4. Contact Us
+ p If you have any questions about this Privacy Policy, please contact us at support@freshyo.com.
+
+ h2 5. Data Deletion
+ p You have the right to request the deletion of your personal data. If you wish to delete your account:
+ a.btn.btn-danger(href="/delete-account" style="margin-top: 1rem; display: inline-flex;") Delete My Account
+
+ // Footer
+ footer.footer
+ .footer-content
+ .footer-brand
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z")
+ span Freshyo
+ .footer-links
+ a(href="#") For Farmers
+ a(href="#") For Consumers
+ a(href="/privacy-policy") Privacy Policy
+ a(href="/delete-account") Delete Account
+ p.footer-copyright © #{year} Freshyo Inc.
diff --git a/apps/info-site/views/qr-download.pug b/apps/info-site/views/qr-download.pug
new file mode 100644
index 0000000..8dadc85
--- /dev/null
+++ b/apps/info-site/views/qr-download.pug
@@ -0,0 +1,68 @@
+doctype html
+html(lang="en")
+ head
+ meta(charset="utf-8")
+ meta(name="viewport" content="width=device-width, initial-scale=1")
+ title= title
+ link(rel="stylesheet", href="/css/styles.css")
+
+ body
+ .download-container
+ .download-card
+ a.back-link(href="/")
+ span ← Back to Home
+
+ h1 Download Freshyo
+ p Experience the true taste of nature on your device
+
+ .download-options
+ a.download-option.android(href="intent://play.google.com/store/apps/details?id=in.freshyo.app#Intent;scheme=https;package=com.android.vending;end;", onclick="handleAndroidClick(event)")
+ .download-icon.android
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="currentColor")
+ path(d="M17.6 9.48l1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24a11.463 11.463 0 0 0-8.94 0L5.65 5.67c-.19-.29-.58-.38-.87-.2-.28.18-.37.54-.22.83L6.4 9.48A10.78 10.78 0 0 0 1 18h22a10.78 10.78 0 0 0-5.4-8.52zM7 15.25a1.25 1.25 0 1 1 0-2.5 1.25 1.25 0 0 1 0 2.5zm10 0a1.25 1.25 0 1 1 0-2.5 1.25 1.25 0 0 1 0 2.5z")
+ .download-info
+ h3 Android
+ p Google Play Store
+
+ a.download-option.ios(href="https://apps.apple.com/in/app/freshyo/id6756889077", onclick="handleIOSClick(event)")
+ .download-icon.ios
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="currentColor")
+ path(d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.21-1.96 1.07-3.11-1.05.05-2.31.7-3.06 1.58-.68.77-1.28 2-1.12 3.16 1.19.09 2.41-.79 3.11-1.63z")
+ .download-info
+ h3 iOS
+ p Apple App Store
+
+ p.mt-lg(style="font-size: 0.75rem; color: var(--gray-500);") If you are not redirected automatically, tap above
+
+ script.
+ const ANDROID_URL = 'intent://play.google.com/store/apps/details?id=in.freshyo.app#Intent;scheme=https;package=com.android.vending;end;';
+ const IOS_URL = 'https://apps.apple.com/in/app/freshyo/id6756889077';
+
+ function detectOS() {
+ const userAgent = navigator.userAgent || navigator.vendor || window.opera;
+ if (/android/i.test(userAgent)) return 'android';
+ if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) return 'ios';
+ return 'unknown';
+ }
+
+ function redirectToStore() {
+ const os = detectOS();
+
+ if (os === 'android') {
+ window.location.href = ANDROID_URL;
+ } else if (os === 'ios') {
+ window.location.href = IOS_URL;
+ }
+ }
+
+ function handleAndroidClick(event) {
+ event.preventDefault();
+ window.location.href = ANDROID_URL;
+ }
+
+ function handleIOSClick(event) {
+ event.preventDefault();
+ window.location.href = IOS_URL;
+ }
+
+ window.addEventListener('load', redirectToStore);
diff --git a/apps/info-site/views/success.pug b/apps/info-site/views/success.pug
new file mode 100644
index 0000000..0112f6d
--- /dev/null
+++ b/apps/info-site/views/success.pug
@@ -0,0 +1,41 @@
+doctype html
+html(lang="en")
+ head
+ meta(charset="utf-8")
+ meta(name="viewport" content="width=device-width, initial-scale=1")
+ title= title
+ link(rel="stylesheet" href="/css/styles.css")
+
+ body
+ .app-container
+ // Navigation
+ nav.nav
+ a.nav-logo(href="/")
+ svg(width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z")
+ path(d="M12 6v6l4 2")
+ span Freshyo
+ ul.nav-links
+ li: a(href="/") Back to Home
+
+ // Main Content
+ .app-content
+ .success-card
+ span.success-icon ✓
+ h1 Request Received
+ p Your request to delete your account has been submitted successfully. Your data will be permanently removed within 7 days.
+ a.btn.btn-primary(href="/") Back to Home
+
+ // Footer
+ footer.footer
+ .footer-content
+ .footer-brand
+ svg(width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2")
+ path(d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z")
+ span Freshyo
+ .footer-links
+ a(href="#") For Farmers
+ a(href="#") For Consumers
+ a(href="/privacy-policy") Privacy Policy
+ a(href="/delete-account") Delete Account
+ p.footer-copyright © #{year} Freshyo Inc.
diff --git a/apps/user-ui/.env b/apps/user-ui/.env
new file mode 100644
index 0000000..f16b4c8
--- /dev/null
+++ b/apps/user-ui/.env
@@ -0,0 +1,14 @@
+
+ GOOGLE_CLIENT_ID=241178308178-olp71t2dq9fs09jrmcbhkr14db8mdhmt.apps.googleusercontent.com
+ APP_SCHEME=freshyo://
+ BASE_URL=http://localhost:8081
+ GOOGLE_AUTH_URL=https://accounts.google.com/o/oauth2/v2/auth
+
+
+androidClientId = 241178308178-t33436b5agbcnsrs1o36jr3fh1s0g8i8.apps.googleusercontent.com
+iosClientId = 241178308178-59kajtcjos0anpricj37m5u2t1b957es.apps.googleusercontent.com
+androidDebugClientId = 241178308178-t33436b5agbcnsrs1o36jr3fh1s0g8i8.apps.googleusercontent.com
+desktopClientId = 241178308178-js4dorresvnfarpu3d05f3rluubsm3rt.apps.googleusercontent.com
+desktopClientSecret = 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y
+webClientId = 241178308178-olp71t2dq9fs09jrmcbhkr14db8mdhmt.apps.googleusercontent.com
+webClientSecret = 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
\ No newline at end of file
diff --git a/apps/user-ui/.gitignore b/apps/user-ui/.gitignore
new file mode 100755
index 0000000..09ca3ac
--- /dev/null
+++ b/apps/user-ui/.gitignore
@@ -0,0 +1,7 @@
+
+# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
+# The following patterns were generated by expo-cli
+
+expo-env.d.ts
+.expo/
+# @end expo-cli
\ No newline at end of file
diff --git a/apps/user-ui/README.md b/apps/user-ui/README.md
new file mode 100755
index 0000000..48dd63f
--- /dev/null
+++ b/apps/user-ui/README.md
@@ -0,0 +1,50 @@
+# Welcome to your Expo app 👋
+
+This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
+
+## Get started
+
+1. Install dependencies
+
+ ```bash
+ npm install
+ ```
+
+2. Start the app
+
+ ```bash
+ npx expo start
+ ```
+
+In the output, you'll find options to open the app in a
+
+- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
+- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
+- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
+- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
+
+You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
+
+## Get a fresh project
+
+When you're ready, run:
+
+```bash
+npm run reset-project
+```
+
+This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
+
+## Learn more
+
+To learn more about developing your project with Expo, look at the following resources:
+
+- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
+- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
+
+## Join the community
+
+Join our community of developers creating universal apps.
+
+- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
+- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
diff --git a/apps/user-ui/app.json b/apps/user-ui/app.json
new file mode 100644
index 0000000..91d3f2e
--- /dev/null
+++ b/apps/user-ui/app.json
@@ -0,0 +1,108 @@
+{
+ "expo": {
+ "name": "Freshyo",
+ "slug": "freshyo",
+ "version": "1.1.0",
+ "orientation": "portrait",
+ "icon": "./assets/images/freshyo-logo.png",
+ "scheme": "freshyo",
+ "userInterfaceStyle": "automatic",
+ "newArchEnabled": true,
+ "ios": {
+ "buildNumber": "1.1.0",
+ "supportsTablet": true,
+ "bundleIdentifier": "com.freshyotrial.app",
+ "infoPlist": {
+ "LSApplicationQueriesSchemes": [
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay",
+ "ppemerchantsdkv1",
+ "ppemerchantsdkv2",
+ "ppemerchantsdkv3",
+ "paytmmp",
+ "gpay"
+ ],
+ "ITSAppUsesNonExemptEncryption": false,
+ "NSPhotoLibraryUsageDescription": "This app uses photo library to allow users to upload pictures as a part or product's review and feedback.",
+ "NSLocationWhenInUseUsageDescription": "This app uses your location to decide if your place is serviceable or not."
+ }
+ },
+ "android": {
+ "softwareKeyboardLayoutMode": "resize",
+ "adaptiveIcon": {
+ "foregroundImage": "./assets/images/freshyo-logo.png",
+ "backgroundColor": "#fff0f6"
+ },
+ "edgeToEdgeEnabled": true,
+ "package": "in.freshyo.app"
+ },
+ "web": {
+ "bundler": "metro",
+ "output": "static",
+ "favicon": "./assets/images/favicon.png"
+ },
+ "plugins": [
+ "expo-router",
+ [
+ "expo-splash-screen",
+ {
+ "image": "./assets/images/freshyo-logo.png",
+ "imageWidth": 200,
+ "resizeMode": "contain",
+ "backgroundColor": "#ffffff"
+ }
+ ],
+ "expo-secure-store"
+ ],
+ "experiments": {
+ "typedRoutes": true
+ },
+ "extra": {
+ "router": {},
+ "eas": {
+ "projectId": "7f3e7611-f7a8-45f9-8a99-c2b1f6454d48"
+ }
+ },
+ "runtimeVersion": {
+ "policy": "appVersion"
+
+ },
+ "updates": {
+ "url": "https://u.expo.dev/7f3e7611-f7a8-45f9-8a99-c2b1f6454d48"
+ },
+ "owner": "mohammedshafiuddin54"
+ }
+}
diff --git a/apps/user-ui/app/(auth)/_layout.tsx b/apps/user-ui/app/(auth)/_layout.tsx
new file mode 100644
index 0000000..9bacb41
--- /dev/null
+++ b/apps/user-ui/app/(auth)/_layout.tsx
@@ -0,0 +1,20 @@
+import { Stack, Redirect } from 'expo-router';
+import { View, ActivityIndicator } from 'react-native';
+import { tw } from 'common-ui';
+import { useAuth } from '@/src/contexts/AuthContext';
+
+export default function AuthLayout() {
+ const { isAuthenticated, isLoading } = useAuth();
+
+ if (isLoading) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(auth)/login.tsx b/apps/user-ui/app/(auth)/login.tsx
new file mode 100644
index 0000000..98a86df
--- /dev/null
+++ b/apps/user-ui/app/(auth)/login.tsx
@@ -0,0 +1,492 @@
+import React, { useState, useEffect, useRef } from "react";
+import { View, Alert, TextInput } from "react-native";
+import { useForm, Controller } from "react-hook-form";
+
+import { MyButton, MyText, MyTextInput, tw, StorageServiceCasual, colors, MyTouchableOpacity } from "common-ui";
+import { useAuth } from "@/src/contexts/AuthContext";
+import { trpc } from '@/src/trpc-client';
+import GoogleSignInPKCE from "common-ui/src/components/google-sign-in";
+import { LinearGradient } from "expo-linear-gradient";
+import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
+import { SafeAreaView } from "react-native-safe-area-context";
+
+interface LoginFormInputs {
+ mobile: string;
+ otp?: string;
+ password?: string;
+}
+
+function Login() {
+ const { loginWithToken } = useAuth();
+ const [isLoading, setIsLoading] = useState(false);
+ const [step, setStep] = useState<'mobile' | 'choice' | 'otp' | 'password'>('mobile');
+ const [selectedMobile, setSelectedMobile] = useState('');
+ const [canResend, setCanResend] = useState(false);
+ const [resendCountdown, setResendCountdown] = useState(0);
+ const [otpCells, setOtpCells] = useState(['', '', '', '']);
+ const intervalRef = useRef(null);
+ const inputRefs = useRef<(TextInput | null)[]>([null, null, null, null]);
+
+ const loginMutation = trpc.user.auth.login.useMutation();
+ // const loginMutation = useLogin();
+
+ // Check for stored OTP timestamp on mount
+ useEffect(() => {
+ const checkStoredOtpTime = async () => {
+ const storedTime = await StorageServiceCasual.getItem('otp_sent_time');
+ if (storedTime) {
+ const timeDiff = Date.now() - parseInt(storedTime);
+ const remainingTime = Math.max(0, 120 - Math.floor(timeDiff / 1000));
+
+ if (remainingTime > 0) {
+ setResendCountdown(remainingTime);
+ setCanResend(false);
+ } else {
+ setCanResend(true);
+ setResendCountdown(0);
+ }
+ } else {
+ setCanResend(true);
+ }
+ };
+
+ checkStoredOtpTime();
+ }, []);
+
+ // Cleanup interval on unmount
+ useEffect(() => {
+ return () => {
+ if (intervalRef.current) {
+ clearInterval(intervalRef.current);
+ intervalRef.current = null;
+ }
+ };
+ }, []);
+
+ // Countdown timer effect
+ useEffect(() => {
+ // Clear existing interval
+ if (intervalRef.current) {
+ clearInterval(intervalRef.current);
+ intervalRef.current = null;
+ }
+
+ if (resendCountdown > 0) {
+ // Set new interval and attach to ref
+ intervalRef.current = setInterval(() => {
+ setResendCountdown((prev) => {
+ if (prev <= 1) {
+ setCanResend(true);
+ return 0;
+ }
+ return prev - 1;
+ });
+ }, 1000);
+ }
+
+ return () => {
+ // Cleanup on unmount or dependency change
+ if (intervalRef.current) {
+ clearInterval(intervalRef.current);
+ intervalRef.current = null;
+ }
+ };
+ }, [resendCountdown]);
+
+
+
+ const sendOtpMutation = trpc.user.auth.sendOtp.useMutation({
+ onSuccess: async (data) => {
+ if (data.success) {
+ // Save the current timestamp for resend cooldown
+ await StorageServiceCasual.setItem('otp_sent_time', Date.now().toString());
+ setResendCountdown(120); // 2 minutes
+ setCanResend(false);
+ setStep('otp');
+ Alert.alert('Success', data.message);
+ } else {
+ Alert.alert('Error', data.message);
+ }
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to send OTP');
+ },
+ });
+
+ const verifyOtpMutation = trpc.user.auth.verifyOtp.useMutation({
+ onSuccess: (data) => {
+ if (data.success && data.token && data.user) {
+ loginWithToken(data.token, data.user);
+ } else {
+ Alert.alert('Error', 'Verification failed');
+ }
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Invalid OTP');
+ },
+ });
+
+
+
+ const {
+ control,
+ handleSubmit,
+ formState: { errors },
+ setError,
+ clearErrors,
+ setValue,
+ } = useForm({
+ defaultValues: { mobile: "", otp: "", password: "" },
+ });
+
+ const validateMobile = (mobile: string): boolean => {
+ // Remove all non-digit characters
+ const cleanMobile = mobile.replace(/\D/g, '');
+ // Check if it's a valid Indian mobile number (10 digits, starts with 6-9)
+ return cleanMobile.length === 10 && /^[6-9]/.test(cleanMobile);
+ };
+
+ const handleOtpChange = (index: number, text: string) => {
+ // Handle paste (multiple characters)
+ if (text.length > 1) {
+ const digits = text.replace(/\D/g, '').slice(0, 4);
+ const newCells = digits.split('').concat(['', '', '', '']).slice(0, 4);
+ setOtpCells(newCells);
+ const combined = newCells.join('');
+ setValue('otp', combined);
+ // Focus last filled cell
+ const lastIndex = Math.min(digits.length - 1, 3);
+ inputRefs.current[lastIndex]?.focus();
+ return;
+ }
+
+ // Handle single digit input
+ const newCells = [...otpCells];
+ newCells[index] = text;
+ setOtpCells(newCells);
+ const combined = newCells.join('');
+ setValue('otp', combined);
+
+ // Auto-focus logic
+ if (text && index < 3) {
+ // Move to next cell
+ inputRefs.current[index + 1]?.focus();
+ } else if (!text && index > 0) {
+ // Move to previous cell on delete
+ inputRefs.current[index - 1]?.focus();
+ }
+ };
+
+ const onSubmit = async (data: LoginFormInputs) => {
+ clearErrors();
+
+ if (step === 'mobile') {
+ const mobile = data.mobile.trim();
+ // Validate mobile number
+ if (!mobile) {
+ console.log('no mobile number found')
+
+ setError("mobile", {
+ type: "manual",
+ message: "Mobile number is required",
+ });
+ return;
+ }
+
+ if (!validateMobile(data.mobile)) {
+ setError("mobile", {
+ type: "manual",
+ message: "Please enter a valid 10-digit mobile number",
+ });
+ return;
+ }
+
+ const cleanMobile = data.mobile.replace(/\D/g, '');
+ setSelectedMobile(cleanMobile);
+ sendOtpMutation.mutate({ mobile });
+ } else if (step === 'otp') {
+ // Verify OTP
+ if (!data.otp || data.otp.length < 4) {
+ setError("otp", {
+ type: "manual",
+ message: "Please enter a valid OTP",
+ });
+ return;
+ }
+
+ verifyOtpMutation.mutate({
+ mobile: selectedMobile,
+ otp: data.otp,
+ });
+ } else if (step === 'password') {
+ // Login with password
+ if (!data.password || data.password.length < 6) {
+ setError("password", {
+ type: "manual",
+ message: "Password must be at least 6 characters",
+ });
+ return;
+ }
+
+ try {
+ console.log('calling the login function')
+
+ const response = await loginMutation.mutateAsync({
+ identifier: selectedMobile,
+ password: data.password,
+ });
+ loginWithToken(response.data.token, response.data.user);
+ } catch (error: any) {
+ Alert.alert('Error', error.message || 'Login failed');
+ }
+ }
+ };
+
+ return (
+
+
+
+
+
+ Welcome
+
+
+ Sign in to continue your journey
+
+
+
+
+ {step === 'mobile' && (
+ <>
+ (
+
+ {
+ // Format mobile number as user types
+ const clean = text.replace(/\D/g, '');
+ if (clean.length <= 10) {
+ onChange(clean);
+ }
+ }}
+ onBlur={onBlur}
+ keyboardType="phone-pad"
+ maxLength={10}
+ style={tw`bg-gray-50`}
+ error={!!errors.mobile}
+ />
+
+ )}
+ />
+ {errors.mobile && (
+
+ {errors.mobile.message}
+
+ )}
+ >
+ )}
+
+ {step === 'choice' && (
+
+
+ Choose your login method for {selectedMobile}
+
+
+ setStep('password')}
+ fillColor="gray1"
+ textColor="black1"
+ style={tw`flex-1 mr-2 border border-gray-200`}
+ />
+ sendOtpMutation.mutate({ mobile: selectedMobile })}
+ fillColor="brand500"
+ textColor="white1"
+ style={tw`flex-1 ml-2 shadow-sm`}
+ disabled={sendOtpMutation.isPending}
+ />
+
+ {
+ setStep('mobile');
+ setValue('mobile', '');
+ clearErrors();
+ }}
+ style={tw`mt-2`}
+ >
+
+ Change Number
+
+
+
+ )}
+
+ {step === 'otp' && (
+ <>
+
+
+ Enter 4-digit OTP
+
+
+ {[0, 1, 2, 3].map((i) => (
+ { inputRefs.current[i] = ref; }}
+ style={tw`w-14 h-14 ${errors.otp ? 'border-red-500' : 'border-gray-200'} border-2 rounded-xl text-center text-2xl font-bold ${otpCells[i] ? 'bg-blue-50 border-brand500 text-brand700' : 'bg-gray-50'}`}
+ keyboardType="numeric"
+ maxLength={1}
+ value={otpCells[i]}
+ onChangeText={(text) => handleOtpChange(i, text)}
+ selectionColor={colors.brand500}
+ />
+ ))}
+
+
+ {errors.otp && (
+
+ {errors.otp.message}
+
+ )}
+
+ {
+ setStep('password');
+ setValue('otp', '');
+ setOtpCells(['', '', '', '']);
+ clearErrors();
+ }}
+ style={tw`mb-6`}
+ >
+
+ Or login with Password
+
+
+
+
+ {
+ setStep('choice');
+ setValue('otp', '');
+ setOtpCells(['', '', '', '']);
+ clearErrors();
+ }}
+ >
+
+ Back
+
+
+
+ sendOtpMutation.mutate({ mobile: selectedMobile })}
+ disabled={!canResend || sendOtpMutation.isPending}
+ >
+
+ {sendOtpMutation.isPending
+ ? 'Sending...'
+ : canResend
+ ? 'Resend OTP'
+ : `Resend in ${resendCountdown}s`
+ }
+
+
+
+ >
+ )}
+
+ {step === 'password' && (
+ <>
+ (
+
+
+
+ )}
+ />
+ {errors.password && (
+
+ {errors.password.message}
+
+ )}
+
+
+ {
+ setStep('choice');
+ setValue('password', '');
+ clearErrors();
+ }}
+ >
+
+ Back to options
+
+
+
+ >
+ )}
+
+ {(step === 'mobile' || step === 'otp' || step === 'password') && (
+
+
+ {isLoading || sendOtpMutation.isPending || verifyOtpMutation.isPending || loginMutation.isPending
+ ? (step === 'otp' ? "Verifying..." : step === 'password' ? "Logging in..." : "Processing...")
+ : (step === 'otp' ? "Verify & Login" : step === 'password' ? "Login" : "Continue")}
+
+
+ )}
+
+
+
+
+ );
+}
+
+export default Login;
\ No newline at end of file
diff --git a/apps/user-ui/app/(auth)/register.tsx b/apps/user-ui/app/(auth)/register.tsx
new file mode 100644
index 0000000..613e671
--- /dev/null
+++ b/apps/user-ui/app/(auth)/register.tsx
@@ -0,0 +1,60 @@
+import React, { useState } from "react";
+import { View, Alert, ScrollView } from "react-native";
+import { useRouter } from "expo-router";
+
+import { MyText, tw, MyTouchableOpacity } from "common-ui";
+import { useAuth } from "@/src/contexts/AuthContext";
+import RegistrationForm from "@/components/registration-form";
+
+function Register() {
+ const router = useRouter();
+ const { register } = useAuth();
+ const [isLoading, setIsLoading] = useState(false);
+
+ const handleRegister = async (formData: FormData) => {
+ setIsLoading(true);
+ try {
+ await register(formData);
+ // Auth context will handle navigation on successful registration
+ } catch (error: any) {
+ console.error('Registration error:', error);
+ Alert.alert(
+ 'Registration Failed',
+ error.message || 'Failed to create account. Please try again.'
+ );
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ return (
+
+
+
+
+ Create Account
+
+
+ Join us to start your journey
+
+
+
+
+
+
+ Already have an account?
+ router.push('/(auth)/login')}>
+
+ Sign in
+
+
+
+
+
+ );
+}
+
+export default Register;
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(cart)/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(cart)/_layout.tsx
new file mode 100644
index 0000000..232a1de
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(cart)/_layout.tsx
@@ -0,0 +1,6 @@
+import React from 'react';
+import { Slot } from 'expo-router';
+
+export default function FlashDeliveryCartLayout() {
+ return ;
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(cart)/cart.tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(cart)/cart.tsx
new file mode 100644
index 0000000..7c2a859
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(cart)/cart.tsx
@@ -0,0 +1,6 @@
+import React from 'react';
+import CartPage from '@/components/cart-page';
+
+export default function FlashDeliveryCart() {
+ return ;
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(products)/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(products)/_layout.tsx
new file mode 100644
index 0000000..d436f2c
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(products)/_layout.tsx
@@ -0,0 +1,24 @@
+import React, { useEffect } from 'react';
+import { useLocalSearchParams } from 'expo-router';
+import { SlotLayout } from '@/components/SlotSpecificView';
+import TabLayoutWrapper from '@/components/TabLayoutWrapper';
+import { useSlotStore } from '@/components/stores/slotStore';
+
+export default function FlashDeliveryProductsLayout() {
+ const { storeId: storeIdRaw } = useLocalSearchParams();
+ const setStoreId = useSlotStore(state => state.setStoreId);
+
+ useEffect(() => {
+ setStoreId(Number(storeIdRaw));
+ }, [storeIdRaw, setStoreId]);
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(products)/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(products)/index.tsx
new file mode 100644
index 0000000..c5827fa
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/(products)/index.tsx
@@ -0,0 +1,42 @@
+import React, { useEffect } from 'react';
+import { useLocalSearchParams, useRouter } from 'expo-router';
+import { FlashDeliveryProducts } from '@/components/SlotSpecificView';
+import { useSlotStore } from '@/components/stores/slotStore';
+import FlashDeliveryNote from '@/components/FlashDeliveryNote';
+import { useFlashNavigationStore } from '@/components/stores/flashNavigationStore';
+import { useFocusEffect } from '@react-navigation/native';
+
+export default function FlashDeliveryView() {
+ const { storeId } = useLocalSearchParams<{ storeId?: string }>();
+ const setStoreId = useSlotStore(state => state.setStoreId);
+ const router = useRouter();
+ const { shouldNavigateToCart, reset } = useFlashNavigationStore();
+
+ useEffect(() => {
+ setStoreId(Number(storeId));
+ }, [storeId, setStoreId]);
+
+ useFocusEffect(
+ React.useCallback(() => {
+ if (shouldNavigateToCart) {
+ reset();
+ router.push('/(drawer)/(tabs)/flash-delivery/(cart)/cart');
+ }
+ }, [shouldNavigateToCart, router])
+ );
+
+ const handleProductPress = (productId: number) => {
+ router.push(`/(drawer)/(tabs)/flash-delivery/product-detail/${productId}`);
+ };
+
+ return (
+ <>
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/_layout.tsx
new file mode 100644
index 0000000..e8f7f8f
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/_layout.tsx
@@ -0,0 +1,54 @@
+import React from 'react';
+import { View, ActivityIndicator } from 'react-native';
+import { Slot } from 'expo-router';
+import { trpc } from '@/src/trpc-client';
+import { MyText, MyTouchableOpacity, tw, AppContainer } from 'common-ui';
+import { useRouter } from 'expo-router';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { useGetEssentialConsts } from '@/src/api-hooks/essential-consts.api';
+
+export default function FlashDeliveryBaseLayout() {
+ const router = useRouter();
+ const { data: essentialConsts, isLoading } = useGetEssentialConsts();
+
+ if (isLoading) {
+ return (
+
+
+
+ Loading...
+
+
+ );
+ }
+
+ const isFlashDeliveryEnabled = essentialConsts?.isFlashDeliveryEnabled ?? true;
+
+ if (!isFlashDeliveryEnabled) {
+ return (
+
+
+
+
+
+
+ Flash Delivery Unavailable
+
+
+ Flash Delivery is not available at the moment. Please opt for a scheduled delivery.
+
+ router.replace('/(drawer)/(tabs)/home')}
+ style={tw`bg-green-500 px-8 py-4 rounded-lg`}
+ >
+
+ Go to Scheduled Delivery
+
+
+
+
+ );
+ }
+
+ return ;
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/checkout.tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/checkout.tsx
new file mode 100644
index 0000000..397ccf3
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/checkout.tsx
@@ -0,0 +1,6 @@
+import React from 'react';
+import CheckoutPage from '@/components/checkout-page';
+
+export default function FlashDeliveryCheckout() {
+ return ;
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/index.tsx
new file mode 100644
index 0000000..1b832bd
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/index.tsx
@@ -0,0 +1,5 @@
+import { Redirect } from 'expo-router';
+
+export default function FlashDeliveryIndex() {
+ return ;
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/order-success.tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/order-success.tsx
new file mode 100644
index 0000000..c4cd705
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/order-success.tsx
@@ -0,0 +1,79 @@
+import React from "react";
+import { View } from "react-native";
+import { useRouter, useLocalSearchParams } from "expo-router";
+import { AppContainer, MyText, MyButton, tw } from "common-ui";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+
+export default function FlashDeliveryOrderSuccess() {
+ const router = useRouter();
+ const params = useLocalSearchParams();
+
+ // You can access order details from params if passed
+ const orderId = params.orderId as string;
+ const totalAmount = params.totalAmount as string;
+
+ return (
+
+
+ {/* Success Icon */}
+
+
+
+
+ {/* Success Message */}
+
+ Flash Order Placed!
+
+
+
+ Lightning-fast delivery on the way!
+
+
+
+ Your order will be delivered in just 30 minutes
+
+
+ {/* Order Details (if available) */}
+ {orderId && (
+
+
+ Flash Order #{orderId}
+
+ {totalAmount && (
+
+ Total: ₹{totalAmount}
+
+ )}
+
+ )}
+
+ {/* Action Buttons */}
+
+ router.replace("/(drawer)/(tabs)/flash-delivery")}
+ fillColor="brand500"
+ textColor="white1"
+ fullWidth
+ />
+
+ {
+ router.dismissAll();
+ router.replace("/(drawer)/(tabs)/me/my-orders");
+ }}
+ fillColor="gray1"
+ textColor="black1"
+ fullWidth
+ />
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/product-detail/[id].tsx b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/product-detail/[id].tsx
new file mode 100644
index 0000000..d775bb4
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/flash-delivery/product-detail/[id].tsx
@@ -0,0 +1,9 @@
+import React from 'react';
+import { useLocalSearchParams } from 'expo-router';
+import ProductDetail from '@/components/ProductDetail';
+
+export default function FlashDeliveryProductDetail() {
+ const { id } = useLocalSearchParams();
+
+ return ;
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/_layout.tsx
new file mode 100644
index 0000000..ca8365f
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/_layout.tsx
@@ -0,0 +1,24 @@
+import FloatingCartBar from "@/components/floating-cart-bar";
+import { tw } from "common-ui";
+import { Stack } from "expo-router";
+import { View } from "react-native";
+
+export default function HomeLayout() {
+ return (
+ <>
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/cart.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/cart.tsx
new file mode 100644
index 0000000..b4d61d3
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/cart.tsx
@@ -0,0 +1,14 @@
+import CartPage from '@/components/cart-page'
+import React from 'react'
+
+interface Props {}
+
+function Cart(props: Props) {
+ const {} = props
+
+ return (
+
+ )
+}
+
+export default Cart
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/checkout.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/checkout.tsx
new file mode 100644
index 0000000..0d40fb1
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/checkout.tsx
@@ -0,0 +1,12 @@
+import CheckoutPage from '@/components/checkout-page';
+import React from 'react';
+
+interface Props {}
+
+function Checkout(props: Props) {
+ const {} = props;
+
+ return ;
+}
+
+export default Checkout;
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/index.tsx
new file mode 100755
index 0000000..168761d
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/index.tsx
@@ -0,0 +1,530 @@
+import React, { useState } from "react";
+import { View, Dimensions, Image, Alert, ScrollView, StatusBar as RNStatusBar } from "react-native";
+import { StatusBar as ExpoStatusBar } from 'expo-status-bar';
+import { LinearGradient } from "expo-linear-gradient";
+import { useRouter } from "expo-router";
+import {
+ theme,
+ tw,
+ useManualRefresh,
+ useMarkDataFetchers,
+ LoadingDialog,
+ AppContainer,
+ MyTouchableOpacity,
+ MyText, MyTextInput, SearchBar, useStatusBarStore
+} from "common-ui";
+
+import dayjs from "dayjs";
+import relativeTime from "dayjs/plugin/relativeTime";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import FontAwesome5 from "@expo/vector-icons/FontAwesome5";
+import { Ionicons } from "@expo/vector-icons";
+import ProductCard from "@/components/ProductCard";
+
+import { trpc } from "@/src/trpc-client";
+import { useGetCart } from "@/hooks/cart-query-hooks";
+import { useProductSlotIdentifier } from "@/hooks/useProductSlotIdentifier";
+import FloatingCartBar from "@/components/floating-cart-bar";
+import AddressSelector from "@/components/AddressSelector";
+import BannerCarousel from "@/components/BannerCarousel";
+import TestingPhaseNote from "@/components/TestingPhaseNote";
+import { useUserDetails } from "@/src/contexts/AuthContext";
+import TabLayoutWrapper from "@/components/TabLayoutWrapper";
+import { useNavigationStore } from "@/src/store/navigationStore";
+import { useGetEssentialConsts } from "@/src/api-hooks/essential-consts.api";
+dayjs.extend(relativeTime);
+// import { StatusBar } from "expo-status-bar";
+
+const { width: screenWidth } = Dimensions.get("window");
+const itemWidth = screenWidth * 0.45; // 45% of screen width
+
+const RenderStore = ({
+ item,
+}: {
+ item: any;
+}) => {
+ const router = useRouter();
+ const { setNavigatedFromHome, setSelectedStoreId } = useNavigationStore();
+
+ const handlePress = () => {
+ setNavigatedFromHome(true);
+ setSelectedStoreId(item.id);
+ router.push('/(drawer)/(tabs)/stores');
+ };
+
+ return (
+
+
+ {item.signedImageUrl ? (
+
+ ) : (
+
+ )}
+
+
+
+ {item.name.replace(/^The\s+/i, "")}
+
+
+ );
+};
+
+// const headerColor = '#fedf89'
+// const headerColor = '#444ce7'
+const headerColor = '#f81260'
+
+export default function Dashboard() {
+ const router = useRouter();
+ const userDetails = useUserDetails();
+ const [inputQuery, setInputQuery] = useState("");
+ const [searchQuery, setSearchQuery] = useState("");
+ const [selectedTagId, setSelectedTagId] = useState(null);
+ const [isLoadingDialogOpen, setIsLoadingDialogOpen] = useState(false);
+ const [gradientHeight, setGradientHeight] = useState(0);
+ const [stickyBarLayout, setStickyBarLayout] = useState({ y: 0, height: 0 });
+ const [whiteSectionLayout, setWhiteSectionLayout] = useState({ y: 0 });
+ const { backgroundColor } = useStatusBarStore();
+
+ const {
+ data: productsData,
+ isLoading,
+ error,
+ refetch,
+ } = trpc.common.product.getAllProductsSummary.useQuery({
+ searchQuery: searchQuery || undefined,
+ tagId: selectedTagId || undefined,
+ });
+
+ const { data: essentialConsts, isLoading: isLoadingConsts, error: constsError } = useGetEssentialConsts();
+
+ const { data: tagsData } = trpc.common.product.getDashboardTags.useQuery();
+ const { data: cartData, refetch: refetchCart } = useGetCart();
+ const { data: storesData } = trpc.user.stores.getStores.useQuery();
+ const { data: defaultAddressResponse } =
+ trpc.user.address.getDefaultAddress.useQuery();
+ const { data: slotsData } = trpc.user.slots.getSlotsWithProducts.useQuery();
+
+ const products = productsData?.products || [];
+ const dashboardTags = tagsData?.tags || [];
+ const defaultAddress = defaultAddressResponse?.data;
+ const { getQuickestSlot } = useProductSlotIdentifier();
+
+ // Extract popular items IDs as an array to preserve order
+ const popularItemIds = (() => {
+ const popularItems = essentialConsts?.popularItems;
+ if (!popularItems) return [];
+
+ if (Array.isArray(popularItems)) {
+ // Already an array of IDs
+ return popularItems.map((id: any) => parseInt(id)).filter((id: number) => !isNaN(id));
+ } else if (typeof popularItems === 'string') {
+ // Comma-separated string
+ return popularItems
+ .split(',')
+ .map((id: string) => parseInt(id.trim()))
+ .filter((id: number) => !isNaN(id));
+ }
+ return [];
+ })();
+
+ // Filter products to only include those whose ID exists in popularItemIds, preserving order
+ // Only filter when both products and essentialConsts are loaded
+ const popularProducts = popularItemIds
+ .map(id => products.find(product => product.id === id))
+ .filter((product): product is NonNullable => product != null);
+
+
+ useManualRefresh(() => {
+ refetch();
+ });
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const handleScroll = (event: any) => {
+ // const scrollY = event.nativeEvent.contentOffset.y;
+ // const stickyBarBottom = stickyBarLayout.y + stickyBarLayout.height;
+ // const whiteSectionTop = whiteSectionLayout.y;
+
+ // const shouldBeWhite = scrollY + stickyBarBottom >= whiteSectionTop;
+
+ // if (shouldBeWhite) {
+ // updateStatusBarColor('dark', '#ffffff');
+ // } else {
+ // updateStatusBarColor('light', headerColor);
+ // }
+ };
+
+ // React.useFocu(() => {
+ // // Initial status bar color
+ // return () => updateStatusBarColor('dark', '#ffffff');
+ // }, []);
+
+ if (isLoading || isLoadingConsts) {
+ return (
+
+
+ {isLoading ? 'Loading products...' : 'Loading app settings...'}
+
+
+ );
+ }
+
+ if (error || constsError) {
+ return (
+
+
+ Oops!
+
+ {error ? 'Failed to load products' : 'Failed to load app settings'}
+
+
+ );
+ }
+
+
+ return (
+
+ {/* */}
+
+
+
+
+
+
+ router.push("/(drawer)/(tabs)/me")}
+ style={tw`bg-white/10 rounded-full border border-white/10`}
+ >
+ {userDetails?.profileImage ? (
+
+ ) : (
+
+ )}
+
+
+
+ {
+ const { y, height } = event.nativeEvent.layout;
+ setStickyBarLayout({ y, height });
+ }}
+ >
+ { }}
+ onPress={() => router.push("/(drawer)/(tabs)/home/search-results")}
+ editable={false}
+ containerStyle={tw` bg-white`}
+ onSubmitEditing={() => {
+ if (inputQuery.trim()) {
+ router.push(
+ `/(drawer)/(tabs)/home/search-results?q=${encodeURIComponent(
+ inputQuery.trim()
+ )}`
+ );
+ }
+ }}
+ returnKeyType="search"
+ />
+
+
+ {
+ const { y, height } = event.nativeEvent.layout;
+ setGradientHeight(y + height);
+ }}
+ >
+ {/* Stores Section */}
+ {storesData?.stores && storesData.stores.length > 0 && (
+
+
+
+
+ Our Stores
+
+
+ Fresh from our locations
+
+
+
+
+
+ {storesData.stores.map((store, index) => (
+
+
+
+ ))}
+
+
+
+ )}
+
+
+ {/* Banner Carousel */}
+
+
+
+
+
+
+ {/* White Section */}
+ {
+ const { y } = event.nativeEvent.layout;
+ setWhiteSectionLayout({ y });
+ }}
+ >
+ {/* Section Title */}
+
+
+ Popular Items
+
+
+ Trending fresh picks just for you
+
+
+
+
+
+ {popularProducts.map((item, index: number) => (
+
+
+ router.push(
+ `/(drawer)/(tabs)/home/product-detail/${item.id}`
+ )
+ }
+ showDeliveryInfo={false}
+ miniView={true}
+ />
+
+ ))}
+
+
+
+
+ {/* Upcoming Deliveries Section */}
+ {slotsData?.slots && slotsData.slots.length > 0 && (
+
+
+
+
+ Delivery Slots
+
+
+ Plan your fresh deliveries ahead
+
+
+
+
+
+ {slotsData.slots.slice(0, 5).map((slot) => {
+ const now = dayjs();
+ const freezeTime = dayjs(slot.freezeTime);
+ const isClosingSoon =
+ freezeTime.diff(now, "hour") < 4 && freezeTime.isAfter(now);
+
+ return (
+
+ router.push(
+ `/(drawer)/(tabs)/home/slot-view?slotId=${slot.id}`
+ )
+ }
+ activeOpacity={0.9}
+ >
+ {/* Status Badge */}
+
+ {isClosingSoon && (
+
+
+
+ CLOSING SOON
+
+
+ )}
+
+
+ {/* Main Time Grid */}
+
+
+
+
+
+
+
+ Delivery At
+
+
+
+ {dayjs(slot.deliveryTime).format("h:mm A")}
+
+
+ {dayjs(slot.deliveryTime).format("ddd, MMM DD")}
+
+
+
+
+
+
+
+
+
+ Order By
+
+
+
+ {dayjs(slot.freezeTime).format("h:mm A")}
+
+
+ {dayjs(slot.freezeTime).format("ddd, MMM DD")}
+
+
+
+
+ {/* Product Teaser */}
+
+
+ {slot.products.slice(0, 3).map((p, i) => (
+ 0 && tw`-ml-3`,
+ ]}
+ >
+ {p.images?.[0] ? (
+
+ ) : (
+
+ )}
+
+ ))}
+
+
+ View all {slot.products.length} items
+
+
+
+
+ );
+ })}
+
+
+ )}
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/order-success.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/order-success.tsx
new file mode 100644
index 0000000..1a1bb94
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/order-success.tsx
@@ -0,0 +1,79 @@
+import React from "react";
+import { View } from "react-native";
+import { useRouter, useLocalSearchParams } from "expo-router";
+import { AppContainer, MyText, MyButton, tw } from "common-ui";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+
+export default function OrderSuccess() {
+ const router = useRouter();
+ const params = useLocalSearchParams();
+
+ // You can access order details from params if passed
+ const orderId = params.orderId as string;
+ const totalAmount = params.totalAmount as string;
+
+ return (
+
+
+ {/* Success Icon */}
+
+
+
+
+ {/* Success Message */}
+
+ Order Placed Successfully!
+
+
+
+ Thank you for your order
+
+
+
+ Your order will be delivered as per your selected slot
+
+
+ {/* Order Details (if available) */}
+ {orderId && (
+
+
+ Order #{orderId}
+
+ {totalAmount && (
+
+ Total: ₹{totalAmount}
+
+ )}
+
+ )}
+
+ {/* Action Buttons */}
+
+ router.replace("/(drawer)/(tabs)/home")}
+ fillColor="brand500"
+ textColor="white1"
+ fullWidth
+ />
+
+ {
+ router.dismissAll();
+ router.replace("/(drawer)/(tabs)/me/my-orders");
+ }}
+ fillColor="gray1"
+ textColor="black1"
+ fullWidth
+ />
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/product-detail/[id].tsx b/apps/user-ui/app/(drawer)/(tabs)/home/product-detail/[id].tsx
new file mode 100755
index 0000000..bd63cf4
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/product-detail/[id].tsx
@@ -0,0 +1,21 @@
+import React from 'react';
+import { useLocalSearchParams } from 'expo-router';
+import ProductDetail from '@/components/ProductDetail';
+import { View } from 'react-native';
+import { tw } from 'common-ui';
+import FloatingCartBar from '@/components/floating-cart-bar';
+
+export default function ProductDetailPage() {
+ const { id } = useLocalSearchParams();
+ const productId = id as string;
+
+ return (
+
+
+ {/*
+
+ */}
+
+
+ )
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/product-detail/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/product-detail/_layout.tsx
new file mode 100644
index 0000000..871c3ae
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/product-detail/_layout.tsx
@@ -0,0 +1,20 @@
+import FloatingCartBar from "@/components/floating-cart-bar";
+import { tw } from "common-ui";
+import { Stack } from "expo-router";
+import { View } from "react-native";
+
+export default function ProductDetailLayout() {
+ return (
+ <>
+
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/search-results/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/search-results/_layout.tsx
new file mode 100644
index 0000000..74b77f5
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/search-results/_layout.tsx
@@ -0,0 +1,20 @@
+import FloatingCartBar from '@/components/floating-cart-bar';
+import { tw } from 'common-ui';
+import { Stack } from 'expo-router';
+import { View } from 'react-native';
+
+export default function SearchResultsLayout() {
+ return (
+ <>
+
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/search-results/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/search-results/index.tsx
new file mode 100644
index 0000000..5cc2c7a
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/search-results/index.tsx
@@ -0,0 +1,176 @@
+import React, { useState, useRef, useEffect } from "react";
+import {
+ View,
+ Dimensions,
+ Image,
+ Alert,
+ Platform,
+} from "react-native";
+import { useRouter, useLocalSearchParams } from "expo-router";
+import {
+ theme,
+ tw,
+ useManualRefresh,
+ useMarkDataFetchers,
+ LoadingDialog,
+ AppContainer,
+ MyFlatList,
+ MyText,
+ MyTextInput,
+ MyTouchableOpacity,
+ SearchBar } from "common-ui";
+import dayjs from "dayjs";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { trpc } from "@/src/trpc-client";
+import { useGetCart, useAddToCart } from '@/hooks/cart-query-hooks';
+import ProductCard from "@/components/ProductCard";
+import FloatingCartBar from "@/components/floating-cart-bar";
+
+const { width: screenWidth } = Dimensions.get("window");
+const itemWidth = (screenWidth - 48) / 2; // 48 = padding horizontal (16*2) + gap (16)
+
+
+export default function SearchResults() {
+ const router = useRouter();
+ const { q } = useLocalSearchParams();
+ const query = (q as string) || "";
+ const [inputQuery, setInputQuery] = useState(query);
+ const [searchQuery, setSearchQuery] = useState(query);
+ const [isLoadingDialogOpen, setIsLoadingDialogOpen] = useState(false);
+ const searchInputRef = useRef(null);
+
+ useEffect(() => {
+ // Auto-focus search bar on mount
+ setTimeout(() => {
+ searchInputRef.current?.focus();
+ }, 100);
+ }, []);
+
+ const {
+ data: productsData,
+ isLoading,
+ error,
+ refetch,
+ } = trpc.common.product.getAllProductsSummary.useQuery({
+ searchQuery: searchQuery || undefined,
+ });
+
+ const { data: cartData, refetch: refetchCart } = useGetCart();
+
+ const products = productsData?.products || [];
+ const addToCart = useAddToCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true });
+
+ useManualRefresh(() => {
+ refetch();
+ });
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const handleAddToCart = (productId: number) => {
+ setIsLoadingDialogOpen(true);
+ addToCart.mutate(
+ { productId, quantity: 1 },
+ {
+ onSuccess: () => {
+ Alert.alert("Success", "Item added to cart!");
+ refetchCart();
+ },
+ onError: (error: any) => {
+ Alert.alert("Error", error.message || "Failed to add item to cart");
+ },
+ onSettled: () => {
+ setIsLoadingDialogOpen(false);
+ },
+ }
+ );
+ };
+
+ const handleBuyNow = (productId: number) => {
+ setIsLoadingDialogOpen(true);
+ addToCart.mutate(
+ { productId, quantity: 1 },
+ {
+ onSuccess: () => {
+ router.push(`/(drawer)/(tabs)/home/cart?select=${productId}`);
+ },
+ onError: (error: any) => {
+ Alert.alert("Error", error.message || "Failed to add item to cart");
+ },
+ onSettled: () => {
+ setIsLoadingDialogOpen(false);
+ },
+ }
+ );
+ };
+
+ const handleSearch = () => {
+ setSearchQuery(inputQuery);
+ };
+
+ if (isLoading) {
+ return (
+
+ Loading products...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Oops!
+ Failed to load products
+
+ );
+ }
+
+ return (
+
+ (
+ router.push(`/(drawer)/(tabs)/home/product-detail/${item.id}`)}
+ showDeliveryInfo={false}
+ iconType="flash"
+ />
+ )}
+ keyExtractor={(item, index) => index.toString()}
+ columnWrapperStyle={{ gap: 16, justifyContent: 'center' }}
+ contentContainerStyle={[tw`pb-24`, { gap: 16 }]}
+ ListHeaderComponent={
+
+ {/* Search Bar */}
+
+
+ {/* Section Title */}
+
+
+ {searchQuery ? `Search Results for "${searchQuery}"` : 'All Products'}
+
+
+
+ }
+ />
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/slot-view/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/slot-view/_layout.tsx
new file mode 100644
index 0000000..fea7f09
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/slot-view/_layout.tsx
@@ -0,0 +1,26 @@
+import React, { useEffect } from 'react';
+import { View } from 'react-native';
+import { useLocalSearchParams } from 'expo-router';
+import { SlotLayout } from '@/components/SlotSpecificView';
+import TabLayoutWrapper from '@/components/TabLayoutWrapper';
+import { useSlotStore } from '@/components/stores/slotStore';
+
+export default function SlotViewLayout() {
+ const { slotId: id, storeId: storeIdRaw } = useLocalSearchParams();
+ const slotId = id ? Number(id) : undefined;
+ const setSlotId = useSlotStore(state => state.setSlotId);
+ const setStoreId = useSlotStore(state => state.setStoreId);
+
+
+ useEffect(() => {
+ setSlotId(slotId);
+ setStoreId(Number(storeIdRaw));
+ }, [slotId, storeIdRaw, setSlotId, setStoreId]);
+
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/home/slot-view/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/home/slot-view/index.tsx
new file mode 100644
index 0000000..0c67c12
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/home/slot-view/index.tsx
@@ -0,0 +1,23 @@
+import React, { useEffect } from 'react';
+import { View } from 'react-native';
+import { useLocalSearchParams } from 'expo-router';
+import { SlotProducts } from '@/components/SlotSpecificView';
+import { useSlotStore } from '@/components/stores/slotStore';
+import TabLayoutWrapper from '@/components/TabLayoutWrapper';
+
+export default function SlotView() {
+ const params = useLocalSearchParams();
+ const { slotId:id, storeId } = useLocalSearchParams();
+ const slotId = id ? Number(id) : undefined;
+ const setSlotId = useSlotStore(state => state.setSlotId);
+ const setStoreId = useSlotStore(state => state.setStoreId);
+
+ useEffect(() => {
+ setSlotId(slotId);
+ setStoreId(Number(storeId));
+ }, [slotId, storeId, setSlotId, setStoreId]);
+
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/_layout.tsx
new file mode 100644
index 0000000..fcace8d
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/_layout.tsx
@@ -0,0 +1,17 @@
+import { useAuthenticatedRoute } from "@/hooks/useAuthenticatedRoute";
+import { Stack } from "expo-router";
+
+export default function MeLayout() {
+ // Protect all profile routes - redirect to login if not authenticated
+ useAuthenticatedRoute({
+ targetUrl: '/(drawer)/(tabs)/me'
+ });
+
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/about/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/about/_layout.tsx
new file mode 100644
index 0000000..51cdaa5
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/about/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router'
+
+function AboutLayout() {
+ return (
+
+ )
+}
+
+export default AboutLayout
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/about/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/about/index.tsx
new file mode 100644
index 0000000..1fb8c5f
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/about/index.tsx
@@ -0,0 +1,167 @@
+import React from 'react';
+import { View, ScrollView, Linking } from 'react-native';
+import { Image } from 'expo-image';
+import { AppContainer, MyText, tw, MyTouchableOpacity } from 'common-ui';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import FontAwesome5 from '@expo/vector-icons/FontAwesome5';
+
+export default function About() {
+ const openLink = (url: string) => {
+ Linking.openURL(url).catch((err) => console.error("Couldn't load page", err));
+ };
+
+ return (
+
+
+ {/* Hero Section */}
+
+
+
+
+
+
+
+ Meat Farmer
+
+
+ Bringing local trust and online convenience together.
+
+
+
+
+ {/* Mission Cards */}
+
+ Our Mission
+
+
+
+
+
+ Local Roots
+ Based in MBNR, supporting our community.
+
+
+
+
+
+ Best Price
+ Minimizing costs to enhance your buying experience.
+
+
+
+
+
+ Quality First
+ Committed to fresh, high-quality meat products.
+
+
+
+
+
+ Farmers First
+ Dedicated to supporting local farmers.
+
+
+
+
+ {/* Sourcing Section */}
+
+
+
+
+
+
+ Sourcing & Quality
+
+
+
+
+
+
+ All items are procured directly from authorized dealers.
+
+
+
+
+
+ 100% local products sourced from trusted suppliers.
+
+
+
+
+
+ All products are purely Halal certified.
+
+
+
+
+
+
+ {/* Payments & Refunds Section */}
+
+
+
+
+
+
+ Payments & Refunds
+
+
+
+
+ Payment Options: Online or Cash on Delivery (COD).
+
+
+ Complaints: Must be raised within 12 hours of delivery.
+
+
+
+
+
+
+
+ Refunds are processed to the original payment method.
+
+
+
+
+
+ Alternatively, receive a refund coupon for future purchases.
+
+
+
+
+
+ Processing time: Up to 3 business days.
+
+
+
+
+
+
+ {/* Footer */}
+
+ Follow us
+
+
+
+
+
+
+
+
+
+
+
+
+ © 2024 Meat Farmer. All rights reserved.
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/addresses/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/addresses/_layout.tsx
new file mode 100644
index 0000000..5415704
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/addresses/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from 'expo-router';
+
+export default function AddressesLayout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/addresses/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/addresses/index.tsx
new file mode 100644
index 0000000..7a9eb41
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/addresses/index.tsx
@@ -0,0 +1,278 @@
+import React, { useState } from 'react';
+import { View, Alert, Modal } from 'react-native';
+import { useRouter } from 'expo-router';
+import { AppContainer, MyText, tw, useMarkDataFetchers, MyFlatList, MyTouchableOpacity } from 'common-ui';
+import { trpc } from '@/src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import AddressForm from '@/src/components/AddressForm';
+
+interface Address {
+ id: number;
+ name: string;
+ phone: string;
+ addressLine1: string;
+ addressLine2: string | null;
+ city: string;
+ state: string;
+ pincode: string;
+ isDefault: boolean;
+}
+
+function AddressCard({ address, onEdit, onDelete, onSetDefault, isDeleting }: {
+ address: Address;
+ onEdit: (address: Address) => void;
+ onDelete: (id: number) => void;
+ onSetDefault: (id: number) => void;
+ isDeleting?: boolean;
+}) {
+ const formatAddress = (addr: Address) => {
+ return `${addr.addressLine1}${addr.addressLine2 ? `, ${addr.addressLine2}` : ''}, ${addr.city}, ${addr.state} - ${addr.pincode}`;
+ };
+
+ return (
+
+
+
+
+
+ {address.name}
+
+ {address.isDefault && (
+
+ Default
+
+ )}
+
+
+ 📞 {address.phone}
+
+
+ 📍 {formatAddress(address)}
+
+
+
+
+
+ {!address.isDefault && (
+ onSetDefault(address.id)}
+ >
+ Set Default
+
+ )}
+ onEdit(address)}
+ >
+ Edit
+
+ onDelete(address.id)}
+ disabled={isDeleting}
+ >
+
+ {isDeleting ? 'Deleting...' : 'Delete'}
+
+
+
+
+ );
+}
+
+export default function Addresses() {
+ const [modalVisible, setModalVisible] = useState(false);
+ const [editingAddress, setEditingAddress] = useState(null);
+
+ const { data, isLoading, error, refetch } = trpc.user.address.getUserAddresses.useQuery();
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const addresses = data?.data || [];
+
+ const updateAddressMutation = trpc.user.address.updateAddress.useMutation();
+ const deleteAddressMutation = trpc.user.address.deleteAddress.useMutation();
+
+ const handleAddAddress = () => {
+ setEditingAddress(null);
+ setModalVisible(true);
+ };
+
+ const handleEditAddress = (address: Address) => {
+ setEditingAddress(address);
+ setModalVisible(true);
+ };
+
+ const handleDeleteAddress = (id: number) => {
+ Alert.alert(
+ 'Delete Address',
+ 'Are you sure you want to delete this address?',
+ [
+ { text: 'Cancel', style: 'cancel' },
+ {
+ text: 'Delete',
+ style: 'destructive',
+ onPress: () => {
+ deleteAddressMutation.mutate({ id }, {
+ onSuccess: () => {
+ refetch();
+ Alert.alert('Success', 'Address deleted successfully');
+ },
+ onError: (error) => {
+ Alert.alert('Error', error.message || 'Failed to delete address');
+ }
+ });
+ }
+ }
+ ]
+ );
+ };
+
+ const handleSetDefault = (id: number) => {
+ // Update the address to be default
+ const addressToUpdate = addresses.find(addr => addr.id === id);
+ if (addressToUpdate) {
+ updateAddressMutation.mutate({
+ id: addressToUpdate.id,
+ name: addressToUpdate.name,
+ phone: addressToUpdate.phone,
+ addressLine1: addressToUpdate.addressLine1,
+ addressLine2: addressToUpdate.addressLine2 || undefined,
+ city: addressToUpdate.city,
+ state: addressToUpdate.state,
+ pincode: addressToUpdate.pincode,
+ isDefault: true,
+ }, {
+ onSuccess: () => {
+ refetch();
+ Alert.alert('Success', 'Default address updated');
+ },
+ onError: (error) => {
+ Alert.alert('Error', error.message || 'Failed to update default address');
+ }
+ });
+ }
+ };
+
+ const handleAddressSubmit = () => {
+ setModalVisible(false);
+ setEditingAddress(null);
+ refetch();
+ };
+
+ if (isLoading) {
+ return (
+
+
+ Loading addresses...
+
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+
+
+ Failed to load addresses. Please try again.
+
+ refetch()}
+ >
+ Retry
+
+
+
+ );
+ }
+
+ return (
+ <>
+ (
+
+ )}
+ keyExtractor={(item) => item.id.toString()}
+ ListHeaderComponent={() => (
+
+
+ My Addresses
+
+
+
+
+
+ )}
+ ListEmptyComponent={() => (
+
+
+
+ No addresses found
+
+
+ Add your first delivery address
+
+
+ Add Address
+
+
+ )}
+ contentContainerStyle={tw`p-4`}
+ showsVerticalScrollIndicator={false}
+ />
+
+ setModalVisible(false)}
+ >
+
+
+
+ {editingAddress ? 'Edit Address' : 'Add Address'}
+
+ setModalVisible(false)}
+ style={tw`p-1`}
+ >
+
+
+
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/complaints/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/complaints/_layout.tsx
new file mode 100644
index 0000000..7654ab9
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/complaints/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router'
+
+function ComplaintsLayout() {
+ return (
+
+ )
+}
+
+export default ComplaintsLayout
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/complaints/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/complaints/index.tsx
new file mode 100644
index 0000000..948182d
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/complaints/index.tsx
@@ -0,0 +1,187 @@
+import React from 'react';
+import { View, Linking, TouchableOpacity, ActivityIndicator } from 'react-native';
+import { Image } from 'expo-image';
+import { MyText, tw, useManualRefresh, MyFlatList, useMarkDataFetchers, theme, MyTouchableOpacity } from 'common-ui';
+import { MaterialIcons, Ionicons } from '@expo/vector-icons';
+import { trpc } from '@/src/trpc-client';
+import { useGetEssentialConsts } from '@/src/api-hooks/essential-consts.api';
+import dayjs from 'dayjs';
+import { useRouter } from 'expo-router';
+
+interface ComplaintItemProps {
+ item: any;
+}
+
+const ComplaintItem: React.FC = ({ item }) => (
+
+ {/* Header: ID, Date, Status */}
+
+
+
+
+ Complaint #{item.id}
+
+ {item.orderId && (
+
+
+ Order #{item.orderId}
+
+
+ )}
+
+
+ {dayjs(item.createdAt).format('MMM DD, YYYY • h:mm A')}
+
+
+
+
+
+ {item.isResolved ? 'Resolved' : 'Pending'}
+
+
+
+
+ {/* Complaint Body */}
+
+ {item.complaintBody}
+
+
+ {/* Admin Response */}
+ {item.response && (
+
+
+
+
+
+
+ Support Response
+
+
+
+ {item.response}
+
+
+ )}
+
+ {!item.response && !item.isResolved && (
+
+
+
+ We are reviewing your complaint...
+
+
+ )}
+
+);
+
+export default function Complaints() {
+ const router = useRouter();
+ const { data, isLoading, error, refetch } = trpc.user.complaint.getAll.useQuery();
+ const complaints = data?.complaints || [];
+
+ const { data: constsData } = useGetEssentialConsts();
+
+ useManualRefresh(() => refetch());
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ if (isLoading) {
+ return (
+
+ Loading complaints...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Oops!
+ Failed to load complaints
+
+ );
+ }
+
+
+
+ return (
+
+ item.id.toString()}
+ renderItem={({ item }) => }
+ contentContainerStyle={tw`px-4 py-6`}
+ ListHeaderComponent={
+
+
+
+
+
+ Need Help?
+
+
+
+ {
+ const phone = constsData?.supportMobile || '8688182552';
+ Linking.openURL(`tel:${phone}`);
+ }}
+ >
+
+
+
+
+ Call Us
+
+ {constsData?.supportMobile || '8688182552'}
+
+
+
+
+ {
+ const email = constsData?.supportEmail || 'qushammohd@gmail.com';
+ Linking.openURL(`mailto:${email}`);
+ }}
+ >
+
+
+
+
+ Email
+
+ {constsData?.supportEmail || 'qushammohd@gmail.com'}
+
+
+
+
+
+ }
+ ListEmptyComponent={
+
+
+
+
+ No Complaints
+
+ You haven't raised any complaints yet. That's great!
+
+ router.push('/(drawer)/(tabs)/home')}
+ style={tw`mt-8 bg-brand500 px-6 py-3 rounded-xl shadow-sm`}
+ >
+ Continue Shopping
+
+
+ }
+ />
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/coupons/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/coupons/_layout.tsx
new file mode 100644
index 0000000..622608a
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/coupons/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from 'expo-router';
+
+export default function CouponsLayout() {
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/coupons/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/coupons/index.tsx
new file mode 100644
index 0000000..041e65e
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/coupons/index.tsx
@@ -0,0 +1,206 @@
+import React, { useState } from 'react';
+import { View, ScrollView, Alert } from 'react-native';
+import { AppContainer, MyText, tw, useMarkDataFetchers, MyTouchableOpacity, MyTextInput } from 'common-ui';
+import { trpc } from '@/src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import dayjs from 'dayjs';
+
+interface CouponCardProps {
+ coupon: {
+ id: number;
+ code: string;
+ discountType: 'percentage' | 'flat';
+ discountValue: number;
+ maxValue?: number;
+ minOrder?: number;
+ description: string;
+ validTill?: string | Date;
+ usageCount: number;
+ maxLimitForUser?: number;
+ isExpired: boolean;
+ isUsedUp: boolean;
+ };
+}
+
+function CouponCard({ coupon }: CouponCardProps) {
+ const getStatusColor = () => {
+ if (coupon.isExpired) return 'text-red-500';
+ if (coupon.isUsedUp) return 'text-orange-500';
+ return 'text-green-600';
+ };
+
+ const getStatusText = () => {
+ if (coupon.isExpired) return 'Expired';
+ if (coupon.isUsedUp) return 'Used';
+ return 'Available';
+ };
+
+ const formatDate = (date?: string | Date) => {
+ if (!date) return 'No expiry';
+ return dayjs(date).format('DD MMM YYYY');
+ };
+
+ return (
+
+
+
+
+ {coupon.code}
+
+
+ {coupon.description}
+
+
+
+
+ {getStatusText()}
+
+ {coupon.maxLimitForUser && (
+
+ Used: {coupon.usageCount}/{coupon.maxLimitForUser}
+
+ )}
+
+
+
+
+
+ Valid till: {formatDate(coupon.validTill)}
+
+
+
+ {coupon.isExpired || coupon.isUsedUp ? 'Unavailable' : 'Apply'}
+
+
+
+
+ );
+}
+
+function CouponSection({
+ title,
+ coupons,
+ emptyMessage
+}: {
+ title: string;
+ coupons: CouponCardProps['coupon'][];
+ emptyMessage: string;
+}) {
+ return (
+
+
+ {title}
+
+
+ {coupons.length === 0 ? (
+
+
+
+ {emptyMessage}
+
+
+ ) : (
+ coupons.map(coupon => (
+
+ ))
+ )}
+
+ );
+}
+
+export default function Coupons() {
+ const { data, isLoading, error, refetch } = trpc.user.coupon.getMyCoupons.useQuery();
+ const [couponCode, setCouponCode] = useState('');
+
+ const redeemCouponMutation = trpc.user.coupon.redeemReservedCoupon.useMutation({
+ onSuccess: () => {
+ setCouponCode('');
+ refetch();
+ Alert.alert('Success', 'Coupon added successfully!');
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to add coupon. Please check the code and try again.');
+ }
+ });
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ console.log({data, error})
+
+
+ if (isLoading) {
+ return (
+
+
+ Loading coupons...
+
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+
+
+ Failed to load coupons. Please try again.
+
+
+
+ );
+ }
+
+ const personalCoupons = data?.data?.personal || [];
+ const generalCoupons = data?.data?.general || [];
+
+ return (
+
+
+
+
+ Add a Coupon
+
+
+ {
+ if (couponCode.trim().length >= 4) {
+ redeemCouponMutation.mutate({ secretCode: couponCode.trim().toUpperCase() });
+ }
+ }}
+ >
+
+ {redeemCouponMutation.isPending ? 'Adding...' : 'Add Coupon'}
+
+
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/delivery-slots/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/delivery-slots/_layout.tsx
new file mode 100644
index 0000000..8a04d45
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/delivery-slots/_layout.tsx
@@ -0,0 +1,9 @@
+import { Stack } from 'expo-router'
+
+function DeliverySlotsLayout() {
+ return (
+
+ )
+}
+
+export default DeliverySlotsLayout
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/delivery-slots/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/delivery-slots/index.tsx
new file mode 100644
index 0000000..d9f4aba
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/delivery-slots/index.tsx
@@ -0,0 +1,230 @@
+import React, { useState } from 'react';
+import { View, ScrollView } from 'react-native';
+import { Image } from 'expo-image';
+import { useRouter } from 'expo-router';
+import { MyFlatList, MyText, tw, useMarkDataFetchers, BottomDialog, theme, MyTouchableOpacity } from 'common-ui';
+import { trpc } from '@/src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import dayjs from 'dayjs';
+
+export default function DeliverySlots() {
+ const router = useRouter();
+ const { data, isLoading, error, refetch } = trpc.user.slots.getSlotsWithProducts.useQuery();
+ const [selectedSlotForDialog, setSelectedSlotForDialog] = useState(null);
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ if (isLoading) {
+ return (
+ null}
+ ListHeaderComponent={() => (
+
+ Loading delivery slots...
+
+ )}
+ />
+ );
+ }
+
+ if (error) {
+ return (
+ null}
+ ListHeaderComponent={() => (
+
+ Error loading delivery slots
+ refetch()}
+ style={tw`mt-4 bg-blue-500 px-4 py-2 rounded-lg`}
+ >
+ Retry
+
+
+ )}
+ />
+ );
+ }
+
+ const slots = data?.slots || [];
+
+ if (slots.length === 0) {
+ return (
+ null}
+ ListHeaderComponent={() => (
+
+
+
+ No upcoming delivery slots available
+
+
+ Check back later for new delivery schedules
+
+
+ )}
+ />
+ );
+ }
+
+ return (
+ <>
+ item.id.toString()}
+ // ListHeaderComponent={() => (
+ //
+ // Delivery Slots
+ //
+ // Choose your preferred delivery time
+ //
+ //
+ // )}
+ renderItem={({ item: slot }) => (
+
+ {/* Slot Header */}
+
+
+
+
+ {dayjs(slot.deliveryTime).format('ddd DD MMM, h:mm a')}
+
+
+ Orders close by: {dayjs(slot.freezeTime).format('h:mm a')}
+
+
+
+
+
+ {slot.products.length} items
+
+
+ router.push(`/(drawer)/(tabs)/home/cart?slot=${slot.id}`)}
+ style={tw`bg-pink-500 p-2 rounded-full`}
+ >
+
+
+
+
+
+
+ {/* Products List */}
+
+
+ Available Products
+
+
+ {slot.products.slice(0, 2).map((product) => (
+ router.push(`/(drawer)/(tabs)/home/product-detail/${product.id}`)}
+ style={tw`bg-gray-50 rounded-lg p-3 flex-row items-center`}
+ >
+ {product.images && product.images.length > 0 ? (
+
+ ) : (
+
+
+
+ )}
+
+
+ {product.name}
+
+
+ ₹{product.price} {product.unit && `per ${product.unit}`}
+
+
+ {product.isOutOfStock && (
+ Out of stock
+ )}
+
+ ))}
+
+ {slot.products.length > 2 && (
+ setSelectedSlotForDialog(slot)}
+ style={tw`bg-pink-50 rounded-lg p-3 flex-row items-center justify-center border border-pink-200`}
+ >
+
+ +{slot.products.length - 2} more products
+
+
+
+ )}
+
+
+
+ )}
+ ListFooterComponent={() => }
+ showsVerticalScrollIndicator={false}
+ contentContainerStyle={tw`pt-2`}
+ />
+
+ {/* Products Dialog */}
+ setSelectedSlotForDialog(null)}
+ >
+
+
+ All Products - {dayjs(selectedSlotForDialog?.deliveryTime).format('ddd DD MMM, h:mm a')}
+
+
+
+
+ {selectedSlotForDialog?.products.map((product: any) => (
+ {
+ setSelectedSlotForDialog(null);
+ router.push(`/(drawer)/(tabs)/home/product-detail/${product.id}`);
+ }}
+ style={tw`bg-gray-50 rounded-lg p-4 flex-row items-center`}
+ >
+ {product.images && product.images.length > 0 ? (
+
+ ) : (
+
+
+
+ )}
+
+
+ {product.name}
+
+
+ ₹{product.price} {product.unit && `per ${product.unit}`}
+
+ {product.marketPrice && (
+
+ ₹{product.marketPrice}
+
+ )}
+
+ {product.isOutOfStock && (
+ Out of stock
+ )}
+
+ ))}
+
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/_layout.tsx
new file mode 100644
index 0000000..a0e7d39
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/_layout.tsx
@@ -0,0 +1,11 @@
+import { Stack } from 'expo-router'
+
+function EditProfileLayout() {
+ return (
+
+
+
+ )
+}
+
+export default EditProfileLayout
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/index.tsx
new file mode 100644
index 0000000..fe89bca
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/edit-profile/index.tsx
@@ -0,0 +1,184 @@
+import React, { useState, useMemo } from "react";
+import { View, ScrollView, TextInput, Alert } from "react-native";
+import { AppContainer, MyButton, MyText, tw , BottomDialog } from "common-ui";
+import RegistrationForm from "@/components/registration-form";
+import { useUserDetails, useAuth } from "@/src/contexts/AuthContext";
+import { useUpdateProfile } from "@/src/api-hooks/auth.api";
+import { router } from "expo-router";
+import { trpc } from '@/src/trpc-client';
+
+function EditProfile() {
+ const userDetails = useUserDetails();
+ const { updateUserDetails, logout } = useAuth();
+ const updateProfileMutation = useUpdateProfile();
+
+ // State for mobile verification modal
+ const [showDeleteModal, setShowDeleteModal] = useState(false);
+ const [enteredMobile, setEnteredMobile] = useState('');
+ const deleteAccountMutation = trpc.user.auth.deleteAccount.useMutation();
+
+ // Prevent unnecessary re-renders
+ const mobileInputValue = useMemo(() => enteredMobile, [enteredMobile]);
+
+ const handleUpdate = async (data: FormData) => {
+ try {
+ const response = await updateProfileMutation.mutateAsync(data);
+
+ // Update the context with new user details
+ if (response.user) {
+ updateUserDetails(response.user);
+ }
+
+ // Navigate back to profile/me page
+ router.replace('/(drawer)/(tabs)/me');
+ } catch (error) {
+ JSON.stringify(error);
+ console.error('Update profile error:', error);
+ throw error;
+ }
+ };
+
+ const handleDeleteAccount = () => {
+ setShowDeleteModal(true);
+ };
+
+ const confirmDeleteAccount = async () => {
+ if (!enteredMobile.trim()) {
+ Alert.alert('Error', 'Please enter your mobile number');
+ return;
+ }
+
+ try {
+ await deleteAccountMutation.mutateAsync({ mobile: enteredMobile });
+
+ Alert.alert(
+ 'Account Deleted',
+ 'Your account and all data have been successfully deleted.',
+ [
+ {
+ text: 'OK',
+ onPress: () => {
+ setShowDeleteModal(false);
+ logout();
+ }
+ }
+ ]
+ );
+ } catch (error: any) {
+ Alert.alert(
+ 'Verification Failed',
+ error?.message || 'Failed to delete account. Please check your mobile number.'
+ );
+ }
+ };
+
+ // Prepare initial values from user details
+ const initialValues = userDetails ? {
+ name: userDetails.name || '',
+ email: userDetails.email || '',
+ mobile: userDetails.mobile || '',
+ profileImageUri: userDetails.profileImage || undefined,
+ } : undefined;
+
+ return (
+
+
+
+
+ Edit Profile
+
+
+ Update your account details
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {showDeleteModal && (
+ setShowDeleteModal(false)}
+ enableDismiss={false}
+ >
+
+
+ ⚠️ Delete Account Permanently
+
+
+
+ This action cannot be undone. All your data will be permanently deleted.
+
+
+
+ Enter your registered mobile number to confirm:
+
+
+
+
+
+
+
+
+ setShowDeleteModal(false)}
+ fillColor="gray1"
+ textColor="gray700"
+ fullWidth
+ />
+
+
+
+
+
+
+
+ )}
+
+
+ );
+}
+
+export default EditProfile;
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx
new file mode 100644
index 0000000..dc3ee53
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx
@@ -0,0 +1,151 @@
+import React from 'react';
+import { View, ScrollView } from 'react-native';
+import { useRouter } from 'expo-router';
+import { AppContainer, MyText, tw, MyTouchableOpacity, ProfileImage, colors } from 'common-ui';
+import TabLayoutWrapper from '@/components/TabLayoutWrapper';
+import { LinearGradient } from 'expo-linear-gradient';
+import { Ionicons } from '@expo/vector-icons';
+import NextOrderGlimpse from '@/components/NextOrderGlimpse';
+import { useAuth } from '@/src/contexts/AuthContext';
+
+export default function Me() {
+ const router = useRouter();
+ const { logout } = useAuth();
+
+ const menuSections = [
+ {
+ title: 'Shopping & Activity',
+ items: [
+ {
+ title: 'My Orders',
+ icon: 'receipt-outline',
+ color: colors.brand600,
+ onPress: () => router.push('/(drawer)/(tabs)/me/my-orders'),
+ subtitle: 'Orders history & tracking'
+ },
+ {
+ title: 'My Cart',
+ icon: 'cart-outline',
+ color: '#10B981',
+ onPress: () => router.push('/(drawer)/(tabs)/home/cart'),
+ subtitle: 'Items ready for checkout'
+ },
+ {
+ title: 'Coupons',
+ icon: 'ticket-outline',
+ color: '#8B5CF6',
+ onPress: () => router.push('/(drawer)/(tabs)/me/coupons'),
+ subtitle: 'View active offers & rewards'
+ },
+ ]
+ },
+ {
+ title: 'Saved Information',
+ items: [
+ {
+ title: 'Addresses',
+ icon: 'location-outline',
+ color: '#F59E0B',
+ onPress: () => router.push('/(drawer)/(tabs)/me/addresses'),
+ subtitle: 'Manage delivery locations'
+ },
+ {
+ title: 'Profile Settings',
+ icon: 'person-outline',
+ color: '#3B82F6',
+ onPress: () => router.push('/(drawer)/(tabs)/me/edit-profile'),
+ subtitle: 'Update your personal details'
+ },
+ ]
+ },
+ {
+ title: 'Support',
+ items: [
+ {
+ title: 'Help & Complaints',
+ icon: 'chatbubble-ellipses-outline',
+ color: '#EF4444',
+ onPress: () => router.push('/(drawer)/(tabs)/me/complaints'),
+ subtitle: 'Talk to our customer care'
+ },
+ ]
+ }
+ ];
+
+ return (
+
+
+
+ {/* Minimal Header Section */}
+
+
+
+ My Account
+
+
+ Manage your freshyo experience
+
+
+ router.push('/(drawer)/(tabs)/me/edit-profile')}
+ >
+
+
+
+
+ {/* Upcoming Order Glimpse */}
+
+
+ {/* Menu Sections */}
+
+ {menuSections.map((section, sIndex) => (
+
+
+ {section.title}
+
+
+ {section.items.map((item, iIndex) => (
+
+
+
+
+
+ {item.title}
+ {item.subtitle}
+
+
+
+
+
+ ))}
+
+
+ ))}
+
+ {/* Footer / Logout */}
+ logout()}
+ >
+
+ Log Out from Freshyo
+
+
+
+ Version 1.2.0 • Freshyo App
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/[id].tsx b/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/[id].tsx
new file mode 100644
index 0000000..0590f1d
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/[id].tsx
@@ -0,0 +1,430 @@
+import React, { useState, useEffect } from "react";
+import { View, ScrollView, Alert, TextInput, ActivityIndicator, KeyboardAvoidingView, Platform } from "react-native";
+import { Image } from 'expo-image';
+import { useLocalSearchParams, useRouter } from "expo-router";
+import { AppContainer, MyText, tw, MyTouchableOpacity, theme, BottomDialog } from "common-ui";
+import { trpc } from "@/src/trpc-client";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import Ionicons from '@expo/vector-icons/Ionicons';
+import dayjs from "dayjs";
+import ComplaintForm from "@/components/ComplaintForm";
+
+export default function OrderDetails() {
+ const { id } = useLocalSearchParams<{ id: string }>();
+ const router = useRouter();
+
+ const {
+ data: orderData,
+ isLoading,
+ error,
+ refetch,
+ } = trpc.user.order.getOrderById.useQuery(
+ { orderId: id },
+ { enabled: !!id }
+ );
+
+ const [isEditingNotes, setIsEditingNotes] = useState(false);
+ const [notesText, setNotesText] = useState("");
+ const [notesInput, setNotesInput] = useState("");
+ const [cancelDialogOpen, setCancelDialogOpen] = useState(false);
+ const [cancelReason, setCancelReason] = useState("");
+ const [complaintDialogOpen, setComplaintDialogOpen] = useState(false);
+
+ const updateNotesMutation = trpc.user.order.updateUserNotes.useMutation({
+ onSuccess: () => {
+ setNotesText(notesInput);
+ setIsEditingNotes(false);
+ refetch();
+ Alert.alert('Success', 'Notes updated successfully');
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to update notes');
+ },
+ });
+
+ const cancelOrderMutation = trpc.user.order.cancelOrder.useMutation({
+ onSuccess: () => {
+ setCancelDialogOpen(false);
+ setCancelReason("");
+ refetch();
+ Alert.alert('Success', 'Order cancelled successfully');
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to cancel order');
+ },
+ });
+
+ const handleCancelOrder = () => {
+ if (!cancelReason.trim()) {
+ Alert.alert('Error', 'Please enter a reason for cancellation');
+ return;
+ }
+ cancelOrderMutation.mutate({ id: order.orderId, reason: cancelReason });
+ };
+
+ useEffect(() => {
+ if (orderData?.userNotes) {
+ setNotesText(orderData.userNotes);
+ setNotesInput(orderData.userNotes);
+ }
+ }, [orderData]);
+
+
+ if (isLoading) {
+ return (
+
+
+ Loading details...
+
+
+ );
+ }
+
+ if (error || !orderData) {
+ return (
+
+
+
+ Failed to load
+ router.back()}
+ style={tw`mt-6 bg-slate-900 px-6 py-2 rounded-xl`}
+ >
+ Go Back
+
+
+
+ );
+ }
+
+ const order = orderData;
+ const getStatusConfig = (status: string) => {
+ const s = status.toLowerCase();
+ switch (s) {
+ case "delivered":
+ case "success":
+ return { label: "Delivered", color: "#10B981" };
+ case "cancelled":
+ case "failed":
+ return { label: "Cancelled", color: "#EF4444" };
+ case "pending":
+ case "processing":
+ return { label: "Pending", color: "#F59E0B" };
+ default:
+ return { label: status, color: theme.colors.brand500 };
+ }
+ };
+
+ const subtotal = order.items.reduce((sum, item) => sum + item.amount, 0);
+ const discountAmount = order.discountAmount || 0;
+ const totalAmount = order.orderAmount;
+ const statusConfig = getStatusConfig(order.deliveryStatus || "pending");
+
+ return (
+
+
+ {/* Simple Header */}
+
+
+
+ Order #{order.orderId}
+ {dayjs(order.orderDate).format("DD MMM, h:mm A")}
+ {order.isFlashDelivery && (
+ ⚡ 30-Minute Flash Delivery
+ )}
+
+
+
+
+
+ {statusConfig.label}
+
+
+ {order.isFlashDelivery && (
+
+ ⚡
+
+ )}
+
+
+
+
+ {/* Flash Delivery Banner */}
+ {order.isFlashDelivery && (
+
+
+
+
+ Flash Delivery Order
+
+ Your order will be delivered within 30 minutes of placement
+
+
+
+
+ )}
+
+ {/* Main Info Card */}
+
+
+
+
+
+
+
+ Payment Method
+
+ {order.paymentMode?.toUpperCase() === "COD" ? "Cash on Delivery" : order.paymentMode}
+
+
+
+
+ Status
+ {order.paymentStatus}
+
+
+
+ {(order.deliveryDate || order.isFlashDelivery) && ["delivered", "success"].includes(order.deliveryStatus?.toLowerCase() || "") && (
+
+ {order.isFlashDelivery ? (
+
+ ) : (
+
+ )}
+
+ {order.isFlashDelivery
+ ? `Flash Delivered on ${dayjs(order.createdAt || order.orderDate).add(30, 'minutes').format("DD MMM YYYY, h:mm A")}`
+ : `Delivered on ${dayjs(order.deliveryDate).format("DD MMM YYYY, h:mm A")}`
+ }
+
+
+ )}
+
+ {/* Flash Delivery Info */}
+ {order.isFlashDelivery && !["delivered", "success"].includes(order.deliveryStatus?.toLowerCase() || "") && (
+
+
+
+ Flash Delivery: {dayjs(order.createdAt || order.orderDate).add(30, 'minutes').format("DD MMM YYYY, h:mm A")}
+
+
+ )}
+
+
+ {/* Special Instructions */}
+
+
+ Special Instructions
+ {isEditingNotes ? (
+
+ {
+ setIsEditingNotes(false);
+ setNotesInput(notesText);
+ }}
+ style={tw`px-3 py-1 bg-slate-100 rounded-lg`}
+ >
+ Cancel
+
+ {
+ updateNotesMutation.mutate({ id: order.orderId, userNotes: notesInput });
+ }}
+ disabled={updateNotesMutation.isPending}
+ style={tw`px-3 py-1 bg-brand500 rounded-lg`}
+ >
+
+ {updateNotesMutation.isPending ? 'Saving...' : 'Save'}
+
+
+
+ ) : (
+ {
+ setNotesInput(notesText || "");
+ setIsEditingNotes(true);
+ }}
+ style={tw`flex-row items-center px-2 py-1 bg-slate-50 rounded-lg`}
+ >
+
+
+ {notesText ? 'Edit' : 'Add'}
+
+
+ )}
+
+ {isEditingNotes ? (
+
+ ) : (
+
+ {notesText || "No instructions added"}
+
+ )}
+
+
+ {/* Cancellation Detail */}
+ {order.cancelReason && (
+
+ Cancellation Reason
+ {order.cancelReason}
+ {order.refundAmount && (
+
+ Refund Amount
+ ₹{order.refundAmount}
+
+ )}
+
+ )}
+
+ {/* Items Section */}
+
+ Order Items
+
+
+ {order.items.map((item: any, index: number) => (
+
+
+
+
+
+ {item.productName}
+ {item.quantity} × ₹{item.price}
+
+ ₹{item.amount}
+
+ ))}
+
+ {/* Coupon */}
+ {order.couponCode && (
+
+
+
+
+ {order.couponCode}
+ Coupon Applied
+
+
+ -₹{order.discountAmount}
+
+ )}
+
+ {/* Summary Section */}
+
+
+ Subtotal
+ ₹{subtotal}
+
+ {discountAmount > 0 && (
+
+ Discount
+ -₹{discountAmount}
+
+ )}
+
+ Total Amount
+ ₹{totalAmount}
+
+
+
+ {/* Footer Actions */}
+
+ router.back()}
+ style={tw`flex-1 bg-slate-100 py-3.5 rounded-xl items-center`}
+ >
+ Dismiss
+
+ setComplaintDialogOpen(true)}
+ style={[tw`flex-1 py-3.5 rounded-xl items-center`, { backgroundColor: theme.colors.brand600 }]}
+ >
+ Raise Complaint
+
+
+
+ {/* Additional Actions */}
+
+ {order.deliveryStatus !== 'success' && order.deliveryStatus !== 'cancelled' && (
+ setCancelDialogOpen(true)}
+ style={tw`bg-red-50 border border-red-100 py-3.5 rounded-xl items-center flex-row justify-center`}
+ >
+
+ Cancel Order
+
+ )}
+
+
+
+ {/* Cancel Order Dialog */}
+ setCancelDialogOpen(false)}>
+
+
+
+ Cancel Order
+ setCancelDialogOpen(false)}>
+
+
+
+
+
+
+ Are you sure you want to cancel this order? This action cannot be undone.
+
+
+
+ Reason for cancellation
+
+
+
+ {cancelOrderMutation.isPending ? (
+
+ ) : (
+ Confirm Cancellation
+ )}
+
+
+
+
+
+ {/* Raise Complaint Dialog */}
+ setComplaintDialogOpen(false)}>
+ {
+ setComplaintDialogOpen(false);
+ refetch();
+ }}
+ orderId={order.orderId}
+ />
+
+
+
+ );
+}
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/_layout.tsx
new file mode 100755
index 0000000..d734199
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/_layout.tsx
@@ -0,0 +1,11 @@
+import { Stack } from 'expo-router'
+
+function MyOrdersLayout() {
+ return (
+
+
+
+ )
+}
+
+export default MyOrdersLayout
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/index.tsx
new file mode 100755
index 0000000..d8fe1d6
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/me/my-orders/index.tsx
@@ -0,0 +1,669 @@
+import React, { useState, useCallback, useEffect } from 'react';
+import { View, FlatList, Alert, ActivityIndicator } from 'react-native';
+import { Image } from 'expo-image';
+import { MaterialIcons, Ionicons } from '@expo/vector-icons';
+import { useRouter } from 'expo-router';
+import { tw, useManualRefresh, MyText, MyFlatList, useMarkDataFetchers, REFUND_STATUS, MyTouchableOpacity, theme } from 'common-ui';
+
+import { trpc } from '@/src/trpc-client';
+// import RazorpayCheckout from 'react-native-razorpay';
+import OrderMenu from '@/components/OrderMenu';
+import dayjs from 'dayjs';
+
+// Type definitions
+interface OrderItem {
+ productName: string;
+ quantity: number;
+ price: number;
+ amount: number;
+ image: string | null;
+}
+
+interface Order {
+ id: number;
+ orderId: string;
+ orderDate: string;
+ deliveryStatus: string;
+ deliveryDate?: string;
+ orderStatus: string;
+ cancelReason: string | null;
+ totalAmount: number;
+ deliveryCharge: number;
+ paymentMode: string;
+ paymentStatus: string;
+ refundStatus: string;
+ refundAmount: number | null;
+ userNotes: string | null;
+ items: OrderItem[];
+ discountAmount?: number;
+ isFlashDelivery: boolean;
+ createdAt: string;
+}
+
+interface OrderFooterProps {
+ isLoadingMore: boolean;
+ loadMoreError: string | null;
+ hasNextPage: boolean;
+ allOrders: Order[];
+ onRetryLoadMore: () => void;
+}
+
+const OrderFooter: React.FC = ({
+ isLoadingMore,
+ loadMoreError,
+ hasNextPage,
+ allOrders,
+ onRetryLoadMore
+}) => {
+ if (isLoadingMore) {
+ return (
+
+
+ Loading more orders...
+
+ );
+ }
+
+ if (loadMoreError) {
+ return (
+
+ {loadMoreError}
+
+ Retry
+
+
+ );
+ }
+
+ if (!hasNextPage && allOrders.length > 0) {
+ return (
+
+ End of list
+
+ );
+ }
+
+ return null;
+};
+
+interface OrderItemProps {
+ item: Order;
+ index: number;
+ getStatusColor: (status: string) => any;
+ getRefundStatusColor: (status: string) => any;
+ onPress: (orderId: number) => void;
+ onRetryPayment: (orderId: number) => void;
+ onViewMoreItems: (orderId: number) => void;
+ isPaymentPending: boolean;
+}
+
+const OrderItem: React.FC = ({
+ item,
+ index,
+ getStatusColor,
+ getRefundStatusColor,
+ onPress,
+ onRetryPayment,
+ onViewMoreItems,
+ isPaymentPending
+}) => {
+ const mainStatus = getStatusColor(item.orderStatus);
+ const deliveryStatus = getStatusColor(item.deliveryStatus);
+ const totalAmount = item.totalAmount;
+
+ return (
+ onPress(item.id)}
+ activeOpacity={0.95}
+ >
+ {/* Top Header: Order ID and Status */}
+
+
+
+
+ Order Reference
+
+ #{item.orderId}
+
+
+
+ {item.orderStatus.toLowerCase() === 'cancelled' && (
+
+
+
+ {mainStatus.label}
+
+
+ )}
+ {item.isFlashDelivery && (
+
+ ⚡
+ FLASH
+
+ )}
+
+
+
+
+ {/* Order Date & Quick Stats */}
+
+
+ {(item.deliveryDate || item.isFlashDelivery) && (
+
+
+ {item.isFlashDelivery ? (
+
+ ) : (
+
+ )}
+
+
+
+ {item.isFlashDelivery ? "Flash Delivery" : "Delivery Time"}
+
+
+ {item.isFlashDelivery
+ ? dayjs(item.createdAt || item.orderDate).add(30, 'minutes').format("DD MMM, hh:mm A")
+ : dayjs(item.deliveryDate).format("DD MMM, hh:mm A")
+ }
+
+ {item.isFlashDelivery && (
+
+ ⚡ 30-Min Delivery
+
+ )}
+
+
+ )}
+
+
+
+
+
+
+ Placed On
+
+ {dayjs(item.orderDate).format("DD MMM YYYY, hh:mm A")}
+
+
+
+
+
+ {
+ // refetch will be handled by parent
+ }}
+ />
+
+
+ {/* Items Section */}
+
+
+ Items Summary
+ {item.items.length} {item.items.length === 1 ? 'Item' : 'Items'}
+
+
+ {item.items.slice(0, 2).map((product, index) => (
+
+
+
+
+ {product.quantity}
+
+
+
+
+
+ {product.productName}
+
+
+ Unit Price: ₹{product.price}
+
+
+
+ ₹{product.amount}
+
+
+ ))}
+
+ {item.items.length > 2 && (
+ onViewMoreItems(item.id)}
+ >
+
+ + {item.items.length - 2} more {item.items.length - 2 === 1 ? 'item' : 'items'} in this order
+
+
+ )}
+
+
+ {/* Delivery Status - Single Line */}
+
+
+
+ {item.isFlashDelivery ? (
+
+ ) : (
+
+ )}
+
+
+ {item.isFlashDelivery ? "Flash Delivery:" : "Shipping Status:"}
+
+
+ {item.deliveryStatus}
+
+
+ {item.isFlashDelivery && (
+
+ ⚡ FAST
+
+ )}
+
+
+ {/* User Notes or Delivery Time if present */}
+ {item.userNotes && (
+
+
+
+
+ Your Instructions
+ {item.userNotes}
+
+
+
+ )}
+
+ {/* Cancellation Info */}
+ {item.cancelReason && (
+
+
+
+ Cancellation Details
+
+ {item.cancelReason}
+
+ {item.refundStatus && item.refundStatus !== REFUND_STATUS.NOT_APPLICABLE && (
+
+ Refund Status
+
+
+
+ {item.refundStatus}
+
+
+
+ )}
+
+ )}
+
+ {/* Footer: Price and CTA */}
+
+
+ Amount to Pay
+ ₹{totalAmount}
+ {item.discountAmount ? (
+
+
+ Saved ₹{item.discountAmount}
+
+ ) : null}
+ {item.deliveryCharge > 0 && (
+
+
+ Delivery: ₹{item.deliveryCharge}
+
+ )}
+
+
+ {(item.paymentMode === 'Online' && (item.paymentStatus === 'pending' || item.paymentStatus === 'failed')) ? (
+ {
+ e.stopPropagation();
+ onRetryPayment(item.id);
+ }}
+ disabled={isPaymentPending}
+ style={tw`bg-rose-600 px-6 py-3 rounded-2xl shadow-lg shadow-rose-200 flex-row items-center`}
+ >
+ {isPaymentPending ? (
+
+ ) : (
+ <>
+
+ Retry Payment
+ >
+ )}
+
+ ) : (
+
+ View Details
+
+
+ )}
+
+
+
+ );
+};
+
+export default function MyOrders() {
+ const router = useRouter();
+
+ // Infinite scroll state
+ const [allOrders, setAllOrders] = useState([]);
+ const [currentPage, setCurrentPage] = useState(1);
+ const [isLoadingMore, setIsLoadingMore] = useState(false);
+ const [hasNextPage, setHasNextPage] = useState(true);
+ const [loadMoreError, setLoadMoreError] = useState(null);
+ const pageSize = 10;
+
+ const { data: ordersData, isLoading, error, refetch } = trpc.user.order.getOrders.useQuery({
+ page: currentPage,
+ pageSize: pageSize,
+ });
+
+
+
+ const createRazorpayOrderMutation = trpc.user.payment.createRazorpayOrder.useMutation({
+ onSuccess: (paymentData) => {
+ const order = allOrders.find(o => o.id === retryOrderId);
+ if (order) {
+ const totalAmount = order.items.reduce((sum, p) => sum + p.amount, 0);
+ // initiateRazorpayPayment(paymentData.razorpayOrderId, paymentData.key, totalAmount);
+ }
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to create payment order');
+ },
+ });
+
+ const verifyPaymentMutation = trpc.user.payment.verifyPayment.useMutation({
+ onSuccess: () => {
+ refetch();
+ Alert.alert('Success', 'Payment completed successfully');
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Payment verification failed');
+ refetch();
+ },
+ });
+ // Handle data accumulation for infinite scroll
+ useEffect(() => {
+ if (ordersData?.data) {
+ if (currentPage === 1) {
+ // First page - replace all orders
+ setAllOrders(ordersData.data);
+ } else {
+ // Subsequent pages - append to existing orders
+ setAllOrders(prev => [...prev, ...ordersData.data]);
+ }
+
+ // Check if there are more pages
+ const totalPages = ordersData.pagination?.totalPages || 1;
+ setHasNextPage(currentPage < totalPages);
+ setIsLoadingMore(false);
+ setLoadMoreError(null); // Clear any previous errors
+ }
+ }, [ordersData, currentPage]);
+
+ // Handle errors during infinite scroll loading
+ useEffect(() => {
+ if (error && currentPage > 1) {
+ // If there's an error loading more pages, show error state
+ setIsLoadingMore(false);
+ setLoadMoreError('Failed to load more orders. Please try again.');
+ }
+ }, [error, currentPage]);
+
+ // Reset to first page on manual refresh
+ useManualRefresh(() => {
+ setCurrentPage(1);
+ setAllOrders([]);
+ setHasNextPage(true);
+ setIsLoadingMore(false);
+ setLoadMoreError(null);
+ refetch();
+ });
+
+ useMarkDataFetchers(() => {
+ setCurrentPage(1);
+ setAllOrders([]);
+ setHasNextPage(true);
+ setIsLoadingMore(false);
+ setLoadMoreError(null);
+ refetch();
+ });
+
+ const [dialogOpen, setDialogOpen] = useState(false);
+ const [dialogItems, setDialogItems] = useState([]);
+ const [retryOrderId, setRetryOrderId] = useState(0);
+
+ const openDialog = useCallback((items: OrderItem[]) => {
+ setDialogItems(items);
+ setDialogOpen(true);
+ }, []);
+
+ // Infinite scroll functions
+ const loadMoreOrders = useCallback(() => {
+ if (!isLoadingMore && hasNextPage && !isLoading) {
+ setIsLoadingMore(true);
+ setCurrentPage(prev => prev + 1);
+ }
+ }, [isLoadingMore, hasNextPage, isLoading]);
+
+
+
+ const getStatusColor = (status: string) => {
+ const s = status.toLowerCase();
+ switch (s) {
+ case 'delivered':
+ case 'success':
+ case 'completed':
+ return {
+ bg: 'bg-emerald-50',
+ text: 'text-emerald-700',
+ icon: 'check-circle',
+ color: '#059669',
+ border: 'border-emerald-100',
+ label: 'Delivered'
+ };
+ case 'cancelled':
+ case 'failed':
+ return {
+ bg: 'bg-rose-50',
+ text: 'text-rose-700',
+ icon: 'cancel',
+ color: '#E11D48',
+ border: 'border-rose-100',
+ label: 'Cancelled'
+ };
+ case 'pending':
+ case 'payment_pending':
+ return {
+ bg: 'bg-amber-50',
+ text: 'text-amber-700',
+ icon: 'schedule',
+ color: '#D97706',
+ border: 'border-amber-100',
+ label: 'Pending'
+ };
+ case 'packaged':
+ return {
+ bg: 'bg-brand50',
+ text: 'text-brand700',
+ icon: 'inventory',
+ color: '#1570EF',
+ border: 'border-brand100',
+ label: 'Packaged'
+ };
+ case 'processing':
+ case 'confirmed':
+ case 'shipped':
+ return {
+ bg: 'bg-brand50',
+ text: 'text-brand700',
+ icon: 'local-shipping',
+ color: '#1570EF',
+ border: 'border-brand100',
+ label: status.charAt(0).toUpperCase() + status.slice(1)
+ };
+ default:
+ return {
+ bg: 'bg-slate-50',
+ text: 'text-slate-700',
+ icon: 'info',
+ color: '#64748B',
+ border: 'border-slate-100',
+ label: status
+ };
+ }
+ };
+
+ const getRefundStatusColor = (status: string) => {
+ switch (status) {
+ case REFUND_STATUS.SUCCESS:
+ return { bg: 'bg-emerald-50', text: 'text-emerald-700', icon: 'check-circle', color: '#059669', border: 'border-emerald-100' };
+ case REFUND_STATUS.PROCESSING:
+ return { bg: 'bg-brand50', text: 'text-brand700', icon: 'refresh', color: '#1570EF', border: 'border-brand100' };
+ case REFUND_STATUS.PENDING:
+ return { bg: 'bg-amber-50', text: 'text-amber-700', icon: 'schedule', color: '#D97706', border: 'border-amber-100' };
+ case REFUND_STATUS.NOT_APPLICABLE:
+ return { bg: 'bg-slate-50', text: 'text-slate-700', icon: 'info', color: '#64748B', border: 'border-slate-100' };
+ default:
+ return { bg: 'bg-slate-50', text: 'text-slate-700', icon: 'info', color: '#64748B', border: 'border-slate-100' };
+ }
+ };
+
+
+
+
+
+ const handleRetryPayment = (orderId: number) => {
+ setRetryOrderId(orderId);
+ createRazorpayOrderMutation.mutate({ orderId: orderId.toString() });
+ };
+
+ // const initiateRazorpayPayment = (razorpayOrderId: string, key: string, amount: number) => {
+ // const options = {
+ // key,
+ // amount: amount * 100, // in paisa
+ // currency: 'INR',
+ // order_id: razorpayOrderId,
+ // name: 'Meat Farmer',
+ // description: 'Order Payment Retry',
+ // prefill: {
+ // // Add user details if available
+ // },
+ // };
+
+ // RazorpayCheckout.open(options)
+ // .then((data: any) => {
+ // // Payment success
+ // verifyPaymentMutation.mutate({
+ // razorpay_payment_id: data.razorpay_payment_id,
+ // razorpay_order_id: data.razorpay_order_id,
+ // razorpay_signature: data.razorpay_signature,
+ // });
+ // })
+ // .catch((error: any) => {
+ // Alert.alert('Payment Failed', 'Payment failed. Please try again.');
+ // refetch();
+ // });
+ // };
+
+ if (isLoading && currentPage === 1) {
+ return (
+
+
+ Loading your orders...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+
+
+ Unable to load orders
+ Please check your connection and try again
+ refetch()}
+ style={tw`bg-blue-600 px-8 py-3 rounded-full shadow-md`}
+ >
+ Retry
+
+
+ );
+ }
+
+ return (
+
+ (
+ router.push(`/(drawer)/(tabs)/me/my-orders/${orderId}`)}
+ onRetryPayment={handleRetryPayment}
+ onViewMoreItems={(orderId) => router.push(`/(drawer)/(tabs)/me/my-orders/${orderId}`)}
+ isPaymentPending={createRazorpayOrderMutation.isPending}
+ />
+ )}
+ keyExtractor={(item) => item.orderId}
+ showsVerticalScrollIndicator={false}
+ onEndReached={loadMoreOrders}
+ onEndReachedThreshold={0.5}
+ ListFooterComponent={
+ {
+ setLoadMoreError(null);
+ loadMoreOrders();
+ }}
+ />
+ }
+ ListEmptyComponent={
+
+
+
+
+ No orders yet
+ Your order history will appear here
+ router.push('/(drawer)/(tabs)/home')}
+ >
+ Start Shopping
+
+
+ }
+ />
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/order-again/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/order-again/_layout.tsx
new file mode 100644
index 0000000..7dcc4d4
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/order-again/_layout.tsx
@@ -0,0 +1,12 @@
+import { Stack } from 'expo-router';
+
+export default function StoresLayout() {
+ return (
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/order-again/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/order-again/index.tsx
new file mode 100644
index 0000000..e6637c1
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/order-again/index.tsx
@@ -0,0 +1,186 @@
+import React, { useState } from "react";
+import {
+ View,
+ Dimensions,
+ Image,
+ Platform,
+ Alert,
+ ScrollView,
+} from "react-native";
+import { LinearGradient } from "expo-linear-gradient";
+import { useRouter } from "expo-router";
+import {
+ theme,
+ tw,
+ useManualRefresh,
+ useMarkDataFetchers,
+ LoadingDialog,
+ AppContainer,
+ MyFlatList,
+ MyText,
+} from "common-ui";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import ProductCard from "@/components/ProductCard";
+
+import { trpc } from "@/src/trpc-client";
+import { useGetCart, useAddToCart } from '@/hooks/cart-query-hooks';
+import { useProductSlotIdentifier } from '@/hooks/useProductSlotIdentifier';
+import FloatingCartBar from "@/components/floating-cart-bar";
+import TabLayoutWrapper from "@/components/TabLayoutWrapper";
+
+const { width: screenWidth } = Dimensions.get("window");
+const itemWidth = (screenWidth - 48) / 2; // 2 items per row with padding
+
+export default function OrderAgain() {
+ const router = useRouter();
+ const [isLoadingDialogOpen, setIsLoadingDialogOpen] = useState(false);
+
+ const {
+ data: recentProductsData,
+ isLoading,
+ error,
+ refetch,
+ } = trpc.user.order.getRecentlyOrderedProducts.useQuery({
+ limit: 20,
+ });
+
+
+
+ const { data: cartData, refetch: refetchCart } = useGetCart();
+ const { addToCart = () => {} } = useAddToCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }) || {};
+ const { getQuickestSlot } = useProductSlotIdentifier();
+
+ const recentProducts = recentProductsData?.products || [];
+
+ useManualRefresh(() => {
+ refetch();
+ });
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const handleAddToCart = (productId: number) => {
+ const slotId = getQuickestSlot(productId);
+ if (!slotId) {
+ Alert.alert("Error", "No available delivery slot for this product");
+ return;
+ }
+
+ setIsLoadingDialogOpen(true);
+ addToCart(productId, 1, slotId, () => setIsLoadingDialogOpen(false));
+ };
+
+ const handleBuyNow = (productId: number) => {
+ const slotId = getQuickestSlot(productId);
+ if (!slotId) {
+ Alert.alert("Error", "No available delivery slot for this product");
+ return;
+ }
+
+ setIsLoadingDialogOpen(true);
+ addToCart(productId, 1, slotId, () => {
+ setIsLoadingDialogOpen(false);
+ router.push(`/(drawer)/(tabs)/home/cart?select=${productId}`);
+ });
+ };
+
+ if (isLoading) {
+ return (
+
+
+
+ Loading your recent orders...
+
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+
+ Oops!
+ Failed to load recent orders
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ Order Again
+
+
+
+ Reorder your favorite items quickly
+
+
+
+
+
+ {/* White Section */}
+
+ {/* Section Title */}
+
+ Recently Ordered
+
+
+ {recentProducts.length === 0 ? (
+
+
+
+
+
+ No recent orders
+
+
+ Items you've ordered recently will appear here
+
+
+ ) : (
+
+
+ {recentProducts.map((item, index) => (
+
+ router.push(`/(drawer)/(tabs)/order-again/product-detail/${item.id}`)}
+ showDeliveryInfo={false}
+ // iconType="flash"
+ />
+
+ ))}
+
+
+ )}
+
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/order-again/product-detail/[id]/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/order-again/product-detail/[id]/index.tsx
new file mode 100644
index 0000000..1ae676a
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/order-again/product-detail/[id]/index.tsx
@@ -0,0 +1,17 @@
+import React from 'react';
+import { useLocalSearchParams } from 'expo-router';
+import ProductDetail from '@/components/ProductDetail';
+import { View } from 'react-native';
+import { tw } from 'common-ui';
+import FloatingCartBar from '@/components/floating-cart-bar';
+
+export default function ProductDetailPage() {
+ const { id } = useLocalSearchParams();
+ const productId = id as string;
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/stores/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/stores/_layout.tsx
new file mode 100644
index 0000000..23c9a30
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/stores/_layout.tsx
@@ -0,0 +1,20 @@
+import FloatingCartBar from '@/components/floating-cart-bar';
+import { tw } from 'common-ui';
+import { Stack } from 'expo-router';
+import { View } from 'react-native';
+
+export default function StoresLayout() {
+ return (
+ <>
+
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/stores/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/stores/index.tsx
new file mode 100644
index 0000000..1d44a6d
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/stores/index.tsx
@@ -0,0 +1,235 @@
+import React, { useState } from "react";
+import {
+ View,
+ FlatList,
+} from "react-native";
+import { Image } from 'expo-image';
+import { useRouter } from "expo-router";
+import {
+ theme,
+ tw,
+ useManualRefresh,
+ useMarkDataFetchers,
+ MyFlatList,
+ MyText,
+ MyTouchableOpacity,
+} from "common-ui";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { Ionicons } from "@expo/vector-icons";
+import { trpc } from "@/src/trpc-client";
+import { LinearGradient } from "expo-linear-gradient";
+import TabLayoutWrapper from "@/components/TabLayoutWrapper";
+import FloatingCartBar from "@/components/floating-cart-bar";
+import { useFocusEffect } from "expo-router";
+import { useNavigationStore } from "@/src/store/navigationStore";
+
+const StoreCard = ({
+ item,
+ router,
+}: {
+ item: any;
+ router: any;
+}) => {
+ const sampleProducts = item.sampleProducts || [];
+ const remainingCount = item.productCount - sampleProducts.length;
+
+ const navigateToStore = () => router.push(`/(drawer)/(tabs)/stores/store-detail/${item.id}`);
+
+ return (
+
+ {/* Top Header Section - Touchable */}
+
+
+
+
+ {!item.signedImageUrl && (
+
+
+
+ )}
+
+
+
+
+ {item.name}
+
+
+
+
+ {item.productCount}
+ Items
+
+
+
+
+ {/* Horizontal Scrollable Product Collection */}
+
+ product.id.toString()}
+ renderItem={({ item: product }) => (
+
+
+
+
+
+ {product.name}
+
+
+ )}
+ ListFooterComponent={remainingCount > 0 ? (
+
+
+ +{remainingCount}
+ Discover
+
+
+
+
+ ) : null}
+ />
+
+
+
+
+ Explore Store
+
+
+
+
+ );
+};
+
+export default function Stores() {
+ const router = useRouter();
+
+ const {
+ data: storesData,
+ isLoading,
+ error,
+ refetch,
+ } = trpc.user.stores.getStores.useQuery();
+
+ const stores = storesData?.stores || [];
+
+ useManualRefresh(refetch);
+ useMarkDataFetchers(() => refetch());
+
+ const { isNavigatedFromHome, setNavigatedFromHome, selectedStoreId, setSelectedStoreId } = useNavigationStore();
+
+ useFocusEffect(() => {
+ if (isNavigatedFromHome && selectedStoreId) {
+ setNavigatedFromHome(false);
+ setSelectedStoreId(null);
+ router.push(`/(drawer)/(tabs)/stores/store-detail/${selectedStoreId}`);
+ }
+ });
+
+ if (isLoading) {
+ return (
+
+
+
+
+ Opening Marketplace...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+
+
+ Store Fetch Failed
+
+ We couldn't reach our vendor network.
+
+ refetch()}
+ style={tw`bg-brand600 px-8 py-3 rounded-2xl shadow-lg shadow-brand200`}
+ >
+ Retry
+
+
+ );
+ }
+
+ return (
+
+
+ }
+ keyExtractor={(item) => item.id.toString()}
+ contentContainerStyle={tw`pb-32 px-3`}
+ showsVerticalScrollIndicator={false}
+ ListHeaderComponent={
+
+
+
+
+
+ Our Outlets
+
+
+ Our Stores
+
+
+
+
+ Experience the finest selection of premium meat, poultry, fresh fruits, vegetables, and dairy directly from our own stores.
+
+
+ }
+ ListEmptyComponent={
+
+
+
+
+ No Stores Available
+
+ }
+ />
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/[id].tsx b/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/[id].tsx
new file mode 100644
index 0000000..66f667f
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/[id].tsx
@@ -0,0 +1,135 @@
+import React, { useState } from 'react';
+import {
+ View,
+ Dimensions,
+ Image,
+ TouchableOpacity,
+ Alert,
+ Platform,
+} from 'react-native';
+import { useRouter, useLocalSearchParams } from 'expo-router';
+import { theme, tw, useManualRefresh, MyFlatList, useDrawerTitle, useMarkDataFetchers, LoadingDialog, MyText, MyTouchableOpacity } from 'common-ui';
+import dayjs from 'dayjs';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import FontAwesome5 from '@expo/vector-icons/FontAwesome5';
+import { trpc } from '@/src/trpc-client';
+import { useAddToCart } from '@/hooks/cart-query-hooks';
+import ProductCard from '@/components/ProductCard';
+import FloatingCartBar from '@/components/floating-cart-bar';
+
+const { width: screenWidth } = Dimensions.get('window');
+const itemWidth = (screenWidth - 48) / 2; // 48 = padding horizontal (16*2) + gap (16)
+
+
+export default function StoreDetail() {
+ const router = useRouter();
+ // const { storeId } = useLocalSearchParams();
+ const { id: storeId } = useLocalSearchParams();
+ const storeIdNum = parseInt(storeId as string);
+ const [isLoadingDialogOpen, setIsLoadingDialogOpen] = useState(false);
+
+ const { data: storeData, isLoading, refetch, error } = trpc.user.stores.getStoreWithProducts.useQuery(
+ { storeId: storeIdNum },
+ { enabled: !!storeIdNum }
+ );
+
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ useDrawerTitle(storeData?.store?.name || 'Store', [storeData?.store?.name]);
+
+ const addToCart = useAddToCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true });
+
+ const handleAddToCart = (productId: number) => {
+ setIsLoadingDialogOpen(true);
+ addToCart.mutate({ productId, quantity: 1 }, {
+ onSuccess: () => {
+ Alert.alert('Success', 'Item added to cart!');
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to add item to cart');
+ },
+ onSettled: () => {
+ setIsLoadingDialogOpen(false);
+ },
+ });
+ };
+
+ const handleBuyNow = (productId: number) => {
+ setIsLoadingDialogOpen(true);
+ addToCart.mutate({ productId, quantity: 1 }, {
+ onSuccess: () => {
+ router.push(`/(drawer)/(tabs)/home/cart?select=${productId}`);
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to add item to cart');
+ },
+ onSettled: () => {
+ setIsLoadingDialogOpen(false);
+ },
+ });
+ };
+
+ if (isLoading) {
+ return (
+
+ Loading store...
+
+ );
+ }
+
+ if (error || !storeData) {
+ return (
+
+
+ Oops!
+ Store not found or error loading
+
+ );
+ }
+
+ return (
+
+ (
+ router.push(`/(drawer)/(tabs)/stores/store-detail/product-detail/${item.id}`)}
+ showDeliveryInfo={false}
+ miniView={true}
+ />
+ )}
+ keyExtractor={(item, index) => index.toString()}
+ columnWrapperStyle={{ gap: 16 }}
+ contentContainerStyle={[tw`px-4 pb-24`, { gap: 16 }]}
+ ListHeaderComponent={
+
+
+
+
+
+ {storeData?.store?.name}
+ {storeData?.store?.description && (
+ {storeData?.store?.description}
+ )}
+
+
+
+ Products from this Store
+
+
+ }
+ />
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/_layout.tsx
new file mode 100644
index 0000000..86a1d6c
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/_layout.tsx
@@ -0,0 +1,15 @@
+import { Stack } from 'expo-router';
+
+export default function StoreDetailLayout() {
+ return (
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/product-detail/[id].tsx b/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/product-detail/[id].tsx
new file mode 100644
index 0000000..7f7b42c
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/product-detail/[id].tsx
@@ -0,0 +1,17 @@
+import React from 'react';
+import { useLocalSearchParams } from 'expo-router';
+import ProductDetail from '@/components/ProductDetail';
+import { View } from 'react-native';
+import { tw } from 'common-ui';
+import FloatingCartBar from '@/components/floating-cart-bar';
+
+export default function ProductDetailPage() {
+ const { id } = useLocalSearchParams();
+ const productId = id as string;
+
+ return(
+ <>
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/product-detail/_layout.tsx b/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/product-detail/_layout.tsx
new file mode 100644
index 0000000..7d1194a
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/(tabs)/stores/store-detail/product-detail/_layout.tsx
@@ -0,0 +1,12 @@
+import { Stack } from 'expo-router';
+
+export default function ProductDetailLayout() {
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/(drawer)/_layout.tsx b/apps/user-ui/app/(drawer)/_layout.tsx
new file mode 100755
index 0000000..f1c2f2e
--- /dev/null
+++ b/apps/user-ui/app/(drawer)/_layout.tsx
@@ -0,0 +1,119 @@
+import { Tabs } from "expo-router/tabs";
+import { Redirect } from "expo-router";
+import {
+ View,
+ ActivityIndicator,
+ StatusBar,
+} from "react-native";
+import { LinearGradient } from "expo-linear-gradient";
+import { Ionicons } from "@expo/vector-icons";
+import { useAuth } from "@/src/contexts/AuthContext";
+import { tw, theme, MyTouchableOpacity, MyText } from "common-ui";
+import ProfileChecker from "@/components/ProfileChecker";
+import HomeIcon from "@/components/icons/HomeIcon";
+import StoresIcon from "@/components/icons/StoresIcon";
+import OrderAgainIcon from "@/components/icons/OrderAgainIcon";
+import MeIcon from "@/components/icons/MeIcon";
+import { useAppStore } from "@/src/store/appStore";
+
+export default function Layout() {
+ const { isAuthenticated, isLoading } = useAuth();
+ const hideTabsNav = useAppStore((state) => state.hideTabsNav);
+ const shouldHideTabs = Object.values(hideTabsNav).some(Boolean);
+
+
+
+ if (isLoading) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+ <>
+ {/* */}
+
+ (
+
+ ),
+ }}
+ />
+ (
+
+ ),
+ }}
+ />
+ null,
+ tabBarIcon: () => null,
+ tabBarButton: (props) => (
+
+
+
+
+
+ Flash Delivery
+
+
+ ),
+ }}
+ />
+ (
+
+ ),
+ }}
+ />
+ (
+
+ ),
+ }}
+ />
+
+
+ >
+ );
+}
diff --git a/apps/user-ui/app/_layout.tsx b/apps/user-ui/app/_layout.tsx
new file mode 100755
index 0000000..4d1331d
--- /dev/null
+++ b/apps/user-ui/app/_layout.tsx
@@ -0,0 +1,79 @@
+import {
+ DarkTheme,
+ DefaultTheme,
+ ThemeProvider,
+} from "@react-navigation/native";
+import { useFonts } from "expo-font";
+import { Stack } from "expo-router";
+import "react-native-reanimated";
+
+import { useColorScheme } from "@/hooks/useColorScheme";
+import { Appearance, Dimensions, StatusBar, View } from "react-native";
+import { QueryClientProvider } from "@tanstack/react-query";
+import { theme , MyStatusBar } from "common-ui";
+import queryClient from "@/utils/queryClient";
+import Toast from "react-native-toast-message";
+import { NotificationProvider } from "@/services/notif-service/notif-context";
+import { Provider as PaperProvider } from "react-native-paper";
+import { AuthProvider } from "@/src/contexts/AuthContext";
+import { trpc, trpcClient } from "@/src/trpc-client";
+import { SafeAreaView, SafeAreaProvider } from "react-native-safe-area-context";
+import LocationTestWrapper from "@/components/LocationTestWrapper";
+import HealthTestWrapper from "@/components/HealthTestWrapper";
+import FirstUserWrapper from "@/components/FirstUserWrapper";
+import UpdateChecker from "@/components/UpdateChecker";
+import { RefreshProvider } from "../../../packages/ui/src/lib/refresh-context";
+import WebViewWrapper from "@/components/WebViewWrapper";
+import React from "react";
+
+export default function RootLayout() {
+ const colorScheme = useColorScheme();
+ const [loaded] = useFonts({
+ SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
+ });
+
+ React.useEffect(() => {
+ Appearance.setColorScheme('light')
+ }, []);
+
+ if (!loaded) {
+ return null;
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/user-ui/app/api/auth/authorize+api.ts b/apps/user-ui/app/api/auth/authorize+api.ts
new file mode 100644
index 0000000..215e170
--- /dev/null
+++ b/apps/user-ui/app/api/auth/authorize+api.ts
@@ -0,0 +1,55 @@
+import constants from "@/src/constants";
+
+const GOOGLE_CLIENT_ID = constants.GOOGLE_CLIENT_ID;
+export async function GET(request: Request) {
+
+ if (!GOOGLE_CLIENT_ID) {
+ return Response.json(
+ { error: "Missing GOOGLE_CLIENT_ID environment variable" },
+ { status: 500 }
+ );
+ }
+
+ const url = new URL(request.url);
+ let idpClientId: string;
+
+ const internalClient = url.searchParams.get("client_id");
+
+ const redirectUri = url.searchParams.get("redirect_uri");
+
+
+ let platform;
+
+ if (redirectUri === constants.APP_SCHEME) {
+ platform = "mobile";
+ } else if (redirectUri === constants.BASE_URL) {
+ platform = "web";
+ } else {
+ return Response.json({ error: "Invalid redirect_uri" }, { status: 400 });
+ }
+
+ // use state to drive redirect back to platform
+ let state = platform + "|" + url.searchParams.get("state");
+
+ if (internalClient === "google") {
+ idpClientId = GOOGLE_CLIENT_ID;
+ } else {
+ return Response.json({ error: "Invalid client" }, { status: 400 });
+ }
+
+ // additional enforcement
+ if (!state) {
+ return Response.json({ error: "Invalid state" }, { status: 400 });
+ }
+
+ const params = new URLSearchParams({
+ client_id: idpClientId,
+ redirect_uri: constants.BASE_URL + "/api/auth/callback",
+ response_type: "code",
+ scope: url.searchParams.get("scope") || "identity",
+ state: state,
+ prompt: "select_account",
+ });
+
+ return Response.redirect(constants.GOOGLE_AUTH_URL + "?" + params.toString());
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/api/auth/callback+api.ts b/apps/user-ui/app/api/auth/callback+api.ts
new file mode 100644
index 0000000..06ac1d2
--- /dev/null
+++ b/apps/user-ui/app/api/auth/callback+api.ts
@@ -0,0 +1,28 @@
+// import { BASE_URL, APP_SCHEME } from "@/utils/constants";
+
+import constants from "@/src/constants";
+
+const BASE_URL = constants.BASE_URL;
+const APP_SCHEME = constants.APP_SCHEME;
+
+export async function GET(request: Request) {
+ const incomingParams = new URLSearchParams(request.url.split("?")[1]);
+ const combinedPlatformAndState = incomingParams.get("state");
+ if (!combinedPlatformAndState) {
+ return Response.json({ error: "Invalid state" }, { status: 400 });
+ }
+ // strip platform to return state as it was set on the client
+ const platform = combinedPlatformAndState.split("|")[0];
+ const state = combinedPlatformAndState.split("|")[1];
+
+ const outgoingParams = new URLSearchParams({
+ code: incomingParams.get("code")?.toString() || "",
+ state,
+ });
+
+ return Response.redirect(
+ (platform === "web" ? BASE_URL : APP_SCHEME) +
+ "?" +
+ outgoingParams.toString()
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/api/auth/token+api.ts b/apps/user-ui/app/api/auth/token+api.ts
new file mode 100644
index 0000000..84483d8
--- /dev/null
+++ b/apps/user-ui/app/api/auth/token+api.ts
@@ -0,0 +1,4 @@
+export async function GET(request:Request) {
+ console.log('from the get token request')
+
+}
\ No newline at end of file
diff --git a/apps/user-ui/app/index.tsx b/apps/user-ui/app/index.tsx
new file mode 100755
index 0000000..c09216b
--- /dev/null
+++ b/apps/user-ui/app/index.tsx
@@ -0,0 +1,22 @@
+import { Redirect } from 'expo-router';
+import { useAuth } from '@/src/contexts/AuthContext';
+import { View, ActivityIndicator } from 'react-native';
+import { tw, AppContainer } from 'common-ui';
+
+export default function Index() {
+ const { isAuthenticated, isLoading } = useAuth();
+
+ if (isLoading) {
+ return (
+
+
+
+
+
+ );
+ }
+
+
+ console.log("from the user ui index.tsx - isAuthenticated:", isAuthenticated);
+ return ;
+}
\ No newline at end of file
diff --git a/apps/user-ui/assets/fonts/SpaceMono-Regular.ttf b/apps/user-ui/assets/fonts/SpaceMono-Regular.ttf
new file mode 100755
index 0000000..28d7ff7
Binary files /dev/null and b/apps/user-ui/assets/fonts/SpaceMono-Regular.ttf differ
diff --git a/apps/user-ui/assets/images/adaptive-icon.png b/apps/user-ui/assets/images/adaptive-icon.png
new file mode 100755
index 0000000..03d6f6b
Binary files /dev/null and b/apps/user-ui/assets/images/adaptive-icon.png differ
diff --git a/apps/user-ui/assets/images/farm2door-logo.png b/apps/user-ui/assets/images/farm2door-logo.png
new file mode 100644
index 0000000..95f9b8b
Binary files /dev/null and b/apps/user-ui/assets/images/farm2door-logo.png differ
diff --git a/apps/user-ui/assets/images/favicon.png b/apps/user-ui/assets/images/favicon.png
new file mode 100755
index 0000000..e75f697
Binary files /dev/null and b/apps/user-ui/assets/images/favicon.png differ
diff --git a/apps/user-ui/assets/images/freshyo-logo.png b/apps/user-ui/assets/images/freshyo-logo.png
new file mode 100644
index 0000000..83f0a8c
Binary files /dev/null and b/apps/user-ui/assets/images/freshyo-logo.png differ
diff --git a/apps/user-ui/assets/images/freshyo-logoo.png b/apps/user-ui/assets/images/freshyo-logoo.png
new file mode 100644
index 0000000..f8d701c
Binary files /dev/null and b/apps/user-ui/assets/images/freshyo-logoo.png differ
diff --git a/apps/user-ui/assets/images/freshyo-logoo.svg b/apps/user-ui/assets/images/freshyo-logoo.svg
new file mode 100644
index 0000000..345afcf
--- /dev/null
+++ b/apps/user-ui/assets/images/freshyo-logoo.svg
@@ -0,0 +1,30 @@
+
diff --git a/apps/user-ui/assets/images/icon.png b/apps/user-ui/assets/images/icon.png
new file mode 100755
index 0000000..a0b1526
Binary files /dev/null and b/apps/user-ui/assets/images/icon.png differ
diff --git a/apps/user-ui/assets/images/logo.png b/apps/user-ui/assets/images/logo.png
new file mode 100644
index 0000000..4c13a45
Binary files /dev/null and b/apps/user-ui/assets/images/logo.png differ
diff --git a/apps/user-ui/assets/images/logo_mini.jpg b/apps/user-ui/assets/images/logo_mini.jpg
new file mode 100644
index 0000000..4782a53
Binary files /dev/null and b/apps/user-ui/assets/images/logo_mini.jpg differ
diff --git a/apps/user-ui/assets/images/partial-react-logo.png b/apps/user-ui/assets/images/partial-react-logo.png
new file mode 100755
index 0000000..66fd957
Binary files /dev/null and b/apps/user-ui/assets/images/partial-react-logo.png differ
diff --git a/apps/user-ui/assets/images/react-logo.png b/apps/user-ui/assets/images/react-logo.png
new file mode 100755
index 0000000..9d72a9f
Binary files /dev/null and b/apps/user-ui/assets/images/react-logo.png differ
diff --git a/apps/user-ui/assets/images/react-logo@2x.png b/apps/user-ui/assets/images/react-logo@2x.png
new file mode 100755
index 0000000..2229b13
Binary files /dev/null and b/apps/user-ui/assets/images/react-logo@2x.png differ
diff --git a/apps/user-ui/assets/images/react-logo@3x.png b/apps/user-ui/assets/images/react-logo@3x.png
new file mode 100755
index 0000000..a99b203
Binary files /dev/null and b/apps/user-ui/assets/images/react-logo@3x.png differ
diff --git a/apps/user-ui/assets/images/splash-icon.png b/apps/user-ui/assets/images/splash-icon.png
new file mode 100755
index 0000000..03d6f6b
Binary files /dev/null and b/apps/user-ui/assets/images/splash-icon.png differ
diff --git a/apps/user-ui/assets/images/symbuyote.png b/apps/user-ui/assets/images/symbuyote.png
new file mode 100644
index 0000000..4f32b0c
Binary files /dev/null and b/apps/user-ui/assets/images/symbuyote.png differ
diff --git a/apps/user-ui/assets/logo.png b/apps/user-ui/assets/logo.png
new file mode 100644
index 0000000..0ca5730
Binary files /dev/null and b/apps/user-ui/assets/logo.png differ
diff --git a/apps/user-ui/components/AddressSelector.tsx b/apps/user-ui/components/AddressSelector.tsx
new file mode 100644
index 0000000..8183ecc
--- /dev/null
+++ b/apps/user-ui/components/AddressSelector.tsx
@@ -0,0 +1,163 @@
+import React from "react";
+import { View, Dimensions } from "react-native";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import {
+ BottomDropdown,
+ MyTouchableOpacity,
+ MyText,
+ tw,
+ theme,
+} from "common-ui";
+import { useAuth } from "@/src/contexts/AuthContext";
+import { trpc } from "@/src/trpc-client";
+import { useAddressStore } from "@/src/store/addressStore";
+
+const { width: screenWidth } = Dimensions.get("window");
+
+interface AddressSelectorProps {
+ mode?: "home";
+ deliveryTime?: string;
+}
+
+const AddressSelector: React.FC = ({
+ mode = "home",
+ deliveryTime,
+}) => {
+ const { isAuthenticated } = useAuth();
+ const { selectedAddressId, setSelectedAddressId } = useAddressStore();
+
+ const { data: defaultAddressData } =
+ trpc.user.address.getDefaultAddress.useQuery();
+ const { data: addressesData } = trpc.user.address.getUserAddresses.useQuery(
+ undefined,
+ {
+ enabled: isAuthenticated,
+ }
+ );
+
+ const defaultAddress = defaultAddressData?.data;
+ const addresses = addressesData?.data || [];
+
+ // Transform addresses for dropdown
+ const addressOptions = addresses.map((address) => ({
+ label: `${address.name} - ${address.addressLine1}, ${address.city}`,
+ value: address.id,
+ }));
+
+ const handleAddressChange = (
+ value: string | number | string[] | number[]
+ ) => {
+ const addressId = value as number;
+ setSelectedAddressId(addressId);
+ };
+
+ // Helper to get display parts
+ const getDisplayParts = (displayText?: string) => {
+ const fullText =
+ displayText ||
+ (defaultAddress
+ ? `${defaultAddress.name} - ${defaultAddress.addressLine1}, ${defaultAddress.city}`
+ : "");
+ let name = defaultAddress ? defaultAddress.name : "Home";
+ let address = defaultAddress
+ ? `${defaultAddress.addressLine1}, ${defaultAddress.city}`
+ : "Add your delivery address";
+
+ if (fullText) {
+ const parts = fullText.split(" - ");
+ if (parts.length >= 1) name = parts[0];
+ if (parts.length > 1) address = parts.slice(1).join(" - ");
+ }
+ return { name, address };
+ };
+
+ const { name: defaultName, address: defaultAddr } = getDisplayParts();
+
+ if (!isAuthenticated) {
+ // Static display for non-authenticated users (Home mode)
+ return (
+
+
+
+
+
+
+
+ Delivery to {defaultName}
+
+
+ {defaultAddr}
+
+
+
+
+ );
+ }
+
+ return (
+ {
+ const { name, address } = getDisplayParts(displayText);
+
+ // Home styling
+ return (
+
+
+
+
+
+
+
+
+ to {name}
+
+ {/* */}
+
+
+ {address}
+
+
+
+
+ );
+ }}
+ />
+ );
+};
+
+export default AddressSelector;
diff --git a/apps/user-ui/components/BannerCarousel.tsx b/apps/user-ui/components/BannerCarousel.tsx
new file mode 100644
index 0000000..49bf501
--- /dev/null
+++ b/apps/user-ui/components/BannerCarousel.tsx
@@ -0,0 +1,143 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { View, Dimensions, Image, ScrollView, NativeSyntheticEvent, NativeScrollEvent } from 'react-native';
+import { MyTouchableOpacity, MyText, tw } from 'common-ui';
+import { useRouter } from 'expo-router';
+import { trpc } from '@/src/trpc-client';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+
+const { width: screenWidth } = Dimensions.get('window');
+
+interface Banner {
+ id: number;
+ name: string;
+ imageUrl: string;
+ description?: string | null;
+ productIds?: number[] | null;
+ redirectUrl?: string | null;
+ serialNum?: number | null;
+ isActive: boolean;
+}
+
+export default function BannerCarousel() {
+ const router = useRouter();
+ const scrollViewRef = useRef(null);
+ const [currentIndex, setCurrentIndex] = useState(0);
+ const [isAutoPlaying, setIsAutoPlaying] = useState(true);
+
+ // Fetch banners data
+ const { data: bannersData, isLoading, error } = trpc.user.banner.getBanners.useQuery();
+ const banners = bannersData?.banners || [];
+
+ // Auto-play functionality
+ useEffect(() => {
+ if (banners.length <= 1 || !isAutoPlaying) return; // Don't auto-play if conditions not met
+
+ const interval = setInterval(() => {
+ setCurrentIndex((prevIndex) => {
+ const nextIndex = (prevIndex + 1) % banners.length;
+ // Auto-scroll to next slide
+ if (scrollViewRef.current) {
+ scrollViewRef.current.scrollTo({
+ x: nextIndex * (screenWidth - 32),
+ animated: true,
+ });
+ }
+ return nextIndex;
+ });
+ }, 6000); // 6 seconds
+
+ return () => clearInterval(interval); // Cleanup on unmount
+ }, [banners.length, isAutoPlaying]);
+
+ if (isLoading) {
+ return (
+
+ Loading banners...
+
+ );
+ }
+
+ if (error || !banners || banners.length === 0) return null;
+
+ const handleBannerPress = (banner: Banner) => {
+ if (banner.productIds && banner.productIds.length > 0) {
+ // Navigate to the first product's detail page
+ router.push(`/(drawer)/(tabs)/home/product-detail/${banner.productIds[0]}`);
+ } else if (banner.redirectUrl) {
+ // Handle external URL - could open in browser or handle deep links
+ console.log('Banner redirect URL:', banner.redirectUrl);
+ }
+ // If no productIds or redirectUrl, banner is just for display
+ };
+
+ const handleScroll = (event: NativeSyntheticEvent) => {
+ const slideSize = screenWidth - 32; // width minus horizontal padding
+ const index = Math.round(event.nativeEvent.contentOffset.x / slideSize);
+ setCurrentIndex(index);
+ };
+
+ const goToSlide = (index: number) => {
+ setIsAutoPlaying(false); // Pause auto-play when user manually navigates
+ if (scrollViewRef.current) {
+ scrollViewRef.current.scrollTo({
+ x: index * (screenWidth - 32),
+ animated: true,
+ });
+ }
+ setCurrentIndex(index);
+ // Resume auto-play after a short delay
+ setTimeout(() => setIsAutoPlaying(true), 1000);
+ };
+
+ return (
+
+ setIsAutoPlaying(false)}
+ onTouchEnd={() => setIsAutoPlaying(true)}
+ onMomentumScrollEnd={() => setIsAutoPlaying(true)}
+ >
+ {banners.map((banner: Banner) => (
+ handleBannerPress(banner)}
+ style={tw`mr-4 rounded-2xl overflow-hidden`}
+ activeOpacity={0.9}
+ >
+
+
+ ))}
+
+
+ {/* Pagination Dots */}
+ {banners.length > 1 && (
+
+ {banners.map((_, index: number) => (
+ goToSlide(index)}
+ style={tw`mx-1`}
+ >
+
+
+ ))}
+
+ )}
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/components/CheckoutAddressSelector.tsx b/apps/user-ui/components/CheckoutAddressSelector.tsx
new file mode 100644
index 0000000..a281804
--- /dev/null
+++ b/apps/user-ui/components/CheckoutAddressSelector.tsx
@@ -0,0 +1,129 @@
+import React, { useState, useEffect } from 'react';
+import { View, Text, TouchableOpacity, ScrollView } from 'react-native';
+import { tw, BottomDialog } from 'common-ui';
+import { useQueryClient } from '@tanstack/react-query';
+import AddressForm from '@/src/components/AddressForm';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { trpc } from '@/src/trpc-client';
+
+interface AddressSelectorProps {
+ selectedAddress: number | null;
+ onAddressSelect: (addressId: number) => void;
+}
+
+const CheckoutAddressSelector: React.FC = ({
+ selectedAddress,
+ onAddressSelect,
+}) => {
+ const [showAddAddress, setShowAddAddress] = useState(false);
+ const queryClient = useQueryClient();
+ const { data: addresses } = trpc.user.address.getUserAddresses.useQuery();
+
+ // Sort addresses with selected first, then default, then others
+ const sortedAddresses = React.useMemo(() => {
+ if (!addresses?.data) return [];
+ return [...addresses.data].sort((a, b) => {
+ // Selected address comes first
+ if (selectedAddress === a.id && selectedAddress !== b.id) return -1;
+ if (selectedAddress === b.id && selectedAddress !== a.id) return 1;
+
+ // Then default address (if not already selected)
+ if (a.isDefault && !b.isDefault) return -1;
+ if (!a.isDefault && b.isDefault) return 1;
+
+ // Maintain stable sort by id for other addresses
+ return a.id - b.id;
+ });
+ }, [addresses?.data, selectedAddress]);
+
+ // Auto-select default address when addresses are loaded and none is selected
+ useEffect(() => {
+ if (sortedAddresses.length > 0 && selectedAddress === null) {
+ const defaultAddress = sortedAddresses.find(addr => addr.isDefault);
+ if (defaultAddress) {
+ onAddressSelect(defaultAddress.id);
+ }
+ }
+ }, [sortedAddresses, selectedAddress, onAddressSelect]);
+
+ return (
+ <>
+
+
+
+
+
+
+
+ Delivery Address
+
+
+ setShowAddAddress(true)}>
+ + Add New
+
+
+
+ {(!sortedAddresses || sortedAddresses.length === 0) ? (
+
+
+ No addresses found
+ setShowAddAddress(true)} style={tw`mt-3 bg-brand500 px-4 py-2 rounded-lg`}>
+ Add Address
+
+
+ ) : (
+
+ {sortedAddresses.map((address) => (
+ onAddressSelect(address.id)}
+ style={tw`w-72 p-4 mr-3 bg-gray-50 rounded-xl border-2 ${selectedAddress === address.id ? 'border-brand500 bg-blue-50' : 'border-gray-200'
+ } shadow-sm`}
+ >
+
+
+
+
+ {address.name}
+
+
+ {selectedAddress === address.id && (
+
+
+
+ )}
+
+
+ {address.addressLine1}{address.addressLine2 ? `, ${address.addressLine2}` : ''}
+
+
+ {address.city}, {address.state} - {address.pincode}
+
+
+ Phone: {address.phone}
+
+
+ ))}
+
+ )}
+
+
+ setShowAddAddress(false)}>
+ {
+ setShowAddAddress(false);
+ queryClient.invalidateQueries();
+ }}
+ />
+
+ >
+ );
+};
+
+export default CheckoutAddressSelector;
\ No newline at end of file
diff --git a/apps/user-ui/components/ComplaintForm.tsx b/apps/user-ui/components/ComplaintForm.tsx
new file mode 100644
index 0000000..115d7a9
--- /dev/null
+++ b/apps/user-ui/components/ComplaintForm.tsx
@@ -0,0 +1,128 @@
+import React, { useState } from 'react';
+import { View, TextInput, ActivityIndicator, KeyboardAvoidingView, Platform, Alert } from 'react-native';
+import { MaterialIcons } from '@expo/vector-icons';
+import { useMutation } from "@tanstack/react-query";
+import { MyText, ImageUploader, tw, MyTouchableOpacity } from 'common-ui';
+import usePickImage from 'common-ui/src/components/use-pick-image';
+import axios from '../services/axios-user-ui';
+// import axios from 'common-ui/src/services/axios';
+
+interface ComplaintFormProps {
+ open: boolean;
+ onClose: () => void;
+ orderId: string;
+}
+
+export default function ComplaintForm({ open, onClose, orderId }: ComplaintFormProps) {
+ const [complaintBody, setComplaintBody] = useState('');
+ const [complaintImages, setComplaintImages] = useState<{ uri?: string }[]>([]);
+
+ // API function
+ const raiseComplaintApi = async (payload: { complaintBody: string; images: { uri?: string }[] }) => {
+ const formData = new FormData();
+
+ formData.append('orderId', orderId);
+ formData.append('complaintBody', payload.complaintBody);
+
+ // Add images if provided
+ if (payload.images && payload.images.length > 0) {
+ payload.images.forEach((image, index) => {
+ if (image.uri) {
+ const fileName = `complaint-image-${index}.jpg`;
+ formData.append('images', {
+ uri: image.uri,
+ name: fileName,
+ type: 'image/jpeg',
+ } as any);
+ }
+ });
+ }
+
+ const response = await axios.post('/uv/complaints/raise', formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+ return response.data;
+ };
+
+ // Hook
+ const raiseComplaintMutation = useMutation({
+ mutationFn: raiseComplaintApi,
+ });
+
+ const pickComplaintImage = usePickImage({
+ setFile: (files) => setComplaintImages(prev => [...prev, ...files]),
+ multiple: true,
+ });
+
+ const handleSubmit = () => {
+ if (!complaintBody.trim()) {
+ Alert.alert('Error', 'Please enter complaint details');
+ return;
+ }
+
+ raiseComplaintMutation.mutate(
+ {
+ complaintBody: complaintBody.trim(),
+ images: complaintImages,
+ },
+ {
+ onSuccess: () => {
+ Alert.alert('Success', 'Complaint raised successfully');
+ setComplaintBody('');
+ setComplaintImages([]);
+ onClose();
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to raise complaint');
+ },
+ }
+ );
+ };
+
+ if (!open) return null;
+
+ return (
+
+
+
+ Raise Complaint
+
+
+
+
+
+ Describe the issue
+
+
+ setComplaintImages(prev => prev.filter(img => img.uri !== uri))}
+ />
+
+
+ {raiseComplaintMutation.isPending ? (
+
+ ) : (
+ Submit Complaint
+ )}
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/components/CustomHeader.tsx b/apps/user-ui/components/CustomHeader.tsx
new file mode 100644
index 0000000..1853bc7
--- /dev/null
+++ b/apps/user-ui/components/CustomHeader.tsx
@@ -0,0 +1,58 @@
+import React from 'react';
+import { View } from 'react-native';
+import { useRouter } from 'expo-router';
+import { tw, theme, MyTouchableOpacity } from 'common-ui';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+
+const CustomHeader = () => {
+ const router = useRouter();
+
+ return (
+
+ router.back()}
+ style={{
+ width: 40,
+ height: 40,
+ borderRadius: 20,
+ backgroundColor: theme.colors.gray2,
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+
+
+
+ router.push('/(drawer)/(tabs)/home/cart')}
+ style={{
+ width: 40,
+ height: 40,
+ borderRadius: 20,
+ backgroundColor: theme.colors.gray2,
+ justifyContent: 'center',
+ alignItems: 'center',
+ marginRight: 8,
+ }}
+ >
+
+
+ router.push('/(drawer)/(tabs)/me')}
+ style={{
+ width: 40,
+ height: 40,
+ borderRadius: 20,
+ backgroundColor: theme.colors.gray2,
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+
+
+
+
+ );
+};
+
+export default CustomHeader;
\ No newline at end of file
diff --git a/apps/user-ui/components/FirstUserWrapper.tsx b/apps/user-ui/components/FirstUserWrapper.tsx
new file mode 100644
index 0000000..38ce3ec
--- /dev/null
+++ b/apps/user-ui/components/FirstUserWrapper.tsx
@@ -0,0 +1,43 @@
+import React, { useState, useEffect } from 'react'
+import { View } from 'react-native'
+import { MyButton, StorageServiceCasual, tw, MyText } from 'common-ui'
+
+interface Props {
+ children: React.ReactNode
+}
+
+const FirstUserWrapper: React.FC = ({ children }) => {
+ const [isFirstTime, setIsFirstTime] = useState(null)
+
+ useEffect(() => {
+ const checkFirstTime = async () => {
+ const value = await StorageServiceCasual.getItem('isFirstTimeUser')
+ setIsFirstTime(value !== 'false')
+ }
+ checkFirstTime()
+ }, [])
+
+ const handleNext = async () => {
+ await StorageServiceCasual.setItem('isFirstTimeUser', 'false')
+ setIsFirstTime(false)
+ }
+
+ if (isFirstTime === null) {
+ return null
+ }
+
+ if (isFirstTime) {
+ return (
+
+ Hello Happy Shopping
+
+
+
+
+ )
+ }
+
+ return <>{children}>
+}
+
+export default FirstUserWrapper
\ No newline at end of file
diff --git a/apps/user-ui/components/FlashDeliveryNote.tsx b/apps/user-ui/components/FlashDeliveryNote.tsx
new file mode 100644
index 0000000..0f36f17
--- /dev/null
+++ b/apps/user-ui/components/FlashDeliveryNote.tsx
@@ -0,0 +1,69 @@
+import React, { useState, useEffect } from "react";
+import { View } from "react-native";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { tw, MyText, MyTouchableOpacity } from "common-ui";
+
+interface FlashDeliveryNoteProps {
+ onClose?: () => void;
+ autoHide?: boolean;
+ autoHideDelay?: number;
+}
+
+const FlashDeliveryNote: React.FC = ({
+ onClose,
+ autoHide = true,
+ autoHideDelay = 10000, // 10 seconds
+}) => {
+ const [isVisible, setIsVisible] = useState(true);
+
+ useEffect(() => {
+ if (!autoHide || !isVisible) return;
+
+ const timer = setTimeout(() => {
+ setIsVisible(false);
+ }, autoHideDelay);
+
+ return () => clearTimeout(timer);
+ }, [autoHide, autoHideDelay, isVisible]);
+
+ const handleDismiss = () => {
+ setIsVisible(false);
+ onClose?.();
+ };
+
+ if (!isVisible) return null;
+
+ return (
+
+
+
+
+
+
+
+
+
+ Flash Delivery Notice
+
+
+ Prices may differ for Flash Delivery and not all products are available for flash delivery
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default FlashDeliveryNote;
\ No newline at end of file
diff --git a/apps/user-ui/components/HealthTestWrapper.tsx b/apps/user-ui/components/HealthTestWrapper.tsx
new file mode 100644
index 0000000..82f435b
--- /dev/null
+++ b/apps/user-ui/components/HealthTestWrapper.tsx
@@ -0,0 +1,114 @@
+import React, { useState, useEffect } from 'react';
+import { View, ActivityIndicator } from 'react-native';
+import { tw, theme, MyText, MyTouchableOpacity , BottomDialog } from 'common-ui';
+import { trpc, trpcClient } from '@/src/trpc-client';
+import { useGetEssentialConsts } from '@/src/api-hooks/essential-consts.api';
+import Constants from 'expo-constants';
+import * as Linking from 'expo-linking';
+
+interface HealthTestWrapperProps {
+ children: React.ReactNode;
+}
+
+const HealthTestWrapper: React.FC = ({ children }) => {
+ const { data, isLoading, error, refetch } = trpc.common.healthCheck.useQuery();
+ const { data: backendConsts } = useGetEssentialConsts();
+
+ const versionFromBackend = backendConsts?.versionNum;
+ const appUrl = backendConsts?.playStoreUrl;
+
+ const [showUpdateDialog, setShowUpdateDialog] = useState(false);
+
+ // Version comparison logic
+ useEffect(() => {
+ const version = Constants.expoConfig?.version;
+ if (!version || !versionFromBackend) return;
+
+ // Parse local version
+ const versionParts = version.split('.');
+ const versionNum1 = parseInt(versionParts[0]);
+ const versionNum2 = parseInt(versionParts[1]);
+ const versionNum3 = parseInt(versionParts[2]);
+
+ if (isNaN(versionNum1) || isNaN(versionNum2) || isNaN(versionNum3)) return;
+
+ // Parse backend version
+ const backendVersionParts = versionFromBackend.split('.');
+ const backendVersionNum1 = parseInt(backendVersionParts[0]);
+ const backendVersionNum2 = parseInt(backendVersionParts[1]);
+ const backendVersionNum3 = parseInt(backendVersionParts[2]);
+
+ if (isNaN(backendVersionNum1) || isNaN(backendVersionNum2) || isNaN(backendVersionNum3)) return;
+
+ // Compare versions
+ const needsUpdate = versionNum1 < backendVersionNum1 ||
+ (versionNum1 === backendVersionNum1 && versionNum2 < backendVersionNum2);
+
+ if (needsUpdate) {
+ setShowUpdateDialog(true);
+ }
+ }, [versionFromBackend]);
+
+ // Log app version
+ console.log('App Version:', Constants.expoConfig?.version);
+ console.log('Backend Version:', versionFromBackend);
+ if (isLoading) {
+ return (
+
+
+ Checking service status...
+
+ );
+ }
+
+ if (error || data?.status !== "ok") {
+ return (
+
+
+ ⚠️
+
+ Service Unavailable
+
+ Please check your connection and try again.
+
+ refetch()}
+ style={tw`bg-brand500 px-8 py-3 rounded-xl shadow-md`}
+ activeOpacity={0.8}
+ >
+ Retry
+
+
+ );
+ }
+
+ return (
+ <>
+ {children}
+ {showUpdateDialog && appUrl && (
+ setShowUpdateDialog(false)} enableDismiss={false}>
+
+
+ Update Available
+
+
+ A new version ({versionFromBackend}) is available. Your current version is {Constants.expoConfig?.version}. Please update to continue using the app.
+
+ {
+ if (appUrl) {
+ Linking.openURL(appUrl);
+ }
+ }}
+ style={{ backgroundColor: theme.colors.brand500, padding: 12, borderRadius: 8, alignItems: 'center' }}
+ >
+ Update Now
+
+
+
+ )}
+ >
+ );
+};
+
+export default HealthTestWrapper;
\ No newline at end of file
diff --git a/apps/user-ui/components/LocationTestWrapper.tsx b/apps/user-ui/components/LocationTestWrapper.tsx
new file mode 100644
index 0000000..e16ae82
--- /dev/null
+++ b/apps/user-ui/components/LocationTestWrapper.tsx
@@ -0,0 +1,110 @@
+import React, { useState, useEffect, ReactNode } from 'react';
+import * as Location from 'expo-location';
+import { BackHandler, Platform } from 'react-native';
+import { ConfirmationDialog } from 'common-ui';
+import { trpc } from '../src/trpc-client';
+
+// Emulator detection utility
+const isEmulator = (): boolean => {
+ try {
+ // Check for common emulator indicators
+ const brand = (Platform.constants as any)?.Brand?.toLowerCase();
+ const model = (Platform.constants as any)?.Model?.toLowerCase();
+ const manufacturer = (Platform.constants as any)?.Manufacturer?.toLowerCase();
+
+ // Android emulator detection
+ if (Platform.OS === 'android') {
+ return (
+ brand?.includes('generic') ||
+ brand?.includes('unknown') ||
+ model?.includes('emulator') ||
+ model?.includes('sdk') ||
+ model?.includes('android sdk') ||
+ manufacturer?.includes('genymotion') ||
+ manufacturer?.includes('unknown')
+ );
+ }
+
+ // iOS simulator detection
+ if (Platform.OS === 'ios') {
+ return (
+ (Platform.constants as any)?.systemName?.includes('Simulator') ||
+ !(Platform.constants as any)?.isDevice || // iOS simulator
+ false
+ );
+ }
+
+ return false;
+ } catch (error) {
+ // If detection fails, assume it's a real device to be safe
+ console.warn('Emulator detection failed:', error);
+ return false;
+ }
+};
+
+interface LocationTestWrapperProps {
+ children: ReactNode;
+}
+
+const LocationTestWrapper: React.FC = ({ children }) => {
+ // Skip location checks entirely for emulators
+ if (isEmulator()) {
+ return <>{children}>;
+ }
+
+ // Enable location functionality for real devices
+ const [locationDialogOpen, setLocationDialogOpen] = useState(false);
+ const [locationErrorDialogOpen, setLocationErrorDialogOpen] = useState(false);
+ const [userLocation, setUserLocation] = useState(null);
+
+ const { data: locationCheck } = trpc.common.checkLocationInPolygon.useQuery(
+ { lat: userLocation?.coords.latitude || 0, lng: userLocation?.coords.longitude || 0 },
+ { enabled: !!userLocation }
+ );
+
+ useEffect(() => {
+ if (locationCheck && !locationCheck.isInside) {
+ setLocationErrorDialogOpen(true);
+ }
+ }, [locationCheck]);
+
+ useEffect(() => {
+ (async () => {
+ const { status } = await Location.requestForegroundPermissionsAsync();
+ if (status === 'granted') {
+ const location = await Location.getCurrentPositionAsync({});
+ console.log('User location:', location.coords);
+ setUserLocation(location);
+ } else {
+ setLocationDialogOpen(true);
+ }
+ })();
+ }, []);
+
+
+ return (
+ <>
+ {children}
+ setLocationDialogOpen(false)}
+ negativeAction={() => BackHandler.exitApp()}
+ />
+ setLocationErrorDialogOpen(false)}
+ negativeAction={() => BackHandler.exitApp()}
+ />
+ >
+ );
+};
+
+export default LocationTestWrapper;
\ No newline at end of file
diff --git a/apps/user-ui/components/NextOrderGlimpse.tsx b/apps/user-ui/components/NextOrderGlimpse.tsx
new file mode 100644
index 0000000..cae820d
--- /dev/null
+++ b/apps/user-ui/components/NextOrderGlimpse.tsx
@@ -0,0 +1,173 @@
+import React from 'react';
+import { View, TouchableOpacity, ActivityIndicator } from 'react-native';
+import { useRouter } from 'expo-router';
+import { tw, MyText } from 'common-ui';
+import { MaterialIcons, Ionicons } from '@expo/vector-icons';
+import dayjs from 'dayjs';
+import { trpc } from '@/src/trpc-client';
+import { Image } from 'expo-image';
+
+interface OrderItem {
+ productName: string;
+ quantity: number;
+ price: number;
+ amount: number;
+ image: string | null;
+}
+
+interface Order {
+ id: number;
+ orderId: string;
+ orderDate: string;
+ deliveryStatus: string;
+ deliveryDate?: string;
+ orderStatus: string;
+ cancelReason: string | null;
+ totalAmount: number;
+ deliveryCharge: number;
+ paymentMode: string;
+ paymentStatus: string;
+ refundStatus: string;
+ refundAmount: number | null;
+ userNotes: string | null;
+ items: OrderItem[];
+ discountAmount?: number;
+ isFlashDelivery: boolean;
+ createdAt: string;
+}
+
+export default function NextOrderGlimpse() {
+ const router = useRouter();
+
+ const { data: ordersData, isLoading: ordersLoading } = trpc.user.order.getOrders.useQuery({
+ page: 1,
+ pageSize: 50,
+ });
+
+ const allOrders: Order[] = ordersData?.data || [];
+
+ const now = dayjs();
+
+ const upcomingOrders = allOrders.filter(order => {
+ if (order.orderStatus.toLowerCase() === 'cancelled') return false;
+ if (order.deliveryStatus.toLowerCase() === 'success') return false;
+
+ if (order.isFlashDelivery) {
+ return true;
+ }
+
+ if (order.deliveryDate) {
+ return dayjs(order.deliveryDate).isAfter(now);
+ }
+
+ return false;
+ });
+
+ upcomingOrders.sort((a, b) => {
+ if (a.isFlashDelivery && !b.isFlashDelivery) return -1;
+ if (!a.isFlashDelivery && b.isFlashDelivery) return 1;
+
+ if (a.isFlashDelivery && b.isFlashDelivery) {
+ return dayjs(b.createdAt).diff(dayjs(a.createdAt));
+ }
+
+ if (a.deliveryDate && b.deliveryDate) {
+ return dayjs(a.deliveryDate).diff(dayjs(b.deliveryDate));
+ }
+
+ return 0;
+ });
+
+ const nextOrder = upcomingOrders[0] || null;
+
+ if (ordersLoading) {
+ return (
+
+
+
+
+
+ );
+ }
+
+ if (!nextOrder) {
+ return null;
+ }
+
+ return (
+ router.push(`/(drawer)/(tabs)/me/my-orders/${nextOrder.id}`)}
+ >
+
+
+
+
+ Upcoming Order
+
+ {nextOrder.isFlashDelivery && (
+
+
+ FLASH
+
+ )}
+
+
+
+
+ #{nextOrder.orderId}
+
+ {nextOrder.items.length} {nextOrder.items.length === 1 ? 'item' : 'items'} • ₹{nextOrder.totalAmount}
+
+
+
+ {nextOrder.deliveryStatus}
+
+
+
+
+
+
+ {nextOrder.isFlashDelivery
+ ? "30-Min Delivery"
+ : dayjs(nextOrder.deliveryDate).format("DD MMM, hh:mm A")
+ }
+
+
+
+ {nextOrder.items.length > 0 && (
+
+
+ {nextOrder.items.slice(0, 3).map((item, idx) => (
+ 0 ? -8 : 0 }
+ ]}
+ >
+
+
+ ))}
+ {nextOrder.items.length > 3 && (
+
+ +{nextOrder.items.length - 3}
+
+ )}
+
+ Track Order
+
+
+ )}
+
+
+ );
+}
diff --git a/apps/user-ui/components/OrderMenu.tsx b/apps/user-ui/components/OrderMenu.tsx
new file mode 100644
index 0000000..88a0e80
--- /dev/null
+++ b/apps/user-ui/components/OrderMenu.tsx
@@ -0,0 +1,228 @@
+import React, { useState } from 'react';
+import { View, Alert, KeyboardAvoidingView, Platform, TextInput, ActivityIndicator } from 'react-native';
+import { MaterialIcons, Ionicons } from '@expo/vector-icons';
+import { tw, MyText, MyTouchableOpacity, BottomDialog } from 'common-ui';
+import { trpc } from '@/src/trpc-client';
+import ComplaintForm from '@/components/ComplaintForm';
+
+interface OrderMenuProps {
+ orderId: string;
+ postActionHandler?: () => void;
+}
+
+const OrderMenu: React.FC = ({ orderId, postActionHandler }) => {
+ const [open, setOpen] = useState(false);
+ const [editNotesDialogOpen, setEditNotesDialogOpen] = useState(false);
+ const [editNotes, setEditNotes] = useState('');
+ const [complaintDialogOpen, setComplaintDialogOpen] = useState(false);
+ const [cancelDialogOpen, setCancelDialogOpen] = useState(false);
+ const [cancelReason, setCancelReason] = useState('');
+
+ const cancelOrderMutation = trpc.user.order.cancelOrder.useMutation();
+ const updateNotesMutation = trpc.user.order.updateUserNotes.useMutation({
+ onSuccess: () => {
+ Alert.alert('Success', 'Notes updated successfully');
+ setEditNotesDialogOpen(false);
+ setEditNotes('');
+ postActionHandler?.();
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to update notes');
+ },
+ });
+
+ const handleEditNotes = async () => {
+ try {
+ await updateNotesMutation.mutateAsync({
+ id: orderId,
+ userNotes: editNotes.trim()
+ });
+ } catch (error) {
+ // Error handled in mutation
+ }
+ };
+
+ const handleCancelOrder = async () => {
+ if (!cancelReason.trim()) {
+ Alert.alert('Error', 'Please enter a reason for cancellation');
+ return;
+ }
+ try {
+ await cancelOrderMutation.mutateAsync({ id: orderId, reason: cancelReason });
+ Alert.alert('Success', 'Order cancelled successfully');
+ setCancelDialogOpen(false);
+ setCancelReason('');
+ postActionHandler?.();
+ } catch (error: any) {
+ Alert.alert('Error', error.message || 'Failed to cancel order');
+ }
+ };
+
+ const handleComplaintClose = () => {
+ setComplaintDialogOpen(false);
+ postActionHandler?.();
+ };
+
+ return (
+ <>
+ {/* Menu Trigger */}
+ setOpen(true)}
+ >
+
+
+
+ {/* Menu Dialog */}
+ setOpen(false)}>
+
+ {/* Handle */}
+
+
+ Order Options
+ Select an action for Order #{orderId}
+
+
+
+ {
+ setEditNotes('');
+ setEditNotesDialogOpen(true);
+ }}
+ >
+
+
+
+
+ Edit Notes
+ Add special instructions
+
+
+
+
+ setComplaintDialogOpen(true)}
+ >
+
+
+
+
+ Raise Complaint
+ Report an issue with this order
+
+
+
+
+ setCancelDialogOpen(true)}
+ >
+
+
+
+
+ Cancel Order
+ Request order cancellation
+
+
+
+
+
+
+
+ {/* Edit Notes Dialog */}
+ setEditNotesDialogOpen(false)}>
+
+
+
+ Edit Instructions
+ setEditNotesDialogOpen(false)}>
+
+
+
+
+
+
+
+ {updateNotesMutation.isPending ? (
+
+ ) : (
+ Save Instructions
+ )}
+
+
+
+
+
+ {/* Cancel Order Dialog */}
+ setCancelDialogOpen(false)}>
+
+
+
+ Cancel Order
+ setCancelDialogOpen(false)}>
+
+
+
+
+
+
+ Are you sure you want to cancel this order? This action cannot be undone.
+
+
+
+ Reason for cancellation
+
+
+
+ {cancelOrderMutation.isPending ? (
+
+ ) : (
+ Confirm Cancellation
+ )}
+
+
+
+
+
+ {/* Raise Complaint Dialog */}
+
+
+
+ >
+ );
+};
+
+export default OrderMenu;
\ No newline at end of file
diff --git a/apps/user-ui/components/PaymentAndOrderComponent.tsx b/apps/user-ui/components/PaymentAndOrderComponent.tsx
new file mode 100644
index 0000000..bf7b0a1
--- /dev/null
+++ b/apps/user-ui/components/PaymentAndOrderComponent.tsx
@@ -0,0 +1,394 @@
+import React, { useState, useMemo } from 'react';
+import { View, Alert, Platform } from 'react-native';
+import { useRouter } from 'expo-router';
+import { tw, MyTextInput, LoadingDialog, MyText, MyTouchableOpacity } from 'common-ui';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+// import RazorpayCheckout from 'react-native-razorpay';
+
+import { trpc } from '@/src/trpc-client';
+import { clearLocalCart } from '@/hooks/cart-query-hooks';
+import { useQueryClient } from '@tanstack/react-query';
+import { FontAwesome5, FontAwesome6 } from '@expo/vector-icons';
+
+interface PaymentAndOrderProps {
+ selectedAddress: number | null;
+ selectedSlots: Record;
+ selectedCouponId: number | null;
+ cartItems: any[];
+ totalPrice: number;
+ discountAmount: number;
+ finalTotal: number;
+ finalTotalWithDelivery: number;
+ deliveryCharge: number;
+ constsData?: any;
+ selectedCoupons: any[];
+ isFlashDelivery?: boolean;
+ onCancel?: () => void;
+}
+
+const PaymentAndOrderComponent: React.FC = ({
+ selectedAddress,
+ selectedSlots,
+ selectedCouponId,
+ cartItems,
+ totalPrice,
+ discountAmount,
+ finalTotal,
+ finalTotalWithDelivery,
+ deliveryCharge,
+ constsData,
+ selectedCoupons,
+ isFlashDelivery = false,
+ onCancel,
+}) => {
+
+ const router = useRouter();
+ const queryClient = useQueryClient();
+ const [userNotes, setUserNotes] = useState('');
+ const [isLoadingDialogOpen, setIsLoadingDialogOpen] = useState(false);
+ const [paymentMethod, setPaymentMethod] = useState<'online' | 'cod'>('cod');
+
+ // Helper function to clear cart and invalidate queries
+ const clearCartAndInvalidateQueries = async (cartType: 'regular' | 'flash' = 'regular') => {
+ await clearLocalCart(cartType);
+ queryClient.invalidateQueries({ queryKey: [`local-cart-${cartType}`] });
+ };
+
+ const { data: productsData } = trpc.user.product.getAllProductsSummary.useQuery();
+
+ // Memoized flash-eligible product IDs
+ const flashEligibleProductIds = useMemo(() => {
+ if (!productsData) return new Set();
+ return new Set(
+ productsData
+ .filter((product: any) => product.isFlashAvailable)
+ .map((product: any) => product.id)
+ );
+ }, [productsData]);
+
+ const placeOrderMutation = trpc.user.order.placeOrder.useMutation({
+ onSuccess: (data) => {
+ const orders = data.data; // Now an array of orders
+ const firstOrder = orders[0]; // Use first order for payment flow
+
+ if (!firstOrder.isCod) {
+ // createRazorpayOrderMutation.mutate({ orderId: firstOrder.id.toString() });
+ } else {
+ // Clear cart and navigate to success page
+ clearCartAndInvalidateQueries(isFlashDelivery ? 'flash' : 'regular');
+ const successPath = isFlashDelivery
+ ? '/(drawer)/(tabs)/flash-delivery/order-success'
+ : './order-success';
+ router.replace(`${successPath}?orderId=${firstOrder.id}&totalAmount=${finalTotalWithDelivery}`);
+ }
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Failed to place order');
+ },
+ onSettled: () => {
+ setIsLoadingDialogOpen(false);
+ },
+ });
+
+ // const createRazorpayOrderMutation = trpc.user.payment.createRazorpayOrder.useMutation({
+ // onSuccess: (paymentData) => {
+ // initiateRazorpayPayment(paymentData.razorpayOrderId, paymentData.key, finalTotal);
+ // },
+ // onError: (error: any) => {
+ // Alert.alert('Error', error.message || 'Failed to create payment order');
+ // },
+ // });
+
+ const verifyPaymentMutation = trpc.user.payment.verifyPayment.useMutation({
+ onSuccess: () => {
+ const orders = placeOrderMutation.data?.data || [];
+ const firstOrder = orders[0];
+ // Clear cart and navigate to success page
+ clearCartAndInvalidateQueries(isFlashDelivery ? 'flash' : 'regular');
+ const successPath = isFlashDelivery
+ ? '/(drawer)/(tabs)/flash-delivery/order-success'
+ : './order-success';
+ router.replace(`${successPath}?orderId=${firstOrder?.id}&totalAmount=${finalTotalWithDelivery}`);
+ },
+ onError: (error: any) => {
+ Alert.alert('Error', error.message || 'Payment verification failed');
+ },
+ });
+
+ const markPaymentFailedMutation = trpc.user.payment.markPaymentFailed.useMutation();
+
+
+ const handlePlaceOrder = () => {
+ if (!selectedAddress) {
+ Alert.alert('Error', 'Please select an address');
+ return;
+ }
+
+ const availableItems = cartItems
+ .filter(item => {
+ if (item.product?.isOutOfStock) return false;
+ // For flash delivery, check if product supports flash delivery
+ if (isFlashDelivery) {
+ return flashEligibleProductIds.has(item.productId);
+ }
+ // For regular delivery, only include items with assigned slots
+ return selectedSlots[item.id];
+ })
+ .map(item => item.id);
+
+ if (availableItems.length === 0) {
+ Alert.alert('Error', 'No valid items to order');
+ return;
+ }
+
+ setIsLoadingDialogOpen(true);
+
+
+ const orderData = {
+ selectedItems: availableItems.map(itemId => {
+ const item = cartItems.find(cartItem => cartItem.id === itemId);
+ return {
+ productId: item.productId,
+ quantity: item.quantity,
+ slotId: isFlashDelivery ? null : selectedSlots[itemId]
+ };
+ }),
+ addressId: selectedAddress,
+ paymentMethod: paymentMethod,
+ couponId: selectedCouponId || undefined,
+ userNotes: userNotes,
+ isFlashDelivery: isFlashDelivery,
+ };
+
+ console.log({orderData})
+
+ placeOrderMutation.mutate(orderData);
+ };
+
+ // const initiateRazorpayPayment = (razorpayOrderId: string, key: string, amount: number) => {
+ // const options = {
+ // key,
+ // amount: amount * 100,
+ // currency: 'INR',
+ // order_id: razorpayOrderId,
+ // name: 'Meat Farmer',
+ // description: 'Order Payment',
+ // prefill: {},
+ // };
+
+ // RazorpayCheckout.open(options)
+ // .then((data: any) => {
+ // verifyPaymentMutation.mutate({
+ // razorpay_payment_id: data.razorpay_payment_id,
+ // razorpay_order_id: data.razorpay_order_id,
+ // razorpay_signature: data.razorpay_signature,
+ // });
+ // })
+ // .catch((error: any) => {
+ // markPaymentFailedMutation.mutate({ merchantOrderId: razorpayOrderId });
+ // Alert.alert(
+ // 'Payment Failed',
+ // 'Payment failed or was cancelled. What would you like to do?',
+ // [
+ // {
+ // text: 'Retry Now',
+ // onPress: () => {
+ // const orders = placeOrderMutation.data?.data || [];
+ // const firstOrder = orders[0];
+ // const orderId = firstOrder?.id.toString();
+ // if (orderId) {
+ // createRazorpayOrderMutation.mutate({ orderId });
+ // }
+ // }
+ // },
+ // {
+ // text: 'Retry Later',
+ // onPress: () => router.push('/(drawer)/(tabs)/me/my-orders')
+ // }
+ // ]
+ // );
+ // });
+ // };
+
+ return (
+ <>
+ {/* Back Button */}
+ {onCancel && (
+
+
+
+ Back to Cart
+
+
+ )}
+
+ {/* Special Instructions */}
+
+ Delivery Instructions
+
+
+
+ {/* Payment Method */}
+
+ Payment Method
+
+
+
+ {/* No selection dot for disabled state */}
+
+
+
+
+
+ Pay Online (Coming Soon)
+ UPI, Cards, Netbanking
+
+
+
+ setPaymentMethod('cod')}
+ style={tw`flex-row items-center p-4 rounded-xl border ${paymentMethod === 'cod' ? 'border-brand500 bg-blue-50' : 'border-gray-200'}`}
+ >
+
+ {paymentMethod === 'cod' && }
+
+
+
+
+
+ Cash on Delivery
+ Pay when you receive
+
+
+
+
+
+
+ UPI accepted during COD
+
+
+
+ Cash payment
+
+
+
+
+ {/* Bill Details */}
+
+ Bill Details
+
+ {/* Item Total */}
+
+ Item Total
+ ₹{totalPrice}
+
+
+ {/* Discount */}
+ {discountAmount > 0 && (
+
+ Product Discount
+ -₹{discountAmount}
+
+ )}
+
+ {/* Delivery Fee */}
+
+
+ Delivery Fee
+
+
+
+ {deliveryCharge === 0 && (
+ isFlashDelivery
+ ? (constsData?.flashDeliveryCharge > 0 && (
+
+ ₹{constsData?.flashDeliveryCharge}
+
+ ))
+ : (constsData?.deliveryCharge > 0 && (
+
+ ₹{constsData?.deliveryCharge}
+
+ ))
+ )}
+
+ {deliveryCharge === 0 ? 'Free' : `₹${deliveryCharge}`}
+
+
+
+
+ {/* Free Delivery Nudge */}
+ {deliveryCharge > 0 && (() => {
+ const threshold = isFlashDelivery
+ ? constsData?.flashFreeDeliveryThreshold
+ : constsData?.freeDeliveryThreshold;
+ return threshold > 0 && finalTotal < threshold && (
+
+
+
+ Add products worth ₹{(threshold - finalTotal).toFixed(0)} for free delivery
+
+
+ );
+ })()}
+
+ {/* Divider */}
+
+
+ {/* Grand Total */}
+
+ To Pay
+ ₹{finalTotalWithDelivery}
+
+
+ {/* Savings Banner */}
+ {(discountAmount > 0 || deliveryCharge === 0) && (
+
+
+
+ You saved ₹{discountAmount + (deliveryCharge === 0 ? (
+ isFlashDelivery
+ ? constsData?.flashDeliveryCharge
+ : constsData?.deliveryCharge
+ ) : 0)} on this order
+
+
+ )}
+
+
+ {/* Bottom Action Bar */}
+
+
+
+ Place Order
+
+
+
+
+
+ >
+ );
+};
+
+export default PaymentAndOrderComponent;
\ No newline at end of file
diff --git a/apps/user-ui/components/ProductCard.tsx b/apps/user-ui/components/ProductCard.tsx
new file mode 100644
index 0000000..3315bbd
--- /dev/null
+++ b/apps/user-ui/components/ProductCard.tsx
@@ -0,0 +1,174 @@
+import React from 'react';
+import { View, Alert, TouchableOpacity, Text } from 'react-native';
+import { Image } from 'expo-image';
+import { tw, theme, MyText, MyTouchableOpacity, Quantifier, MiniQuantifier } from 'common-ui';
+import CartIcon from '@/components/icons/CartIcon';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import Ionicons from '@expo/vector-icons/Ionicons';
+import dayjs from 'dayjs';
+import {
+ useGetCart,
+ useUpdateCartItem,
+ useRemoveFromCart,
+ useAddToCart,
+} from '@/hooks/cart-query-hooks';
+import { useProductSlotIdentifier } from '@/hooks/useProductSlotIdentifier';
+
+
+interface ProductCardProps {
+ item: any;
+ itemWidth: number;
+ onPress?: () => void;
+ showDeliveryInfo?: boolean;
+ miniView?: boolean;
+}
+
+const formatQuantity = (quantity: number, unit: string): { value: string; display: string } => {
+ if (unit?.toLowerCase() === 'kg' && quantity < 1) {
+ return { value: `${Math.round(quantity * 1000)} g`, display: `${Math.round(quantity * 1000)}g` };
+ }
+ return { value: `${quantity} ${unit}(s)`, display: `${quantity}${unit}` };
+};
+
+const ProductCard: React.FC = ({
+ item,
+ itemWidth,
+ onPress,
+ showDeliveryInfo = true,
+ miniView = false,
+}) => {
+ const { data: cartData } = useGetCart();
+ const { getQuickestSlot } = useProductSlotIdentifier();
+ const updateCartItem = useUpdateCartItem({
+ showSuccessAlert: false,
+ showErrorAlert: false,
+ refetchCart: true,
+ });
+ const removeFromCart = useRemoveFromCart({
+ showSuccessAlert: false,
+ showErrorAlert: false,
+ refetchCart: true,
+ });
+ const { addToCart = () => {} } = useAddToCart({
+ showSuccessAlert: false,
+ showErrorAlert: false,
+ refetchCart: true,
+ }) || {};
+
+ // Find current quantity from cart data
+ const cartItem = cartData?.items?.find((cartItem: any) => cartItem.productId === item.id);
+ const quantity = cartItem?.quantity || 0;
+
+ // Precompute the next slot and determine display out of stock status
+ const slotId = getQuickestSlot(item.id);
+ const displayIsOutOfStock = item.isOutOfStock || !slotId;
+
+ const handleQuantityChange = (newQuantity: number) => {
+ if (newQuantity === 0 && cartItem) {
+ removeFromCart.mutate({ itemId: cartItem.id });
+ } else if (newQuantity === 1 && !cartItem) {
+ const slotId = getQuickestSlot(item.id);
+ if (!slotId) {
+ Alert.alert("Error", "No available delivery slot for this product");
+ return;
+ }
+ addToCart(item.id, 1, slotId, () => {});
+ } else if (cartItem) {
+ updateCartItem.mutate({ itemId: cartItem.id, quantity: newQuantity });
+ }
+ };
+
+ return (
+ {/* TODO: Navigate to product detail */})}
+ activeOpacity={0.9}
+ >
+
+
+ {displayIsOutOfStock && (
+
+
+ Out of Stock
+
+
+ )}
+ {miniView && (
+
+ {quantity > 0 ? (
+
+ ) : (
+ handleQuantityChange(1)}
+ activeOpacity={0.8}
+ >
+
+
+ )}
+
+ )}
+
+
+
+
+ {item.name}
+
+
+
+ ₹{item.price}
+ {item.marketPrice && Number(item.marketPrice) > Number(item.price) && (
+ ₹{item.marketPrice}
+ )}
+
+
+ Quantity: {formatQuantity(item.productQuantity || 1, item.unit).display}
+
+
+ {showDeliveryInfo && item.nextDeliveryDate && (
+
+
+
+ {dayjs(item.nextDeliveryDate).format("ddd, DD MMM • h:mm A")}
+
+
+ )}
+
+ {!miniView && (
+ <>
+ {displayIsOutOfStock ? (
+
+ Unavailable
+
+ ) : quantity > 0 ? (
+
+ ) : (
+ handleQuantityChange(1)}
+ >
+
+
+ Add to Cart
+
+
+ )}
+ >
+ )}
+
+
+ );
+};
+
+export default ProductCard;
\ No newline at end of file
diff --git a/apps/user-ui/components/ProductDetail.tsx b/apps/user-ui/components/ProductDetail.tsx
new file mode 100644
index 0000000..6b86149
--- /dev/null
+++ b/apps/user-ui/components/ProductDetail.tsx
@@ -0,0 +1,760 @@
+import React, { useState, useMemo } from 'react';
+import { View, ScrollView, Alert, Dimensions, FlatList, RefreshControl } from 'react-native';
+import { useRouter } from 'expo-router';
+import { ImageCarousel, tw, BottomDialog, useManualRefresh, useMarkDataFetchers, LoadingDialog, ImageUploader, MyText, MyTextInput, MyTouchableOpacity, Quantifier } from 'common-ui';
+import { LinearGradient } from 'expo-linear-gradient';
+import usePickImage from 'common-ui/src/components/use-pick-image';
+import { theme } from 'common-ui/src/theme';
+import dayjs from 'dayjs';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import FontAwesome5 from '@expo/vector-icons/FontAwesome5';
+import { trpc, trpcClient } from '@/src/trpc-client';
+import { useAddToCart, useGetCart, useUpdateCartItem, useRemoveFromCart } from '@/hooks/cart-query-hooks';
+import { useProductSlotIdentifier } from '@/hooks/useProductSlotIdentifier';
+import { useFlashNavigationStore } from '@/components/stores/flashNavigationStore';
+import FloatingCartBar from './floating-cart-bar';
+
+const { width: screenWidth } = Dimensions.get("window");
+const carouselWidth = screenWidth;
+const carouselHeight = carouselWidth * 0.8;
+
+const extractKeyFromUrl = (url: string): string => {
+ const u = new URL(url);
+ const rawKey = u.pathname.replace(/^\/+/, "");
+ return decodeURIComponent(rawKey);
+};
+
+interface ProductDetailProps {
+ productId: string;
+ isFlashDelivery?: boolean;
+}
+
+const ProductDetail: React.FC = ({ productId, isFlashDelivery = false }) => {
+ const router = useRouter();
+ const [showAllSlots, setShowAllSlots] = useState(false);
+ const [isLoadingDialogOpen, setIsLoadingDialogOpen] = useState(false);
+ const [reviews, setReviews] = useState([]);
+ const [reviewsLoading, setReviewsLoading] = useState(false);
+ const [hasMore, setHasMore] = useState(true);
+ const [reviewsOffset, setReviewsOffset] = useState(0);
+ const [refreshing, setRefreshing] = useState(false);
+ const { data: productDetail, isLoading, error, refetch } = trpc.user.product.getProductDetails.useQuery({ id: productId });
+ const cartType: "regular" | "flash" = isFlashDelivery ? "flash" : "regular";
+ const { addToCart = () => {} } = useAddToCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }, cartType) || {};
+ const { addToCart:addTOFlashCart = () => {} } = useAddToCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }, 'flash') || {};
+ const cartData = useGetCart({}, cartType);
+ const updateCartItem = useUpdateCartItem({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }, cartType);
+ const removeFromCart = useRemoveFromCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }, cartType);
+ const { getQuickestSlot } = useProductSlotIdentifier();
+ const { setShouldNavigateToCart } = useFlashNavigationStore();
+
+ // Find current quantity from cart data
+ const cartItem = productDetail ? cartData?.data?.items?.find((item: any) => item.productId === productDetail.id) : null;
+ const quantity = cartItem?.quantity || 0;
+
+ const handleQuantityChange = (newQuantity: number) => {
+ if (!productDetail) return;
+
+ if (newQuantity === 0 && cartItem) {
+ removeFromCart.mutate({ itemId: cartItem.id });
+ } else if (newQuantity === 1 && !cartItem) {
+ handleAddToCart(productDetail.id);
+ } else if (cartItem) {
+ updateCartItem.mutate({ itemId: cartItem.id, quantity: newQuantity });
+ }
+ };
+
+
+ useManualRefresh(() => {
+ refetch();
+ });
+
+ useMarkDataFetchers(() => {
+ refetch();
+ });
+
+ const handleAddToCart = (productId: number) => {
+ if (isFlashDelivery) {
+ if (!productDetail?.isFlashAvailable) {
+ Alert.alert("Error", "This product is not available for flash delivery");
+ return;
+ }
+ setIsLoadingDialogOpen(true);
+ addToCart(productId, 1, 0, () => setIsLoadingDialogOpen(false));
+ } else {
+ const slotId = getQuickestSlot(productId);
+ if (!slotId) {
+ Alert.alert("Error", "No available delivery slot for this product");
+ return;
+ }
+ setIsLoadingDialogOpen(true);
+ addToCart(productId, 1, slotId, () => setIsLoadingDialogOpen(false));
+ }
+ };
+
+ const handleBuyNow = (productId: number) => {
+ if (isFlashDelivery) {
+ if (!productDetail?.isFlashAvailable) {
+ Alert.alert("Error", "This product is not available for flash delivery");
+ return;
+ }
+ setIsLoadingDialogOpen(true);
+ addToCart(productId, 1, 0, () => setIsLoadingDialogOpen(false));
+ router.push(`/(drawer)/(tabs)/flash-delivery/(cart)/cart?select=${productId}`);
+ } else {
+ addTOFlashCart(productId, 1, 0);
+ setShouldNavigateToCart(true);
+ router.push('/(drawer)/(tabs)/flash-delivery');
+ }
+ };
+
+ const handleSlotAddToCart = (productId: number, selectedSlotId: number) => {
+ const cartItem = cartData.data?.items?.find((item: any) => item.productId === productId);
+ setIsLoadingDialogOpen(true);
+ if (cartItem) {
+ removeFromCart.mutate(
+ { itemId: cartItem.id },
+ {
+ onSuccess: () => {
+ addToCart(productId, cartItem.quantity + 1, selectedSlotId, () => setIsLoadingDialogOpen(false));
+ },
+ onError: () => setIsLoadingDialogOpen(false),
+ }
+ );
+ } else {
+ addToCart(productId, 1, selectedSlotId, () => setIsLoadingDialogOpen(false));
+ }
+ };
+
+ const discountPercentage = productDetail?.marketPrice
+ ? Math.round(((Number(productDetail.marketPrice) - Number(productDetail.price)) / Number(productDetail.marketPrice)) * 100)
+ : 0;
+
+ const loadReviews = async (reset = false) => {
+ if (reviewsLoading || (!hasMore && !reset)) return;
+ setReviewsLoading(true);
+ try {
+ const { reviews: newReviews, hasMore: newHasMore } = await trpcClient.user.product.getProductReviews.query({
+ productId: Number(productId),
+ limit: 10,
+ offset: reset ? 0 : reviewsOffset,
+ });
+ setReviews(reset ? newReviews : [...reviews, ...newReviews]);
+ setHasMore(newHasMore);
+ setReviewsOffset(reset ? 10 : reviewsOffset + 10);
+ } catch (error) {
+ console.error('Error loading reviews:', error);
+ } finally {
+ setReviewsLoading(false);
+ }
+ };
+
+ const onRefresh = async () => {
+ setRefreshing(true);
+ await refetch(); // Refetch product details
+ await loadReviews(true); // Reset and reload reviews
+ setRefreshing(false);
+ };
+
+ const handleReviewSubmitted = () => {
+ loadReviews(true);
+ };
+
+ React.useEffect(() => {
+ if (productDetail?.id) {
+ loadReviews(true);
+ }
+ }, [productDetail?.id]);
+
+ if (isLoading) {
+ return (
+
+ Loading product details...
+
+ );
+ }
+
+ if (error || !productDetail) {
+ return (
+
+
+ Oops!
+ Product not found or error loading
+
+ );
+ }
+
+
+ return (
+
+ {/* */}
+
+
+ }
+ >
+ {/* Image Carousel */}
+
+
+
+
+ {/* Product Info */}
+
+
+
+ {productDetail.name}
+
+ {productDetail.isFlashAvailable && (
+
+
+ Flash Delivery
+
+ )}
+ {productDetail.isOutOfStock && (
+
+ Out of Stock
+
+ )}
+
+
+
+ {productDetail.shortDescription}
+
+
+ {/* Main price display - always show regular price prominently */}
+
+
+ ₹{productDetail.price}
+
+ / {productDetail.unit}
+
+ {/* Show market price discount if available */}
+ {productDetail.marketPrice && (
+
+ ₹{productDetail.marketPrice}
+
+ {discountPercentage}% OFF
+
+
+ )}
+
+
+ {/* Flash price on separate line - smaller and less prominent */}
+ {productDetail.isFlashAvailable && productDetail.flashPrice && productDetail.flashPrice !== productDetail.price && (
+
+
+ Flash Delivery: ₹{productDetail.flashPrice} / {productDetail.unit}
+
+
+ )}
+
+
+
+
+ {/* Action Buttons */}
+
+ {quantity > 0 ? (
+ // Show quantifier when item is in cart
+
+
+
+ ) : (
+ // Show "Add to Cart" button when not in cart
+ !(productDetail.isOutOfStock || (isFlashDelivery && !productDetail.isFlashAvailable)) && handleAddToCart(productDetail.id)}
+ disabled={productDetail.isOutOfStock || (isFlashDelivery && !productDetail.isFlashAvailable)}
+ >
+
+ {(productDetail.isOutOfStock || (isFlashDelivery && !productDetail.isFlashAvailable)) ? 'Unavailable' : 'Add to Cart'}
+
+
+ )}
+
+ {isFlashDelivery ? (
+ !(productDetail.isOutOfStock || !productDetail.isFlashAvailable) && handleBuyNow(productDetail.id)}
+ disabled={productDetail.isOutOfStock || !productDetail.isFlashAvailable}
+ >
+
+ {productDetail.isOutOfStock ? 'Out of Stock' :
+ (!productDetail.isFlashAvailable ? 'Not Flash Eligible' : 'Buy Now')}
+
+
+ ) : productDetail.isFlashAvailable ? (
+ productDetail.deliverySlots.length > 0 && handleBuyNow(productDetail.id)}
+ disabled={productDetail.deliverySlots.length === 0}
+ >
+
+ {productDetail.deliverySlots.length === 0 ? 'No Slots' : 'Buy Now'}
+
+
+ ) : (
+
+ )}
+
+
+
+
+ {/* Delivery Slots */}
+
+
+
+
+
+
+ Available Slots
+
+
+ {productDetail.deliverySlots.length === 0 ? (
+ No delivery slots available currently
+ ) : (
+ <>
+ {productDetail.deliverySlots.slice(0, 2).map((slot, index) => (
+ handleSlotAddToCart(productDetail.id, slot.id)}
+ disabled={productDetail.isOutOfStock}
+ activeOpacity={0.7}
+ >
+
+
+
+ {dayjs(slot.deliveryTime).format('ddd, DD MMM • h:mm A')}
+
+
+ Orders Close: {dayjs(slot.freezeTime).format('h:mm A')}
+
+
+
+
+ ))}
+ {productDetail.deliverySlots.length > 2 && (
+ setShowAllSlots(true)}
+ style={tw`items-center py-2`}
+ >
+ View All {productDetail.deliverySlots.length} Slots
+
+ )}
+ >
+ )}
+
+
+
+
+
+ {/* Description */}
+
+
+ About the Product
+ {!productDetail.longDescription ? (
+
+ No detailed description available.
+
+ ) : (
+ {productDetail.longDescription}
+ )}
+
+ {productDetail.store && (
+
+
+
+
+
+ Sourced From
+ {productDetail.store.name}
+
+
+ )}
+
+
+
+ {/* Package Deals */}
+ {productDetail.specialPackageDeals && productDetail.specialPackageDeals.length > 0 && (
+
+
+
+
+
+
+ Bulk Savings
+
+
+ {productDetail.specialPackageDeals.map((deal, index) => (
+
+ Buy {deal.quantity} {productDetail.unit}
+ ₹{deal.price}
+
+ ))}
+
+
+ )}
+
+ {/* Reviews Section */}
+
+
+ {/* Review Form - Moved above or keep below? Usually users want to read reviews first, but if few reviews, writing is good. The original had form then reviews. I will keep format but make it nicer. */}
+
+
+
+
+
+
+
+ Customer Reviews
+ What others are saying
+
+
+
+
+
+ item.id.toString()}
+ renderItem={({ item }) => (
+
+
+ {/* User Avatar Placeholder */}
+
+
+ {item.userName ? item.userName.charAt(0).toUpperCase() : 'U'}
+
+
+
+
+
+ {item.userName}
+ {dayjs(item.reviewTime).format('MMM DD, YYYY')}
+
+
+ {[1, 2, 3, 4, 5].map((star) => (
+
+ ))}
+
+
+
+
+ {item.reviewBody}
+
+ {item.signedImageUrls && item.signedImageUrls.length > 0 && (
+
+
+ {/* Using ImageCarousel for simplicity if it handles list, but it seems to be a slideshow.
+ Original code used ImageCarousel. Let's make it more "gallery" like if possible or stick to carousel if it's robust.
+ Actually, a row of thumbnails is better for reviews.
+ But to avoid breaking changes if ImageCarousel is needed for signed URLs logic (headers etc), I will trust ImageCarousel or just map standard Images if standard urls.
+ The original code used ImageCarousel. I'll stick to it to ensure images load correctly.
+ */}
+
+
+
+
+
+ )}
+
+ {item.adminResponse && (
+
+
+
+
+
+ Seller Response
+
+ {item.adminResponse}
+ {item.signedAdminImageUrls && item.signedAdminImageUrls.length > 0 && (
+
+
+
+ )}
+
+ )}
+
+ )}
+ onEndReached={() => loadReviews()}
+ onEndReachedThreshold={0.5}
+ ListEmptyComponent={
+
+
+
+
+ No reviews yet.
+ Be the first to share your thoughts!
+
+ }
+ ListFooterComponent={reviewsLoading ? Loading more reviews... : null}
+ scrollEnabled={false}
+ />
+
+
+
+
+
+ {/* All Slots Dialog */}
+ setShowAllSlots(false)}>
+
+
+
+
+
+ All Delivery Slots
+
+
+
+ {productDetail.deliverySlots.map((slot, index) => (
+ handleSlotAddToCart(productDetail.id, slot.id)}
+ disabled={productDetail.isOutOfStock}
+ activeOpacity={0.7}
+ >
+
+
+
+ {dayjs(slot.deliveryTime).format('ddd, DD MMM • h:mm A')}
+
+
+ Orders Close: {dayjs(slot.freezeTime).format('h:mm A')}
+
+
+
+
+ ))}
+
+
+ setShowAllSlots(false)}
+ >
+ Close
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+interface ReviewFormProps {
+ productId: number;
+ onReviewSubmitted?: () => void;
+}
+
+const ReviewForm = ({ productId, onReviewSubmitted }: ReviewFormProps) => {
+ const [reviewBody, setReviewBody] = useState('');
+ const [ratings, setRatings] = useState(0);
+ const [selectedImages, setSelectedImages] = useState<{ blob: Blob; mimeType: string }[]>([]);
+ const [displayImages, setDisplayImages] = useState<{ uri?: string }[]>([]);
+
+
+ const createReview = trpc.user.product.createReview.useMutation();
+ const generateUploadUrls = trpc.user.fileUpload.generateUploadUrls.useMutation();
+
+ const handleImagePick = usePickImage({
+ setFile: async (assets: any) => {
+ if (!assets || (Array.isArray(assets) && assets.length === 0)) {
+ setSelectedImages([]);
+ setDisplayImages([]);
+ return;
+ }
+
+ const files = Array.isArray(assets) ? assets : [assets];
+ const blobPromises = files.map(async (asset) => {
+ const response = await fetch(asset.uri);
+ const blob = await response.blob();
+ return { blob, mimeType: asset.mimeType || 'image/jpeg' };
+ });
+
+ const blobArray = await Promise.all(blobPromises);
+ setSelectedImages(blobArray);
+ setDisplayImages(files.map(asset => ({ uri: asset.uri })));
+ },
+ multiple: true,
+ });
+
+ const handleRemoveImage = (uri: string) => {
+ const index = displayImages.findIndex(img => img.uri === uri);
+ if (index !== -1) {
+ const newDisplay = displayImages.filter((_, i) => i !== index);
+ const newFiles = selectedImages.filter((_, i) => i !== index);
+
+ setDisplayImages(newDisplay);
+ setSelectedImages(newFiles);
+
+ }
+ };
+
+ const handleSubmit = async () => {
+ if (!reviewBody.trim() || ratings === 0) {
+ Alert.alert('Error', 'Please provide a review and rating.');
+ return;
+ }
+
+ try {
+ // Generate upload URLs
+ const mimeTypes = selectedImages.map(s => s.mimeType);
+ const { uploadUrls: generatedUrls } = await generateUploadUrls.mutateAsync({
+ contextString: 'review',
+ mimeTypes,
+ });
+ const keys = generatedUrls.map(extractKeyFromUrl);
+
+ // Upload images
+ for (let i = 0; i < generatedUrls.length; i++) {
+ const uploadUrl = generatedUrls[i];
+ const key = keys[i];
+ const { blob, mimeType } = selectedImages[i];
+
+
+ const uploadResponse = await fetch(uploadUrl, {
+ method: 'PUT',
+ body: blob,
+ headers: {
+ 'Content-Type': mimeType,
+ },
+ });
+
+ if (!uploadResponse.ok) {
+ throw new Error(`Upload failed with status ${uploadResponse.status}`);
+ }
+ }
+
+ // Submit review with image URLs
+ await createReview.mutateAsync({
+ productId,
+ reviewBody,
+ ratings,
+ imageUrls: keys,
+ uploadUrls: generatedUrls,
+ });
+
+ Alert.alert('Success', 'Review submitted!');
+ onReviewSubmitted?.();
+ // Reset form
+ setReviewBody('');
+ setRatings(0);
+ setSelectedImages([]);
+ setDisplayImages([]);
+ } catch (error:any) {
+
+ Alert.alert('Error', error.message || 'Failed to submit review.');
+ }
+ };
+
+ return (
+
+ Rate this Product
+ Share your experience with others
+
+ {/* Rating */}
+
+
+ {[1, 2, 3, 4, 5].map((star) => (
+ setRatings(star)} activeOpacity={0.7}>
+
+
+ ))}
+
+
+ {ratings === 0 ? 'Tap to Rate' : ratings === 1 ? 'Poor' : ratings === 2 ? 'Fair' : ratings === 3 ? 'Good' : ratings === 4 ? 'Very Good' : 'Excellent'}
+
+
+
+ {/* Review Text */}
+
+
+
+
+ {/* Images */}
+
+
+
+
+ {/* Submit */}
+
+
+
+ {createReview.isPending ? 'Submitting...' : 'Submit Review'}
+
+
+
+
+ );
+};
+
+export default ProductDetail;
\ No newline at end of file
diff --git a/apps/user-ui/components/ProfileChecker.tsx b/apps/user-ui/components/ProfileChecker.tsx
new file mode 100644
index 0000000..c4ca3d7
--- /dev/null
+++ b/apps/user-ui/components/ProfileChecker.tsx
@@ -0,0 +1,49 @@
+import React from 'react';
+import { View } from 'react-native';
+import { BottomDialog, MyText, MyButton, useIsDevMode } from 'common-ui';
+import { trpc } from '../src/trpc-client';
+import { useRouter } from 'expo-router';
+
+const ProfileChecker: React.FC = () => {
+ const router = useRouter();
+ const isDevMode = useIsDevMode();
+ const { data, isLoading } = trpc.user.user.checkProfileComplete.useQuery();
+ const [dialogOpen, setDialogOpen] = React.useState(false);
+
+ React.useEffect(() => {
+ if (!isLoading && data && !data.isComplete) {
+ setDialogOpen(true);
+ }
+ }, [data, isLoading]);
+
+ if (isLoading || isDevMode) return null;
+
+ return (
+ setDialogOpen(false)}>
+
+
+ Complete Your Profile
+
+
+ Please complete your profile for a better experience.
+
+
+ setDialogOpen(false)}
+ fillColor="gray1"
+ textColor="black1"
+ />
+ { setDialogOpen(false); router.push('/(drawer)/(tabs)/me/edit-profile'); }}
+ fillColor="brand500"
+ textColor="white1"
+ />
+
+
+
+ );
+};
+
+export default ProfileChecker;
\ No newline at end of file
diff --git a/apps/user-ui/components/QuickDeliveryAddressSelector.tsx b/apps/user-ui/components/QuickDeliveryAddressSelector.tsx
new file mode 100644
index 0000000..76e98dc
--- /dev/null
+++ b/apps/user-ui/components/QuickDeliveryAddressSelector.tsx
@@ -0,0 +1,277 @@
+import React, { useState } from 'react';
+import { View, ScrollView, Dimensions } from 'react-native';
+import { useRouter } from 'expo-router';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { BottomDialog, MyTouchableOpacity, MyText, tw, theme } from 'common-ui';
+import { useAuth } from '@/src/contexts/AuthContext';
+import { trpc } from '@/src/trpc-client';
+import { useAddressStore } from '@/src/store/addressStore';
+import dayjs from 'dayjs';
+
+interface QuickDeliveryAddressSelectorProps {
+ deliveryTime?: string;
+ slotId?: number;
+ onSlotChange?: (slotId: number) => void;
+ isForFlashDelivery?: boolean;
+}
+
+const QuickDeliveryAddressSelector: React.FC = ({
+ deliveryTime,
+ slotId,
+ onSlotChange,
+ isForFlashDelivery = false
+}) => {
+ const router = useRouter();
+ const [dialogOpen, setDialogOpen] = useState(false);
+
+ const { isAuthenticated } = useAuth();
+ const { selectedAddressId, setSelectedAddressId } = useAddressStore();
+
+ const { data: defaultAddressData } = trpc.user.address.getDefaultAddress.useQuery();
+ const { data: addressesData } = trpc.user.address.getUserAddresses.useQuery(undefined, {
+ enabled: isAuthenticated,
+ });
+ const { data: slotsData } = trpc.user.slots.getSlotsWithProducts.useQuery();
+
+ const defaultAddress = defaultAddressData?.data;
+ const addresses = addressesData?.data || [];
+
+ // Find earliest slot for pre-selection
+ const earliestSlot = slotsData?.slots?.sort((a, b) =>
+ dayjs(a.deliveryTime).diff(dayjs(b.deliveryTime))
+ )[0];
+
+ // Transform addresses for display
+ const addressOptions = addresses.map(address => ({
+ id: address.id,
+ name: address.name,
+ address: `${address.addressLine1}${address.addressLine2 ? `, ${address.addressLine2}` : ''}, ${address.city}, ${address.state} - ${address.pincode}`,
+ phone: address.phone,
+ }));
+
+ // Transform slots for display
+ const slotOptions = slotsData?.slots?.map(slot => ({
+ id: slot.id,
+ deliveryTime: dayjs(slot.deliveryTime).format('MMM DD, h:mm A'),
+ closeTime: dayjs(slot.freezeTime).format('h:mm A'),
+ })) || [];
+
+ // Get current selected slot display
+ const getCurrentSlotDisplay = () => {
+ if (isForFlashDelivery) return '30 minutes';
+ if (slotId) {
+ const slot = slotsData?.slots?.find(s => s.id === slotId);
+ return slot ? dayjs(slot.deliveryTime).format('MMM DD, h:mm A') : 'Select time';
+ }
+ if (earliestSlot) {
+ return dayjs(earliestSlot.deliveryTime).format('MMM DD, h:mm A');
+ }
+ return 'Select time';
+ };
+
+ // Get current selected address display
+ const getCurrentAddressDisplay = () => {
+ if (selectedAddressId) {
+ const address = addresses.find(a => a.id === selectedAddressId);
+ if (address) return `${address.name} - ${address.addressLine1}`;
+ }
+ if (defaultAddress) {
+ return `${defaultAddress.name} - ${defaultAddress.addressLine1}`;
+ }
+ return 'Select address';
+ };
+
+
+
+ return (
+ <>
+
+ {isForFlashDelivery && (
+
+ router.back()}
+ style={tw`p-2 -ml-2`}
+ activeOpacity={0.7}
+ >
+
+
+
+ Delivery in 30 minutes
+
+
+ )}
+
+ {!isForFlashDelivery && (
+
+
+ router.back()}
+ style={tw`p-2 -ml-2`}
+ activeOpacity={0.7}
+ >
+
+
+
+ Delivery At {getCurrentSlotDisplay()}
+
+
+ {/* Trigger Component with Separate Chevrons */}
+
+
+ /* Regular Delivery Time Section */
+ setDialogOpen(true)}
+ style={tw`flex-row items-center justify-between mb-2`}
+ activeOpacity={0.7}
+ >
+
+ {/*
+ Delivery Time
+ */}
+
+ Delivery at: {getCurrentSlotDisplay()}
+
+
+
+
+
+
+ {/* Address Section */}
+ setDialogOpen(true)}
+ style={tw`flex-row items-center justify-between`}
+ activeOpacity={0.7}
+ >
+
+ {/*
+ Delivery Address
+ */}
+
+ TO: {getCurrentAddressDisplay()}
+
+
+
+
+
+
+ {/* Consolidated Dialog - 80% height */}
+ setDialogOpen(false)}
+ >
+
+
+ Select Delivery Options
+
+
+
+ {/* Section 1: Delivery Time Selection */}
+
+
+ Select Delivery Time
+
+
+
+ {isForFlashDelivery ? (
+
+
+
+
+ Flash Delivery - 30 minutes
+
+
+
+ Selected automatically for flash delivery
+
+
+ ) : (
+ slotOptions.map(slot => (
+ {
+ onSlotChange?.(slot.id);
+ setDialogOpen(false);
+ }}
+ activeOpacity={0.7}
+ >
+
+ Delivery: {slot.deliveryTime}
+
+
+ Orders Close at: {slot.closeTime}
+
+
+ ))
+ )}
+
+
+
+ {/* Divider */}
+
+
+ {/* Section 2: Address Selection */}
+
+
+ Select Delivery Address
+
+
+
+ {!isAuthenticated ? (
+
+
+
+
+ Authentication Required
+
+
+
+ Please log in to select and manage delivery addresses.
+
+
+ ) : addressOptions.length === 0 ? (
+
+
+ No delivery addresses available. Please add an address first.
+
+
+ ) : (
+ addressOptions.map(address => (
+ {
+ setSelectedAddressId(address.id);
+ setDialogOpen(false);
+ }}
+ activeOpacity={0.7}
+ >
+
+ {address.name}
+
+
+ {address.address}
+
+
+ Phone: {address.phone}
+
+
+ ))
+ )}
+
+
+
+
+
+
+ )}
+
+ >
+ );
+};
+
+export default QuickDeliveryAddressSelector;
\ No newline at end of file
diff --git a/apps/user-ui/components/SlotSpecificView.tsx b/apps/user-ui/components/SlotSpecificView.tsx
new file mode 100644
index 0000000..2bc2c15
--- /dev/null
+++ b/apps/user-ui/components/SlotSpecificView.tsx
@@ -0,0 +1,510 @@
+import React, { useState } from 'react';
+import { Drawer } from 'expo-router/drawer';
+import { DrawerContentComponentProps } from '@react-navigation/drawer';
+import { View, ScrollView, Alert, Dimensions } from 'react-native';
+import { Image } from 'expo-image';
+import { useRouter, usePathname } from 'expo-router';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { tw, theme, MyText, MyTouchableOpacity, MyFlatList, AppContainer, MiniQuantifier } from 'common-ui';
+import { trpc } from '@/src/trpc-client';
+import { useQuickDeliveryStore } from '@/src/store/quickDeliveryStore';
+import { useAddToCart, useGetCart, useUpdateCartItem, useRemoveFromCart } from '@/hooks/cart-query-hooks';
+import { useHideTabNav } from '@/src/hooks/useHideTabNav';
+import CartIcon from '@/components/icons/CartIcon';
+import { useSlotStore } from '@/components/stores/slotStore';
+
+import { LinearGradient } from 'expo-linear-gradient';
+import FloatingCartBar from '@/components/floating-cart-bar';
+import QuickDeliveryAddressSelector from '@/components/QuickDeliveryAddressSelector';
+import dayjs from 'dayjs';
+
+const { width: screenWidth } = Dimensions.get("window");
+const drawerWidth = 85; // From layout drawerStyle
+const itemWidth = (screenWidth - drawerWidth - 48) / 2; // Account for drawer width
+
+interface SlotLayoutProps {
+ slotId?: number;
+ storeId?: number;
+ baseUrl: string;
+ isForFlashDelivery?: boolean;
+}
+
+function CustomDrawerContent(baseUrl: string, drawerProps: DrawerContentComponentProps, slotIdParent?: number, storeIdParent?: number) {
+ const router = useRouter();
+ const pathname = usePathname();
+ const { data: storesData } = trpc.user.stores.getStores.useQuery();
+ const setStoreId = useSlotStore(state => state.setStoreId);
+
+ const { slotId, storeId } = useSlotStore();
+
+ // Get current pathname to determine active item
+ const currentPath = pathname;
+ // Check if we are on the main 'quick-delivery' page (All products)
+ // const isAllActive = !currentPath.includes('/store/');
+ const isAllActive = isNaN(storeId as number);
+
+
+ const allSlotsUrl = `${baseUrl}${slotId ? `?slotId=${slotId}` : ''}`;
+
+ return (
+
+
+
+ {/* All Products Item */}
+ {
+ router.replace(allSlotsUrl as any);
+ }}
+ activeOpacity={0.8}
+ >
+ {isAllActive ? (
+
+
+
+
+
+ ALL
+
+
+ ) : (
+
+
+
+
+
+ ALL
+
+
+ )}
+
+
+
+
+ {/* Store Items */}
+ {storesData?.stores?.map(store => {
+ // Check if this specific store is active
+
+ const isStoreActive = storeId === store.id;
+ // const isStoreActive = currentPath.includes(`/store/${store.id}`);
+
+ return (
+ {
+ setStoreId(store.id);
+ const targetUrl = `${baseUrl}${slotId ? `?slotId=${slotId}&storeId=${store.id}` : `?storeId=${store.id}`}`;
+
+ router.replace(targetUrl as any);
+ }}
+ activeOpacity={0.8}
+ >
+ {isStoreActive ? (
+
+
+ {store.signedImageUrl ? (
+
+ ) : (
+
+ )}
+
+
+ {store.name.replace(/^The\s+/i, '')}
+
+
+ {/* Active Pip/Indicator */}
+
+
+ ) : (
+
+
+ {store.signedImageUrl ? (
+
+ ) : (
+
+ )}
+
+
+ {store.name.replace(/^The\s+/i, '')}
+
+
+ )}
+
+ );
+ }) || (
+ Loading...
+ )}
+
+
+
+ );
+}
+
+export function SlotLayout({ slotId, storeId, baseUrl, isForFlashDelivery }: SlotLayoutProps) {
+ const router = useRouter();
+
+ // const { slotId: paramsSlotId } = useLocalSearchParams();
+ const isDrawerHidden = useQuickDeliveryStore(state => state.isDrawerHidden);
+ const setSelectedSlotId = useQuickDeliveryStore(state => state.setSelectedSlotId);
+ const setSlotId = useSlotStore(state => state.setSlotId);
+
+ const handleSlotChange = (newSlotId: number) => {
+ setSelectedSlotId(newSlotId);
+ setSlotId(newSlotId);
+ router.replace(`${baseUrl}?slotId=${newSlotId}` as any);
+ };
+
+ const slotQuery = slotId
+ ? trpc.user.slots.getSlotById.useQuery({ slotId: Number(slotId) })
+ : trpc.user.slots.nextMajorDelivery.useQuery();
+ const deliveryTime = dayjs(slotQuery.data?.deliveryTime).format('DD MMM hh:mm A');
+
+
+ return (
+ <>
+
+
+
+ CustomDrawerContent(baseUrl, props, slotId, storeId)}
+ screenOptions={{
+ headerShown: false,
+ drawerType: 'permanent',
+ drawerStyle: {
+ width: 85,
+ ...(isDrawerHidden && { display: 'none' }),
+ },
+ headerStyle: {
+ // width: 220,
+ backgroundColor: 'white',
+ },
+ headerShadowVisible: false,
+ }}
+ >
+
+
+ {/* */}
+
+
+ {/* */}
+
+ >
+ );
+}
+
+const formatQuantity = (quantity: number, unit: string): { value: string; display: string } => {
+ if (unit?.toLowerCase() === 'kg' && quantity < 1) {
+ return { value: `${Math.round(quantity * 1000)} g`, display: `${Math.round(quantity * 1000)}g` };
+ }
+ return { value: `${quantity} ${unit}(s)`, display: `${quantity}${unit}` };
+};
+
+const CompactProductCard = ({
+ item,
+ handleAddToCart,
+ onPress,
+ cartType = "regular",
+}: {
+ item: any;
+ handleAddToCart: (productId: number) => void;
+ onPress?: () => void;
+ cartType?: "regular" | "flash";
+}) => {
+
+ // Cart management for miniView
+ const { data: cartData } = useGetCart({}, cartType);
+ const updateCartItem = useUpdateCartItem({
+ showSuccessAlert: false,
+ showErrorAlert: false,
+ refetchCart: true,
+ }, cartType);
+ const removeFromCart = useRemoveFromCart({
+ showSuccessAlert: false,
+ showErrorAlert: false,
+ refetchCart: true,
+ }, cartType);
+
+ const cartItem = cartData?.items?.find((cartItem: any) => cartItem.productId === item.id);
+ const quantity = cartItem?.quantity || 0;
+
+ const handleQuantityChange = (newQuantity: number) => {
+ if (newQuantity === 0 && cartItem) {
+ removeFromCart.mutate({ itemId: cartItem.id });
+ } else if (newQuantity === 1 && !cartItem) {
+ handleAddToCart(item.id);
+ } else if (cartItem) {
+ updateCartItem.mutate({ itemId: cartItem.id, quantity: newQuantity });
+ }
+ };
+
+ return (
+
+
+
+ {item.isOutOfStock && (
+
+ Out of Stock
+
+ )}
+
+ {quantity > 0 ? (
+
+ ) : (
+ handleQuantityChange(1)}
+ activeOpacity={0.8}
+ >
+
+
+ )}
+
+
+
+
+
+ {item.name}
+
+
+
+
+ ₹{cartType === "flash" ? (item.flashPrice ?? item.price) : item.price}
+ {item.marketPrice && Number(item.marketPrice) > Number(item.price) && (
+ ₹{item.marketPrice}
+ )}
+ Quantity: {formatQuantity(item.productQuantity || 1, item.unit).display}
+
+
+
+
+
+ );
+};
+
+interface SlotProductsProps {
+ slotId?: number;
+ storeId?: number;
+ baseUrl: string;
+}
+
+export function SlotProducts({ slotId:slotIdParent, storeId:storeIdParent, baseUrl, }: SlotProductsProps) {
+ useHideTabNav('quick_delivery');
+ const [isLoadingDialogOpen, setIsLoadingDialogOpen] = React.useState(false);
+ const router = useRouter();
+ const slotId = slotIdParent;
+ const storeId = storeIdParent;
+ const storeIdNum = storeId;
+ // const { storeId, slotId: slotIdRaw } = useLocalSearchParams();
+ // const slotId = Number(slotIdRaw);
+
+
+ // const storeIdNum = storeId ? Number(storeId) : undefined;
+
+ const slotQuery = trpc.user.slots.getSlotById.useQuery({ slotId: slotId! }, { enabled: !!slotId });
+
+ const productsQuery = trpc.user.product.getAllProductsSummary.useQuery();
+
+ const { addToCart = () => { } } = useAddToCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }, "flash") || {};
+
+ const handleAddToCart = (productId: number) => {
+ setIsLoadingDialogOpen(true);
+ addToCart(productId, 1, slotId || 0, () => setIsLoadingDialogOpen(false));
+ };
+
+ if (slotQuery.isLoading || (storeIdNum && productsQuery?.isLoading)) {
+ return (
+
+
+ Loading slot delivery...
+
+
+ );
+ }
+
+ if (slotQuery.error || (storeIdNum && productsQuery?.error)) {
+ return (
+
+
+
+ Oops!
+ Failed to load slot delivery
+
+
+ );
+ }
+
+ if (!slotQuery.data) {
+ return (
+
+
+ Quick Delivery
+ No delivery slot available.
+
+
+ );
+ }
+
+ const filteredProducts: any[] = storeIdNum ? productsQuery?.data?.filter(p => p.storeId === storeIdNum) || [] : slotQuery.data.products;
+
+ return (
+
+ (
+ router.push(`/(drawer)/(tabs)/home/product-detail/${item.id}`)}
+ cartType="regular"
+ />
+ )}
+ keyExtractor={(item, index) => index.toString()}
+ columnWrapperStyle={{ gap: 16, justifyContent: 'flex-start' }}
+ contentContainerStyle={[tw`pb-24 px-4`, { gap: 16 }]}
+ onRefresh={() => slotQuery.refetch()}
+ ListEmptyComponent={
+ storeIdNum ? (
+
+ No products from this store in this slot.
+
+ ) : null
+ }
+ />
+
+ );
+}
+
+interface FlashDeliveryProductsProps {
+ storeId?: number;
+ baseUrl: string;
+ onProductPress?: (productId: number) => void;
+}
+
+export function FlashDeliveryProducts({ storeId:storeIdParent, baseUrl, onProductPress }: FlashDeliveryProductsProps) {
+ useHideTabNav('quick_delivery');
+ const [isLoadingDialogOpen, setIsLoadingDialogOpen] = React.useState(false);
+ const router = useRouter();
+ const storeId = storeIdParent;
+ const storeIdNum = storeId;
+
+ const productsQuery = trpc.user.product.getAllProductsSummary.useQuery();
+
+ const { addToCart = () => { } } = useAddToCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }, "flash") || {};
+
+ const handleAddToCart = (productId: number) => {
+ setIsLoadingDialogOpen(true);
+
+ addToCart(productId, 1, 0, () => setIsLoadingDialogOpen(false));
+ };
+
+ if (storeIdNum && productsQuery?.isLoading) {
+ return (
+
+
+ Loading Flash Delivery...
+
+
+ );
+ }
+
+ if (storeIdNum && productsQuery?.error) {
+ return (
+
+
+
+ Oops!
+ Failed to load Flash Delivery
+
+
+ );
+ }
+
+ // Filter products to only include those eligible for flash delivery
+ let flashProducts: any[] = [];
+ if (storeIdNum) {
+ // Filter by store and flash availability
+ flashProducts = productsQuery?.data?.filter(p => p.storeId === storeIdNum && p.isFlashAvailable) || [];
+ } else {
+ // Show all flash-available products (no slot filtering)
+ flashProducts = productsQuery?.data?.filter(p => p.isFlashAvailable) || [];
+ }
+
+ return (
+
+ (
+ {
+ if (onProductPress) {
+ onProductPress(item.id);
+ } else {
+ router.push(`/(drawer)/(tabs)/flash-delivery/product-detail/${item.id}`);
+ }
+ }}
+ cartType="flash"
+ />
+ )}
+ keyExtractor={(item, index) => index.toString()}
+ columnWrapperStyle={{ gap: 16, justifyContent: 'flex-start' }}
+ contentContainerStyle={[tw`pb-24 px-4`, { gap: 16 }]}
+ onRefresh={() => productsQuery.refetch()}
+ ListEmptyComponent={
+
+ No Flash Delivery products available.
+
+ }
+ />
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/components/TabLayoutWrapper.tsx b/apps/user-ui/components/TabLayoutWrapper.tsx
new file mode 100644
index 0000000..7292a0b
--- /dev/null
+++ b/apps/user-ui/components/TabLayoutWrapper.tsx
@@ -0,0 +1,15 @@
+import React from 'react';
+import { SafeAreaView } from 'react-native-safe-area-context';
+import { tw } from 'common-ui';
+
+interface TabLayoutWrapperProps {
+ children: React.ReactNode;
+}
+
+export default function TabLayoutWrapper({ children }: TabLayoutWrapperProps) {
+ return (
+
+ {children}
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/components/TestingPhaseNote.tsx b/apps/user-ui/components/TestingPhaseNote.tsx
new file mode 100644
index 0000000..b856ffc
--- /dev/null
+++ b/apps/user-ui/components/TestingPhaseNote.tsx
@@ -0,0 +1,33 @@
+import React from "react";
+import { View } from "react-native";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { MyText, tw } from "common-ui";
+
+const TestingPhaseNote: React.FC = () => {
+ return (
+
+
+
+
+ Testing Phase
+
+
+
+
+ • This app is in testing phase until Jan 23, 2026
+
+
+ • Actual delivery service has not started yet
+
+
+ • Prices shown are not real
+
+
+ • Any feedback or issues found? WhatsApp on +91 9676651496
+
+
+
+ );
+};
+
+export default TestingPhaseNote;
diff --git a/apps/user-ui/components/UpdateChecker.tsx b/apps/user-ui/components/UpdateChecker.tsx
new file mode 100644
index 0000000..cee29dd
--- /dev/null
+++ b/apps/user-ui/components/UpdateChecker.tsx
@@ -0,0 +1,38 @@
+import React, { useEffect } from 'react';
+import * as Updates from 'expo-updates';
+import { Alert } from 'react-native';
+
+interface UpdateCheckerProps {
+ children: React.ReactNode;
+}
+
+const UpdateChecker: React.FC = ({ children }) => {
+ useEffect(() => {
+ const checkForUpdates = async () => {
+ try {
+ const update = await Updates.checkForUpdateAsync();
+ if (update.isAvailable) {
+ Alert.alert(
+ "Update available",
+ "Restart app to apply the update?",
+ [
+ { text: "Later", style: "cancel" },
+ { text: "Restart", onPress: () => Updates.reloadAsync() }
+ ]
+ );
+ }
+ } catch (error) {
+ console.log('Update check failed:', error);
+ }
+ };
+
+ // Only check on production builds
+ if (!__DEV__) {
+ checkForUpdates();
+ }
+ }, []);
+
+ return <>{children}>;
+};
+
+export default UpdateChecker;
\ No newline at end of file
diff --git a/apps/user-ui/components/UserAddressHeader.tsx b/apps/user-ui/components/UserAddressHeader.tsx
new file mode 100644
index 0000000..c3f52a2
--- /dev/null
+++ b/apps/user-ui/components/UserAddressHeader.tsx
@@ -0,0 +1,45 @@
+import React from 'react';
+import { View } from 'react-native';
+import { useRouter } from 'expo-router';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { trpc } from '@/src/trpc-client';
+import { tw, MyText, MyTouchableOpacity } from 'common-ui';
+
+export default function UserAddressHeader() {
+ const router = useRouter();
+ const { data: defaultAddressResponse } = trpc.user.address.getDefaultAddress.useQuery();
+ const defaultAddress = defaultAddressResponse?.data;
+
+ // Use a cleaner, white aesthetic that doesn't dominate the eye but feels premium
+ return (
+
+
+ router.push('/(drawer)/(tabs)/me/addresses')}
+ style={tw`flex-1`}
+ >
+
+ {/* Small subtle brand indicator */}
+
+
+
+ Delivering to
+
+
+ {defaultAddress?.name ? defaultAddress.name.split(' ')[0] : 'Home'}
+
+
+
+
+
+ {defaultAddress ? `${defaultAddress.addressLine1}, ${defaultAddress.city}` : 'Add a delivery address'}
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/components/WebViewWrapper.tsx b/apps/user-ui/components/WebViewWrapper.tsx
new file mode 100644
index 0000000..2f64735
--- /dev/null
+++ b/apps/user-ui/components/WebViewWrapper.tsx
@@ -0,0 +1,59 @@
+import React, { useState } from 'react';
+import { View, ActivityIndicator } from 'react-native';
+import { WebView } from 'react-native-webview';
+import { trpc } from '@/src/trpc-client';
+import { useGetEssentialConsts } from '@/src/api-hooks/essential-consts.api';
+import { theme, MyText, MyTouchableOpacity } from 'common-ui';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+
+interface WebViewWrapperProps {
+ children: React.ReactNode;
+}
+
+export default function WebViewWrapper({ children }: WebViewWrapperProps) {
+ const { data: constsData, isLoading } = useGetEssentialConsts();
+ const [isClosed, setIsClosed] = useState(false);
+
+ if (isLoading) {
+ return (
+
+
+ Loading...
+
+ );
+ }
+
+ const webviewHtml = constsData?.webviewHtml;
+ const isWebviewClosable = constsData?.isWebviewClosable;
+
+ if (webviewHtml && !isClosed) {
+ return (
+
+
+ {isWebviewClosable && (
+
+ setIsClosed(true)}
+ style={{
+ backgroundColor: 'rgba(0,0,0,0.5)',
+ borderRadius: 20,
+ padding: 8,
+ }}
+ >
+
+
+
+ )}
+
+ );
+ }
+
+ return <>{children}>;
+}
\ No newline at end of file
diff --git a/apps/user-ui/components/cart-page.tsx b/apps/user-ui/components/cart-page.tsx
new file mode 100644
index 0000000..70cf8f0
--- /dev/null
+++ b/apps/user-ui/components/cart-page.tsx
@@ -0,0 +1,1044 @@
+import React, { useState, useEffect, useMemo } from "react";
+import {
+ View,
+ ScrollView,
+ Image,
+ Alert,
+ Platform,
+ TouchableOpacity,
+} from "react-native";
+import { useRouter } from "expo-router";
+import {
+ tw,
+ useManualRefresh,
+ AppContainer,
+ useMarkDataFetchers,
+ MyText,
+ MyTouchableOpacity,
+ BottomDropdown, BottomDialog , Quantifier } from "common-ui";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import { useHideTabNav } from "@/src/hooks/useHideTabNav";
+
+import TestingPhaseNote from "@/components/TestingPhaseNote";
+
+import dayjs from "dayjs";
+import { trpc } from "@/src/trpc-client";
+import { useGetCart, useUpdateCartItem, useRemoveFromCart } from '@/hooks/cart-query-hooks';
+import { useGetEssentialConsts } from '@/src/api-hooks/essential-consts.api';
+
+interface CartItem {
+ id: number;
+ productId: number;
+ quantity: number;
+ product: {
+ price: number;
+ isOutOfStock: boolean;
+ name: string;
+ images: string[];
+ unit?: string;
+ incrementStep?: number;
+ productQuantity?: number;
+ } | null;
+}
+
+interface CartPageProps {
+ isFlashDelivery?: boolean;
+}
+
+export default function CartPage({ isFlashDelivery = false }: CartPageProps) {
+ // Hide tabs when cart page is active
+ useHideTabNav();
+
+ const cartType: "regular" | "flash" = isFlashDelivery ? "flash" : "regular";
+
+ const [quantities, setQuantities] = useState>({});
+ const {
+ data: cartData,
+ isLoading,
+ error,
+ refetch: refetchCart,
+ } = useGetCart({ refetchOnWindowFocus: true }, cartType);
+
+ // Extract product IDs from cart items
+ const productIds = cartData?.items.map(item => item.productId) || [];
+
+ // Get cart slots for the products in cart
+ const { data: slotsData, refetch: refetchSlots, error: slotsError } = trpc.user.cart.getCartSlots.useQuery(
+ { productIds },
+ {
+ enabled: productIds.length > 0,
+ refetchOnWindowFocus: false
+ }
+ );
+
+ const generateCouponDescription = (coupon: any): string => {
+ let desc = "";
+
+ if (coupon.discountPercent) {
+ desc += `${coupon.discountPercent}% off`;
+ } else if (coupon.flatDiscount) {
+ desc += `₹${coupon.flatDiscount} off`;
+ }
+
+ if (coupon.minOrder) {
+ desc += ` on orders above ₹${coupon.minOrder}`;
+ }
+
+ if (coupon.maxValue) {
+ desc += ` (max discount ₹${coupon.maxValue})`;
+ }
+
+ return desc;
+ };
+
+ const { data: couponsRaw, error: couponsError } = trpc.user.coupon.getEligible.useQuery();
+ const { data: constsData } = useGetEssentialConsts();
+ const { data: productsData } = trpc.user.product.getAllProductsSummary.useQuery();
+
+ const cartItems = cartData?.items || [];
+
+
+ // Memoized flash-eligible product IDs
+ const flashEligibleProductIds = useMemo(() => {
+ if (!productsData) return new Set();
+ return new Set(
+ productsData
+ .filter((product: any) => product.isFlashAvailable)
+ .map((product: any) => product.id)
+ );
+ }, [productsData]);
+
+ // Base total price without discounts for coupon eligibility check
+ const baseTotalPrice = useMemo(
+ () =>
+ cartItems
+ .filter((item) => !item.product?.isOutOfStock)
+ .reduce(
+ (sum, item) =>
+ sum +
+ (item.product?.price || 0) * (quantities[item.id] || item.quantity),
+ 0
+ ),
+ [cartItems, quantities]
+ );
+
+ const eligibleCoupons = useMemo(() => {
+ if (!couponsRaw?.data) return [];
+ return couponsRaw.data
+ .map((coupon) => {
+ let isEligible = true;
+ let ineligibilityReason = "";
+ if (
+ coupon.maxLimitForUser &&
+ coupon.usages.length >= coupon.maxLimitForUser
+ ) {
+ isEligible = false;
+ ineligibilityReason = "Usage limit exceeded";
+ }
+ if (coupon.minOrder && parseFloat(coupon.minOrder) > baseTotalPrice) {
+ isEligible = false;
+ ineligibilityReason = `Min order ₹${coupon.minOrder}`;
+ }
+ return {
+ id: coupon.id,
+ code: coupon.couponCode,
+ discountType: coupon.discountPercent ? "percentage" : "flat",
+ discountValue: parseFloat(
+ coupon.discountPercent || coupon.flatDiscount || "0"
+ ),
+ maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : undefined,
+ minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : undefined,
+ description: generateCouponDescription(coupon),
+ exclusiveApply: coupon.exclusiveApply,
+ isEligible,
+ ineligibilityReason: isEligible ? undefined : ineligibilityReason,
+ };
+ })
+ .filter(
+ (coupon) => coupon.ineligibilityReason !== "Usage limit exceeded"
+ );
+ }, [couponsRaw, baseTotalPrice]);
+
+ const updateCartItem = useUpdateCartItem({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }, cartType);
+ const removeFromCart = useRemoveFromCart({ showSuccessAlert: false, showErrorAlert: false, refetchCart: true }, cartType);
+
+ useMarkDataFetchers(() => {
+ refetchCart();
+ refetchSlots();
+ });
+ useManualRefresh(() => {
+ refetchCart();
+ refetchSlots();
+ });
+ const [selectedSlots, setSelectedSlots] = useState>({});
+ const [selectedCouponId, setSelectedCouponId] = useState(null);
+ const [couponDialogOpen, setCouponDialogOpen] = useState(false);
+
+ const router = useRouter();
+
+ // Process slots: flatten and unique
+ const availableSlots = React.useMemo(() => {
+ if (!slotsData) return [];
+ const allSlots = Object.values(slotsData).flat();
+ const uniqueSlots = allSlots.filter(
+ (slot, index, self) => index === self.findIndex((s) => s.id === slot.id)
+ );
+ return uniqueSlots.map((slot) => ({
+ label: `Delivery: ${dayjs(slot.deliveryTime).format(
+ "ddd DD MMM, h:mm a"
+ )} - Close time: ${dayjs(slot.freezeTime).format("h:mm a")}`,
+ value: slot.id,
+ }));
+ }, [slotsData]);
+
+ // Get available slots for a specific product
+ const getAvailableSlotsForProduct = React.useMemo(() => {
+ return (productId: number) => {
+ if (!slotsData || !slotsData[productId]) return [];
+ return slotsData[productId].map((slot) => ({
+ label: `Delivery: ${dayjs(slot.deliveryTime).format(
+ "ddd DD MMM, h:mm a"
+ )} - Close time: ${dayjs(slot.freezeTime).format("h:mm a")}`,
+ value: slot.id,
+ }));
+ };
+ }, [slotsData]);
+
+ // Calculate coupon discount
+ const selectedCoupons = useMemo(
+ () =>
+ selectedCouponId ? eligibleCoupons?.filter((coupon) => coupon.id === selectedCouponId) : [],
+ [eligibleCoupons, selectedCouponId]
+ );
+
+ const totalPrice = cartItems
+ .filter((item) => !item.product?.isOutOfStock)
+ .reduce((sum, item) => {
+ const quantity = quantities[item.id] || item.quantity;
+ const price = isFlashDelivery ? (item.product?.flashPrice ?? item.product?.price ?? 0) : (item.product?.price || 0);
+ return sum + price * quantity;
+ }, 0);
+ const dropdownData = useMemo(
+ () =>
+ eligibleCoupons?.map((coupon) => {
+ const discount =
+ coupon.discountType === "percentage"
+ ? Math.min(
+ (totalPrice * coupon.discountValue) / 100,
+ coupon.maxValue || Infinity
+ )
+ : Math.min(coupon.discountValue, coupon.maxValue || totalPrice);
+ const saveString = !isNaN(discount) ? ` (Save ₹${discount})` : "";
+ const baseLabel = `${coupon.code} - ${coupon.description}${coupon.isEligible ? saveString : ""
+ }`;
+ const label = coupon.isEligible
+ ? baseLabel
+ : `${baseLabel} (${coupon.ineligibilityReason})`;
+ return {
+ label,
+ value: coupon.id,
+ disabled: !coupon.isEligible,
+ };
+ }) || [],
+ [eligibleCoupons, totalPrice]
+ );
+
+ const discountAmount = useMemo(
+ () =>
+ selectedCoupons?.reduce(
+ (sum, coupon) =>
+ sum +
+ (coupon.discountType === "percentage"
+ ? Math.min(
+ (totalPrice * coupon.discountValue) / 100,
+ coupon.maxValue || Infinity
+ )
+ : Math.min(coupon.discountValue, coupon.maxValue || totalPrice)),
+ 0
+ ) || 0,
+ [selectedCoupons, totalPrice]
+ );
+
+ const finalTotal = totalPrice - discountAmount;
+
+ const deliveryCharge = useMemo(
+ () => {
+ const threshold = isFlashDelivery
+ ? constsData?.flashFreeDeliveryThreshold
+ : constsData?.freeDeliveryThreshold;
+ const charge = isFlashDelivery
+ ? constsData?.flashDeliveryCharge
+ : constsData?.deliveryCharge;
+ return finalTotal < threshold ? charge : 0;
+ },
+ [finalTotal, constsData, isFlashDelivery]
+ );
+
+ const finalTotalWithDelivery = finalTotal + deliveryCharge;
+
+ const hasAvailableItems = cartItems.some(item => !item.product?.isOutOfStock);
+
+ useEffect(() => {
+ const initial: Record = {};
+ cartItems.forEach((item) => {
+ initial[item.id] = item.quantity;
+ });
+ setQuantities(initial);
+ }, [cartData]);
+
+ // Auto-select delivery slots for each cart item
+ useEffect(() => {
+ if (cartItems.length > 0) {
+ const newSelectedSlots = { ...selectedSlots };
+
+ cartItems.forEach(item => {
+ // Skip if already has a selected slot
+ if (selectedSlots[item.id]) return;
+
+ if (isFlashDelivery) {
+ // For flash delivery, always use slot 0
+ newSelectedSlots[item.id] = 0;
+ } else {
+ // For regular delivery, find earliest available slot
+ const productSlots = slotsData?.[item.productId];
+ if (!productSlots || productSlots.length === 0) return;
+
+ const now = dayjs();
+ const upcomingSlots = productSlots.filter(slot =>
+ dayjs(slot.deliveryTime).isAfter(now)
+ ).sort((a, b) =>
+ dayjs(a.deliveryTime).diff(dayjs(b.deliveryTime))
+ );
+
+ if (upcomingSlots.length > 0) {
+ // Select the earliest available slot for this product
+ const earliestSlot = upcomingSlots[0];
+ newSelectedSlots[item.id] = earliestSlot.id;
+ }
+ }
+ });
+
+ setSelectedSlots(newSelectedSlots);
+ }
+ }, [slotsData, cartItems, isFlashDelivery]);
+
+
+
+ if (isLoading) {
+ return (
+
+ Loading cart...
+
+ );
+ }
+
+ if (error) {
+ return (
+
+
+ Oops!
+ Failed to load your cart
+
+ );
+ }
+
+ return (
+
+ {/* Fixed Cart Type Header */}
+
+
+ router.back()}
+ style={tw`p-2 -ml-2 mr-1`}
+ activeOpacity={0.7}
+ >
+
+
+
+
+ {isFlashDelivery ? "Flash Delivery Cart" : "Scheduled Delivery Cart"}
+
+
+
+
+
+
+
+ {/* Cart Items */}
+ {cartItems.length === 0 ? (
+
+
+
+
+
+ Your cart is empty
+
+
+ Looks like you haven't added anything to your cart yet.
+
+ router.push("/(drawer)/(tabs)/home")}
+ >
+ Start Shopping
+
+
+ ) : (
+ <>
+
+ {cartItems.map((item, index) => {
+ const productSlots = getAvailableSlotsForProduct(item.productId);
+ const selectedSlotForItem = selectedSlots[item.id];
+ const isFlashEligible = isFlashDelivery ? flashEligibleProductIds.has(item.productId) : true;
+ // const isAvailable = (productSlots.length > 0 || isFlashDelivery) && !item.product?.isOutOfStock && isFlashEligible;
+ let isAvailable = true;
+
+ if(item.product?.isOutOfStock) {
+ isAvailable = false;
+ } else if(isFlashDelivery) {
+ if(!isFlashEligible) {
+ isAvailable = false;
+ }
+ } else {
+ if(productSlots.length === 0) {
+ isAvailable = false;
+ }
+ }
+ // if (item.product?.isOutOfStock) {
+ // isAvailable = false;
+ // } else if (isFlashDelivery) {
+ // isAvailable = isFlashEligible;
+ // }
+ const quantity = quantities[item.id] || item.quantity;
+ const price = isFlashDelivery ? (item.product?.flashPrice ?? item.product?.price ?? 0) : (item.product?.price || 0);
+ const itemPrice = price * quantity;
+
+ return (
+
+
+
+
+
+
+ {item.product.name}
+
+
+ {(() => {
+ const qty = item.product?.productQuantity || 1;
+ const unit = item.product?.unit || '';
+ if (unit?.toLowerCase() === 'kg' && qty < 1) {
+ return `${Math.round(qty * 1000)}g`;
+ }
+ return `${qty}${unit}`;
+ })()}
+
+
+
+
+ {
+ if (value === 0) {
+ // Show confirmation alert before removing item
+ Alert.alert(
+ "Remove Item",
+ "Are you sure you want to remove this item from your cart?",
+ [
+ {
+ text: "Cancel",
+ style: "cancel",
+ onPress: () => {
+ // Reset quantity back to 1
+ setQuantities((prev) => ({ ...prev, [item.id]: 1 }));
+ }
+ },
+ {
+ text: "Remove",
+ style: "destructive",
+ onPress: () => {
+ // Proceed with removal
+ removeFromCart.mutate(
+ { itemId: item.id },
+ {
+ onSuccess: () => {
+ refetchCart();
+ },
+ onError: (error: any) => {
+ Alert.alert("Error", error.message || "Failed to remove item");
+ // Restore quantity on error
+ setQuantities((prev) => ({ ...prev, [item.id]: 1 }));
+ },
+ }
+ );
+ }
+ }
+ ]
+ );
+ } else {
+ // Update quantity normally
+ setQuantities((prev) => ({
+ ...prev,
+ [item.id]: value,
+ }));
+ updateCartItem.mutate({
+ itemId: item.id,
+ quantity: value,
+ });
+ }
+ }}
+ step={item.product.incrementStep}
+ unit={item.product?.unit}
+ />
+
+
+
+
+ {/* Delivery Slot Selection per Product - Hidden for Flash Delivery */}
+ {!isFlashDelivery && (
+
+
+ {
+ setSelectedSlots((prev) => ({
+ ...prev,
+ [item.id]: Number(value)
+ }));
+ }}
+ disabled={productSlots.length === 0}
+
+ triggerComponent={({ onPress, disabled, displayText }) => {
+ const selectedSlotForItem = selectedSlots[item.id];
+ const selectedSlot = productSlots.find(slot => slot.value === selectedSlotForItem);
+
+ const deliveryTimeText = selectedSlot
+ ? selectedSlot.label.split(' - ')[0].replace('Delivery: ', '')
+ : null;
+
+ return (
+
+
+
+ {deliveryTimeText || (productSlots.length === 0
+ ? "No delivery slots available"
+ : "Choose delivery slot")}
+
+
+
+ Change
+
+
+
+ );
+ }}
+ />
+
+
+
+
+ ₹{itemPrice}
+
+ {
+ Alert.alert(
+ "Remove Item",
+ `Remove ${item.product.name} from cart?`,
+ [
+ { text: "Cancel", style: "cancel" },
+ {
+ text: "Remove",
+ style: "destructive",
+ onPress: () => {
+ removeFromCart.mutate(
+ { itemId: item.id },
+ {
+ onSuccess: () => {
+ refetchCart();
+ },
+ onError: (error: any) => {
+ Alert.alert(
+ "Error",
+ error.message ||
+ "Failed to remove item"
+ );
+ },
+ }
+ );
+ },
+ },
+ ]
+ );
+ }}
+ style={tw`p-1`}
+ >
+
+
+
+
+
+ )}
+
+ {/* Price for Flash Delivery (already in same row as slot) */}
+ {isFlashDelivery && (
+
+
+
+ ₹{itemPrice}
+
+ {
+ Alert.alert(
+ "Remove Item",
+ `Remove ${item.product.name} from cart?`,
+ [
+ { text: "Cancel", style: "cancel" },
+ {
+ text: "Remove",
+ style: "destructive",
+ onPress: () => {
+ removeFromCart.mutate(
+ { itemId: item.id },
+ {
+ onSuccess: () => {
+ refetchCart();
+ },
+ onError: (error: any) => {
+ Alert.alert(
+ "Error",
+ error.message ||
+ "Failed to remove item"
+ );
+ },
+ }
+ );
+ },
+ },
+ ]
+ );
+ }}
+ style={tw`p-1`}
+ >
+
+
+
+
+ )}
+
+ {!isAvailable && (
+
+
+ {item.product?.isOutOfStock
+ ? "Out of Stock"
+ : isFlashDelivery && !flashEligibleProductIds.has(item.productId)
+ ? "Not available for flash delivery. Please remove"
+ : "No delivery slots available"}
+
+
+ )}
+
+
+ {/* Gray horizontal line between items (except for the last item) */}
+ {index < cartItems.length - 1 && (
+
+ )}
+
+ );
+ })}
+
+ >
+ )}
+
+ {/* Cart Type Switcher */}
+ {cartItems.length > 0 && (
+
+
+ {/* First row: Text content */}
+
+
+
+
+
+
+ {isFlashDelivery ? "Flash Delivery" : "Scheduled Delivery"}
+
+
+ {isFlashDelivery
+ ? "30 min delivery • Immediate pickup"
+ : "Choose your preferred delivery time"
+ }
+
+
+
+
+ {/* Second row: Navigation trigger */}
+ {
+ if (isFlashDelivery) {
+ // Switch from flash to scheduled delivery
+ router.push("/(drawer)/(tabs)/home" as any);
+ } else {
+ // Switch from scheduled to flash delivery
+ router.push("/(drawer)/(tabs)/flash-delivery/(products)");
+ }
+ }}
+ activeOpacity={0.8}
+ >
+
+ {isFlashDelivery ? "Go to Scheduled Delivery" : "Go to Flash Delivery"}
+
+
+
+
+
+ )}
+
+ {/* Coupon Selection */}
+ {hasAvailableItems && (
+
+
+
+
+
+
+ Offers & Coupons
+
+
+
+ {
+ setSelectedCouponId(value ? Number(value) : null);
+ }}
+ placeholder={
+ eligibleCoupons.length === 0
+ ? "No coupons available"
+ : "Select a coupon"
+ }
+ />
+
+ {eligibleCoupons.length === 0 && (
+
+ No coupons available for this order
+
+ )}
+
+
+
+ {selectedCouponId && (
+ setSelectedCouponId(null)}
+ >
+
+ Remove coupon
+
+
+ )}
+
+ )}
+
+
+
+ {/* Bottom Checkout Bar - Now Static */}
+ {hasAvailableItems && (
+
+
+ {/* Bill Header */}
+
+ Bill Details
+
+
+
+ {/* Item Total */}
+
+ Item Total
+ ₹{totalPrice}
+
+
+ {/* Discount */}
+ {discountAmount > 0 && (
+
+ Product Discount
+ -₹{discountAmount}
+
+ )}
+
+ {/* Applied Coupon */}
+ {selectedCoupons.length > 0 && (
+
+ Coupon Applied
+ setCouponDialogOpen(true)}>
+ {selectedCoupons[0].code}
+
+
+ )}
+
+ {/* Delivery Fee */}
+
+
+ Delivery Fee
+
+
+
+ {deliveryCharge === 0 && (constsData?.deliveryCharge || 0) > 0 && (
+
+ ₹{constsData?.deliveryCharge}
+
+ )}
+
+ {deliveryCharge === 0 ? 'Free' : `₹${deliveryCharge}`}
+
+
+
+
+ {/* Free Delivery Nudge */}
+ {deliveryCharge > 0 && (constsData?.freeDeliveryThreshold || 0) > 0 && finalTotal < (constsData?.freeDeliveryThreshold || 0) && (
+
+
+
+ Add products worth ₹{((constsData?.freeDeliveryThreshold || 0) - finalTotal).toFixed(0)} for free delivery
+
+
+ )}
+
+ {/* Divider */}
+
+
+ {/* Grand Total */}
+
+ To Pay
+ ₹{finalTotalWithDelivery}
+
+
+ {/* Savings Banner */}
+ {(discountAmount > 0 || deliveryCharge === 0) && (
+
+
+
+ You saved ₹{discountAmount + (deliveryCharge === 0 ? (constsData?.deliveryCharge || 0) : 0)} on this order
+
+
+ )}
+
+
+ {/* Action Buttons */}
+
+
+ router.push(isFlashDelivery ? "/(drawer)/(tabs)/flash-delivery" : "/(drawer)/(tabs)/home")}
+ >
+ Shop More
+
+ {
+ const availableItems = cartItems
+ .filter(item => {
+ if (item.product?.isOutOfStock) return false;
+ if (isFlashDelivery) {
+ // Check if product supports flash delivery
+ return flashEligibleProductIds.has(item.productId);
+ }
+ return selectedSlots[item.id]; // Regular delivery requires slot selection
+ })
+ .map(item => item.id);
+
+
+
+ if (availableItems.length === 0) {
+ // Determine why no items are available
+ const outOfStockItems = cartItems.filter(item => item.product?.isOutOfStock);
+ const inStockItems = cartItems.filter(item => !item.product?.isOutOfStock);
+
+ let errorTitle = "Cannot Proceed";
+ let errorMessage = "";
+
+ if (outOfStockItems.length === cartItems.length) {
+ // All items are out of stock
+ errorTitle = "Items Unavailable";
+ errorMessage = "All items in your cart are currently out of stock. Please remove them and add available items.";
+ } else if (isFlashDelivery) {
+ // Check if any items are flash-eligible
+ const flashEligibleItems = inStockItems.filter(item =>
+ flashEligibleProductIds.has(item.productId)
+ );
+ if (flashEligibleItems.length === 0) {
+ errorTitle = "Flash Delivery Unavailable";
+ errorMessage = "None of the items in your cart are available for flash delivery. Please remove ineligible items or switch to regular delivery.";
+ } else {
+ errorTitle = "Some Items Not Available";
+ errorMessage = "Some items in your cart are not available for flash delivery. You can proceed with only the eligible items, or remove ineligible items.";
+ }
+ } else {
+ // Regular delivery - check slot selection
+ const itemsWithoutSlots = inStockItems.filter(item => !selectedSlots[item.id]);
+ if (itemsWithoutSlots.length > 0) {
+ errorTitle = "Delivery Slot Required";
+ errorMessage = `${itemsWithoutSlots.length} item(s) don't have a delivery slot. Please remove them or select a slot for each item.`;
+ } else {
+ errorTitle = "Cannot Proceed";
+ errorMessage = "Please check your cart items and try again.";
+ }
+ }
+
+ Alert.alert(errorTitle, errorMessage);
+ return;
+ }
+
+ // Check if there are items without slots (for regular delivery)
+ if (!isFlashDelivery && availableItems.length < cartItems.length) {
+ const itemsWithoutSlots = cartItems.filter(item => !selectedSlots[item.id] && !item.product?.isOutOfStock);
+ if (itemsWithoutSlots.length > 0) {
+ Alert.alert(
+ "Delivery Slot Required",
+ `${itemsWithoutSlots.length} item(s) don't have a delivery slot. Please select a slot or remove the item.`
+ );
+ return;
+ }
+ }
+
+ // Group items by selected slot
+ const itemsBySlot: Record = {};
+ availableItems.forEach(itemId => {
+ const slotId = isFlashDelivery ? 0 : selectedSlots[itemId];
+ if (!itemsBySlot[slotId]) {
+ itemsBySlot[slotId] = [];
+ }
+ itemsBySlot[slotId].push(itemId);
+ });
+
+ // Create checkout URL with slot groupings
+ const slotParams = Object.entries(itemsBySlot)
+ .map(([slotId, itemIds]) => `${slotId}:${itemIds.join(',')}`)
+ .join(';');
+
+ router.push(
+ `${isFlashDelivery ? '/(drawer)/(tabs)/flash-delivery/checkout' : '/(drawer)/(tabs)/home/checkout'}?slots=${encodeURIComponent(slotParams)}${selectedCouponId ? `&coupons=${selectedCouponId}` : ''}&deliveryPrice=${deliveryCharge}` as any
+ );
+ }}
+ >
+ Checkout
+
+
+
+
+
+ )}
+
+
+
+ {/* Coupon Details Dialog */}
+ setCouponDialogOpen(false)}
+ >
+
+
+
+
+
+
+ Applied Coupons
+
+
+
+ {selectedCoupons.map((coupon) => (
+
+
+
+
+ {coupon.code}
+
+
+ {coupon.description}
+
+
+
+
+ {coupon.discountType === "percentage"
+ ? `${coupon.discountValue}% OFF`
+ : `₹${coupon.discountValue} OFF`}
+
+
+
+ {coupon.maxValue && (
+
+ Maximum discount up to ₹{coupon.maxValue}
+
+ )}
+
+ ))}
+
+ setCouponDialogOpen(false)}
+ >
+ Close
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/user-ui/components/checkout-page.tsx b/apps/user-ui/components/checkout-page.tsx
new file mode 100644
index 0000000..817215d
--- /dev/null
+++ b/apps/user-ui/components/checkout-page.tsx
@@ -0,0 +1,273 @@
+import React, { useState, useMemo } from 'react';
+import { View, ScrollView } from 'react-native';
+import { useLocalSearchParams, useRouter } from 'expo-router';
+import { tw, useMarkDataFetchers , BottomDialog, MyText, MyTouchableOpacity } from 'common-ui';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { useQueryClient } from '@tanstack/react-query';
+import AddressForm from '@/src/components/AddressForm';
+import { useAuthenticatedRoute } from '@/hooks/useAuthenticatedRoute';
+
+import { trpc } from '@/src/trpc-client';
+import { useGetCart } from '@/hooks/cart-query-hooks';
+import { useGetEssentialConsts } from '@/src/api-hooks/essential-consts.api';
+import PaymentAndOrderComponent from '@/components/PaymentAndOrderComponent';
+import CheckoutAddressSelector from '@/components/CheckoutAddressSelector';
+import { useAddressStore } from '@/src/store/addressStore';
+
+interface CheckoutPageProps {
+ isFlashDelivery?: boolean;
+}
+
+const CheckoutPage: React.FC = ({ isFlashDelivery = false }) => {
+ const params = useLocalSearchParams();
+ const queryClient = useQueryClient();
+ const router = useRouter();
+
+ // Protect checkout route and preserve query params
+ useAuthenticatedRoute({
+ targetUrl: isFlashDelivery ? '/(drawer)/(tabs)/flash-delivery/checkout' : '/(drawer)/(tabs)/home/checkout',
+ queryParams: params
+ });
+
+ const cartType: "regular" | "flash" = isFlashDelivery ? "flash" : "regular";
+ const { data: cartData, refetch: refetchCart } = useGetCart({}, cartType);
+ console.log({cartType})
+
+ const { data: addresses, refetch: refetchAddresses } = trpc.user.address.getUserAddresses.useQuery();
+ const { data: slotsData, refetch: refetchSlots } = trpc.user.slots.getSlots.useQuery();
+ const { data: constsData } = useGetEssentialConsts();
+ const { data: productsData } = trpc.user.product.getAllProductsSummary.useQuery();
+
+ useMarkDataFetchers(() => {
+ refetchCart();
+ refetchAddresses();
+ refetchSlots();
+ });
+
+ const { selectedAddressId, setSelectedAddressId } = useAddressStore();
+ const [showAddAddress, setShowAddAddress] = useState(false);
+ const [selectedCouponId, setSelectedCouponId] = useState(null);
+
+
+
+ const cartItems = cartData?.items || [];
+
+ // Memoized flash-eligible product IDs
+ const flashEligibleProductIds = useMemo(() => {
+ if (!productsData) return new Set();
+ return new Set(
+ productsData
+ .filter((product: any) => product.isFlashAvailable)
+ .map((product: any) => product.id)
+ );
+ }, [productsData]);
+
+ // Parse slots parameter from URL (format: "1:1,2,3;2:4,5")
+ const selectedSlots = useMemo(() => {
+ const slots: Record = {};
+ if (params.slots) {
+ const slotGroups = (params.slots as string).split(';');
+ slotGroups.forEach(group => {
+ const [slotIdStr, itemIdsStr] = group.split(':');
+ const slotId = Number(slotIdStr);
+ const itemIds = itemIdsStr.split(',').map(Number);
+ itemIds.forEach(itemId => {
+ slots[itemId] = slotId;
+ });
+ });
+ }
+ return slots;
+ }, [params.slots]);
+
+ const selectedItems = cartItems.filter(item => {
+ // For flash delivery, check if product supports flash delivery
+ if (isFlashDelivery) {
+ return flashEligibleProductIds.has(item.productId);
+ }
+ // For regular delivery, only include items with assigned slots
+ return selectedSlots[item.id];
+ });
+
+ React.useEffect(() => {
+ if (params.coupons) {
+ const couponId = Number(params.coupons as string);
+ setSelectedCouponId(couponId);
+ }
+ }, [params.coupons]);
+
+ // Handle empty cart case
+ if (selectedItems.length === 0) {
+ return (
+
+
+
+ {cartItems.length === 0 ? "Your cart is empty" : "No items to checkout"}
+
+
+ {cartItems.length === 0
+ ? "Add some delicious items to your cart before checking out"
+ : isFlashDelivery
+ ? "None of your cart items are available for flash delivery"
+ : "Please select delivery slots for your items"
+ }
+
+ router.back()}
+ >
+ Back to Shopping
+
+
+ );
+ }
+
+
+
+ const totalPrice = selectedItems
+ .filter((item) => !item.product?.isOutOfStock)
+ .reduce(
+ (sum, item) => {
+ const price = isFlashDelivery ? (item.product?.flashPrice ?? item.product?.price ?? 0) : (item.product?.price || 0);
+ return sum + price * item.quantity;
+ },
+ 0
+ );
+
+ const { data: couponsRaw } = trpc.user.coupon.getEligible.useQuery();
+
+ const eligibleCoupons = useMemo(() => {
+ if (!couponsRaw?.data) return [];
+ return couponsRaw.data.map(coupon => {
+ let isEligible = true;
+ let ineligibilityReason = '';
+ if (coupon.maxLimitForUser && coupon.usages.length >= coupon.maxLimitForUser) {
+ isEligible = false;
+ ineligibilityReason = 'Usage limit exceeded';
+ }
+ if (coupon.minOrder && parseFloat(coupon.minOrder) > totalPrice) {
+ isEligible = false;
+ ineligibilityReason = `Min order ₹${coupon.minOrder}`;
+ }
+ return {
+ id: coupon.id,
+ code: coupon.couponCode,
+ discountType: coupon.discountPercent ? 'percentage' : 'flat',
+ discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || '0'),
+ maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : undefined,
+ minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : undefined,
+ description: '',
+ exclusiveApply: coupon.exclusiveApply,
+ isEligible,
+ ineligibilityReason: isEligible ? undefined : ineligibilityReason,
+ };
+ }).filter(coupon => coupon.ineligibilityReason !== 'Usage limit exceeded');
+ }, [couponsRaw, totalPrice]);
+
+ const selectedCoupons = useMemo(
+ () =>
+ selectedCouponId ? eligibleCoupons?.filter((coupon) => coupon.id === selectedCouponId) : [],
+ [eligibleCoupons, selectedCouponId]
+ );
+
+ const discountAmount = useMemo(
+ () =>
+ selectedCoupons?.reduce(
+ (sum, coupon) =>
+ sum +
+ (coupon.discountType === "percentage"
+ ? Math.min(
+ (totalPrice * coupon.discountValue) / 100,
+ coupon.maxValue || Infinity
+ )
+ : Math.min(coupon.discountValue, coupon.maxValue || totalPrice)),
+ 0
+ ) || 0,
+ [selectedCoupons, totalPrice]
+ );
+
+ const finalTotal = totalPrice - discountAmount;
+
+ const deliveryCharge = useMemo(() => {
+ const threshold = isFlashDelivery
+ ? constsData?.flashFreeDeliveryThreshold
+ : constsData?.freeDeliveryThreshold;
+ const charge = isFlashDelivery
+ ? constsData?.flashDeliveryCharge
+ : constsData?.deliveryCharge;
+ return finalTotal < threshold ? charge : 0;
+ }, [finalTotal, constsData, isFlashDelivery]);
+
+ const finalTotalWithDelivery = finalTotal + deliveryCharge;
+
+
+
+
+ return (
+
+
+ {/* Checkout Type Header */}
+
+
+ router.back()}
+ style={tw`p-2 -ml-2 mr-1`}
+ activeOpacity={0.7}
+ >
+
+
+
+
+ {isFlashDelivery ? "Flash Delivery Checkout" : "Scheduled Delivery Checkout"}
+
+
+
+
+
+
+
+
+
+
+
+
+ setShowAddAddress(false)}>
+ {
+ setShowAddAddress(false);
+ queryClient.invalidateQueries();
+ }}
+ />
+
+
+
+ );
+};
+
+export default CheckoutPage;
\ No newline at end of file
diff --git a/apps/user-ui/components/floating-cart-bar.tsx b/apps/user-ui/components/floating-cart-bar.tsx
new file mode 100644
index 0000000..914d84e
--- /dev/null
+++ b/apps/user-ui/components/floating-cart-bar.tsx
@@ -0,0 +1,343 @@
+import React, { useState, useEffect } from "react";
+import { View, ScrollView, Dimensions, Alert } from "react-native";
+import { Image } from 'expo-image';
+import { useRouter } from "expo-router";
+import MaterialIcons from "@expo/vector-icons/MaterialIcons";
+import {
+ StorageServiceCasual,
+ tw,
+ MyText,
+ MyTouchableOpacity,
+ MiniQuantifier,
+ BottomDropdown,
+ BottomDialog,
+ theme,
+ updateStatusBarColor,
+} from "common-ui";
+import { trpc } from "@/src/trpc-client";
+import {
+ useGetCart,
+ useUpdateCartItem,
+ useRemoveFromCart,
+ useAddToCart,
+ type CartType,
+} from "@/hooks/cart-query-hooks";
+import { useGetEssentialConsts } from "@/src/api-hooks/essential-consts.api";
+import { useProductSlotIdentifier } from "@/hooks/useProductSlotIdentifier";
+import dayjs from "dayjs";
+import { LinearGradient } from "expo-linear-gradient";
+
+const { height: screenHeight } = Dimensions.get("window");
+
+interface FloatingCartBarProps {
+ isFlashDelivery?: boolean;
+ isExpanded?: boolean;
+ setIsExpanded?: (value: boolean) => void;
+}
+
+const FloatingCartBar: React.FC = ({
+ isFlashDelivery = false,
+ isExpanded: controlledIsExpanded,
+ setIsExpanded: controlledSetIsExpanded,
+}) => {
+ const cartBarColor = isFlashDelivery ? '#f81260' : theme.colors.brand600;
+ const cartBarBorderColor = isFlashDelivery ? '#e11d48' : theme.colors.brand500;
+ const router = useRouter();
+ const [localIsExpanded, setLocalIsExpanded] = useState(false);
+ const [quantities, setQuantities] = useState>({});
+ const cartType: CartType = isFlashDelivery ? "flash" : "regular";
+
+ const isExpanded = controlledIsExpanded ?? localIsExpanded;
+ const setIsExpanded = controlledSetIsExpanded ?? setLocalIsExpanded;
+ const { data: cartData, refetch: refetchCart } = useGetCart({}, cartType);
+ const { data: constsData } = useGetEssentialConsts();
+ const { data: slotsData } = trpc.user.slots.getSlotsWithProducts.useQuery();
+ const { productSlotsMap } = useProductSlotIdentifier();
+ const cartItems = cartData?.items || [];
+ const itemCount = cartItems.length;
+
+ const updateCartItem = useUpdateCartItem({
+ showSuccessAlert: false,
+ showErrorAlert: false,
+ refetchCart: true,
+ }, cartType);
+ const removeFromCart = useRemoveFromCart({
+ showSuccessAlert: false,
+ showErrorAlert: false,
+ refetchCart: true,
+ }, cartType);
+ const { addToCart = () => { } } = useAddToCart({
+ showSuccessAlert: false,
+ showErrorAlert: false,
+ refetchCart: true,
+ }, cartType) || {};
+
+ useEffect(() => {
+ const initial: Record = {};
+ cartItems.forEach((item) => {
+ initial[item.id] = item.quantity;
+ });
+ setQuantities(initial);
+ }, [cartData]);
+
+ useEffect(() => {
+ if (!cartItems.length || !slotsData?.slots || !productSlotsMap) return;
+
+ const itemsToUpdate = cartItems.filter(item => {
+ if (!item.slotId) return true; // No slotId
+ const slotExists = slotsData.slots.some(slot => slot.id === item.slotId);
+ return !slotExists; // Slot doesn't exist
+ });
+
+ itemsToUpdate.forEach((item) => {
+
+ const availableSlots = productSlotsMap.get(item.productId) || [];
+ if (availableSlots.length > 0 && !isFlashDelivery) { // don't bother updating slot for flash delivery
+ const nearestSlotId = availableSlots[0];
+ removeFromCart.mutate({ itemId: item.id });
+ addToCart(item.productId, item.quantity, nearestSlotId);
+ }
+ });
+ }, []);
+
+ const firstItem = cartItems[0];
+ const expandedHeight = screenHeight * 0.7;
+
+ // Calculate total cart value and free delivery info
+ const totalCartValue = cartItems.reduce(
+ (sum, item) => {
+ const price = isFlashDelivery ? (item.product.flashPrice ?? item.product.price) : item.product.price;
+ return sum + price * item.quantity;
+ },
+ 0
+ );
+ const freeDeliveryThreshold = isFlashDelivery
+ ? constsData?.flashFreeDeliveryThreshold
+ : constsData?.freeDeliveryThreshold;
+ const remainingForFreeDelivery = Math.max(
+ 0,
+ freeDeliveryThreshold - totalCartValue
+ );
+
+ return (
+ <>
+
+ {!isExpanded && (
+ // --- Collapsed View ---
+ itemCount > 0 && setIsExpanded(true)}
+ activeOpacity={0.9}
+ >
+
+
+
+
+
+
+ {itemCount === 0 ? (isFlashDelivery ? "No Flash Items" : "No Items In Cart") : (
+ <>
+
+ ₹{totalCartValue}
+
+ {` • ${itemCount} ${itemCount === 1 ? "Item" : "Items"}`}
+ >
+ )}
+
+ {itemCount > 0 && }
+
+
+ {remainingForFreeDelivery > 0 ? (
+
+ ₹{remainingForFreeDelivery} more for FREE Delivery
+
+ ) : itemCount > 0 ? (
+
+
+
+ Free Delivery Unlocked
+
+
+ ) : (
+ Shop for ₹{freeDeliveryThreshold}+ for free shipping
+ )}
+
+
+
+ router.push(
+ isFlashDelivery
+ ? "/(drawer)/(tabs)/flash-delivery/(cart)/cart"
+ : "/(drawer)/(tabs)/home/cart"
+ )}
+ >
+ Go to Cart
+
+
+ )}
+
+ setIsExpanded(false)} enableDismiss={true}>
+
+ {/* Header */}
+
+
+
+ Your Cart
+
+
+ {itemCount} Items
+
+
+ setIsExpanded(false)}
+ >
+
+
+
+
+ {/* Progress Bar Header */}
+ {remainingForFreeDelivery > 0 && (
+
+
+
+ Free Delivery Progress
+ {Math.round((totalCartValue / freeDeliveryThreshold) * 100)}%
+
+
+
+
+
+
+ Needed
+ +₹{remainingForFreeDelivery}
+
+
+ )}
+
+ {/* Items List */}
+
+ {cartItems.map((item, index) => (
+
+
+
+
+
+
+
+
+ {item.product.name.length > 30 ? item.product.name.substring(0, 30) + '...' : item.product.name}
+
+ {
+ if (value === 0) {
+ removeFromCart.mutate({ itemId: item.id });
+ } else {
+ setQuantities((prev) => ({ ...prev, [item.id]: value }));
+ updateCartItem.mutate({ itemId: item.id, quantity: value });
+ }
+ }}
+ step={item.product.incrementStep}
+ showUnits={true}
+ unit={item.product?.unit}
+ />
+
+
+ {item.slotId && slotsData && productSlotsMap.has(item.productId) && (
+ {
+ const slot = slotsData.slots.find(s => s.id === slotId);
+ return {
+ label: slot ? dayjs(slot.deliveryTime).format("ddd, MMM DD • h:mm A") : "N/A",
+ value: slotId,
+ };
+ })}
+ onValueChange={(val) => {
+ const newSlot = slotsData.slots.find(s => s.id === val);
+ Alert.alert("Delivery Updated", `Scheduled for ${dayjs(newSlot?.deliveryTime).format("MMM DD, h:mm A")}`);
+ }}
+ triggerComponent={({ onPress, displayText }) => (
+
+
+
+ {displayText}
+
+
+
+ )}
+ />
+ )}
+
+ ₹{(isFlashDelivery ? (item.product.flashPrice ?? item.product.price) : item.product.price) * item.quantity}
+
+
+
+
+
+
+
+ {index < cartItems.length - 1 && (
+
+ )}
+
+ ))}
+
+
+ {/* Fancy Footer */}
+
+
+
+ Subtotal
+ ₹{totalCartValue}
+
+ {remainingForFreeDelivery === 0 && (
+
+
+ Free Delivery
+
+ )}
+
+
+ router.push(
+ isFlashDelivery
+ ? "/(drawer)/(tabs)/flash-delivery/(cart)/cart"
+ : "/(drawer)/(tabs)/home/cart"
+ )}
+ activeOpacity={0.9}
+ >
+
+
+ Go to cart
+
+
+
+
+
+
+
+ >
+ );
+};
+
+export default FloatingCartBar;
diff --git a/apps/user-ui/components/icons/CartIcon.tsx b/apps/user-ui/components/icons/CartIcon.tsx
new file mode 100644
index 0000000..aaa878c
--- /dev/null
+++ b/apps/user-ui/components/icons/CartIcon.tsx
@@ -0,0 +1,32 @@
+import React from 'react';
+import Svg, { Path } from 'react-native-svg';
+
+interface CartIconProps {
+ focused: boolean;
+ size: number;
+ color: string;
+}
+
+const CartIcon: React.FC = ({ focused, size, color }) => {
+ if (focused) {
+ // Focused state SVG (cart without handle)
+ return (
+
+ );
+ } else {
+ // Unfocused state SVG (full cart)
+ return (
+
+ );
+ }
+};
+
+export default CartIcon;
\ No newline at end of file
diff --git a/apps/user-ui/components/icons/HomeIcon.tsx b/apps/user-ui/components/icons/HomeIcon.tsx
new file mode 100644
index 0000000..b2629ec
--- /dev/null
+++ b/apps/user-ui/components/icons/HomeIcon.tsx
@@ -0,0 +1,28 @@
+import React from 'react';
+import Svg, { Path } from 'react-native-svg';
+
+interface HomeIconProps {
+ focused: boolean;
+ size: number;
+ color: string;
+}
+
+const HomeIcon: React.FC = ({ focused, size, color }) => {
+ if (focused) {
+ // Selected state SVG (filled house)
+ return (
+
+ );
+ } else {
+ // Unselected state SVG (outlined house)
+ return (
+
+ );
+ }
+};
+
+export default HomeIcon;
\ No newline at end of file
diff --git a/apps/user-ui/components/icons/MeIcon.tsx b/apps/user-ui/components/icons/MeIcon.tsx
new file mode 100644
index 0000000..cf9a3c0
--- /dev/null
+++ b/apps/user-ui/components/icons/MeIcon.tsx
@@ -0,0 +1,30 @@
+import React from 'react';
+import Svg, { Path } from 'react-native-svg';
+
+interface MeIconProps {
+ focused: boolean;
+ size: number;
+ color: string;
+}
+
+const MeIcon: React.FC = ({ focused, size, color }) => {
+ if (focused) {
+ // Selected state SVG (filled user)
+ return (
+
+ );
+ } else {
+ // Unselected state SVG (outlined user)
+ return (
+
+ );
+ }
+};
+
+export default MeIcon;
\ No newline at end of file
diff --git a/apps/user-ui/components/icons/OrderAgainIcon.tsx b/apps/user-ui/components/icons/OrderAgainIcon.tsx
new file mode 100644
index 0000000..8f2e3fb
--- /dev/null
+++ b/apps/user-ui/components/icons/OrderAgainIcon.tsx
@@ -0,0 +1,21 @@
+import React from 'react';
+import Svg, { Path } from 'react-native-svg';
+
+interface OrderAgainIconProps {
+ focused: boolean;
+ size: number;
+ color: string;
+}
+
+const OrderAgainIcon: React.FC = ({ focused, size, color }) => {
+ const iconColor = focused ? '#2563EB' : '#2D264B'; // Use focused color when focused, original color when not
+
+ return (
+
+ );
+};
+
+export default OrderAgainIcon;
\ No newline at end of file
diff --git a/apps/user-ui/components/icons/StoresIcon.tsx b/apps/user-ui/components/icons/StoresIcon.tsx
new file mode 100644
index 0000000..575a631
--- /dev/null
+++ b/apps/user-ui/components/icons/StoresIcon.tsx
@@ -0,0 +1,34 @@
+import React from 'react';
+import Svg, { Path } from 'react-native-svg';
+
+interface StoresIconProps {
+ focused: boolean;
+ size: number;
+ color: string;
+}
+
+const StoresIcon: React.FC = ({ focused, size, color }) => {
+ if (focused) {
+ // Selected state SVG (filled squares)
+ return (
+
+ );
+ } else {
+ // Unselected state SVG (outlined squares)
+ return (
+
+ );
+ }
+};
+
+export default StoresIcon;
\ No newline at end of file
diff --git a/apps/user-ui/components/registration-form.tsx b/apps/user-ui/components/registration-form.tsx
new file mode 100644
index 0000000..3f98b1f
--- /dev/null
+++ b/apps/user-ui/components/registration-form.tsx
@@ -0,0 +1,485 @@
+import React, { useState } from "react";
+import { View, TextInput, Alert } from "react-native";
+import { useForm, Controller } from "react-hook-form";
+
+import { MyButton, MyText, MyTextInput, ProfileImage, tw, BottomDialog } from "common-ui";
+import { trpc } from "@/src/trpc-client";
+
+interface RegisterFormInputs {
+ name: string;
+ email: string;
+ mobile: string;
+ password: string;
+ confirmPassword: string;
+ termsAccepted: boolean;
+ profileImageUri?: string;
+}
+
+interface RegistrationFormProps {
+ onSubmit: (data: FormData) => void | Promise;
+ isLoading?: boolean;
+ initialValues?: Partial;
+ isEdit?: boolean;
+}
+
+function RegistrationForm({ onSubmit, isLoading = false, initialValues, isEdit = false }: RegistrationFormProps) {
+ const [profileImageUri, setProfileImageUri] = useState();
+ const [profileImageFile, setProfileImageFile] = useState();
+ const [isPasswordDialogOpen, setIsPasswordDialogOpen] = useState(false);
+ const [password, setPassword] = useState('');
+ const [confirmPassword, setConfirmPassword] = useState('');
+ const updatePasswordMutation = trpc.user.auth.updatePassword.useMutation();
+
+ // Set initial profile image URI for edit mode
+ React.useEffect(() => {
+ if (isEdit && initialValues?.profileImageUri) {
+ setProfileImageUri(initialValues.profileImageUri);
+ }
+ }, [isEdit, initialValues?.profileImageUri]);
+
+ const {
+ control,
+ handleSubmit,
+ formState: { errors },
+ setError,
+ clearErrors,
+ watch,
+ } = useForm({
+ defaultValues: {
+ name: "",
+ email: "",
+ mobile: "",
+ password: "",
+ confirmPassword: "",
+ termsAccepted: false,
+ ...initialValues,
+ },
+ });
+
+
+
+ const validateMobile = (mobile: string): boolean => {
+ // Remove all non-digit characters
+ const cleanMobile = mobile.replace(/\D/g, '');
+ // Check if it's a valid Indian mobile number (10 digits, starts with 6-9)
+ return cleanMobile.length === 10 && /^[6-9]/.test(cleanMobile);
+ };
+
+ const validateEmail = (email: string): boolean => {
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
+ return emailRegex.test(email);
+ };
+
+ const handleFormSubmit = async (data: RegisterFormInputs) => {
+ clearErrors();
+
+ // Validate name
+ if (!data.name.trim()) {
+ setError("name", {
+ type: "manual",
+ message: "Name is required",
+ });
+ return;
+ }
+
+ if (data.name.trim().length < 2) {
+ setError("name", {
+ type: "manual",
+ message: "Name must be at least 2 characters",
+ });
+ return;
+ }
+
+ // Validate email
+ if (!data.email.trim()) {
+ setError("email", {
+ type: "manual",
+ message: "Email is required",
+ });
+ return;
+ }
+
+ if (!validateEmail(data.email)) {
+ setError("email", {
+ type: "manual",
+ message: "Please enter a valid email address",
+ });
+ return;
+ }
+
+ // Validate mobile number
+ if (!data.mobile.trim()) {
+ setError("mobile", {
+ type: "manual",
+ message: "Mobile number is required",
+ });
+ return;
+ }
+
+ if (!validateMobile(data.mobile)) {
+ setError("mobile", {
+ type: "manual",
+ message: "Please enter a valid 10-digit mobile number",
+ });
+ return;
+ }
+
+ // Validate password (only in registration mode)
+ if (!isEdit) {
+ if (!data.password) {
+ setError("password", {
+ type: "manual",
+ message: "Password is required",
+ });
+ return;
+ }
+
+ if (data.password.length < 6) {
+ setError("password", {
+ type: "manual",
+ message: "Password must be at least 6 characters",
+ });
+ return;
+ }
+
+ // Validate confirm password
+ if (data.password !== data.confirmPassword) {
+ setError("confirmPassword", {
+ type: "manual",
+ message: "Passwords do not match",
+ });
+ return;
+ }
+ }
+
+ // Validate terms (only in registration mode)
+ if (!isEdit && !data.termsAccepted) {
+ setError("termsAccepted", {
+ type: "manual",
+ message: "You must accept the terms and conditions",
+ });
+ return;
+ }
+
+ // Create FormData
+ const formData = new FormData();
+ formData.append('name', data.name.trim());
+ formData.append('email', data.email.trim().toLowerCase());
+ formData.append('mobile', data.mobile.replace(/\D/g, ''));
+
+ // Only include password if provided (for edit mode)
+ if (data.password) {
+ formData.append('password', data.password);
+ }
+
+ if (profileImageFile) {
+
+ formData.append('profileImage', {
+ uri: profileImageFile.uri,
+ type: profileImageFile.mimeType || 'image/jpeg',
+ name: profileImageFile.name || 'profile.jpg',
+ } as any);
+ }
+
+ await onSubmit(formData);
+ };
+
+ const handleUpdatePassword = async () => {
+ if (password !== confirmPassword) {
+ Alert.alert('Error', 'Passwords do not match');
+ return;
+ }
+ if (password.length < 6) {
+ Alert.alert('Error', 'Password must be at least 6 characters');
+ return;
+ }
+
+ try {
+ await updatePasswordMutation.mutateAsync({ password });
+ Alert.alert('Success', 'Password updated successfully');
+ setIsPasswordDialogOpen(false);
+ setPassword('');
+ setConfirmPassword('');
+ } catch (error: any) {
+ Alert.alert('Error', error.message || 'Failed to update password');
+ }
+ };
+
+ return (
+ <>
+
+
+ {
+ setProfileImageUri(uri);
+ setProfileImageFile(file);
+ }}
+ size={100}
+ editable={true}
+ />
+
+ (
+
+
+
+ )}
+ />
+ {errors.name && (
+
+ {errors.name.message}
+
+ )}
+
+ (
+
+
+
+ )}
+ />
+ {errors.email && (
+
+ {errors.email.message}
+
+ )}
+
+ (
+
+ {
+ // Format mobile number as user types
+ const clean = text.replace(/\D/g, '');
+ if (clean.length <= 10) {
+ onChange(clean);
+ }
+ }}
+ onBlur={onBlur}
+ keyboardType="phone-pad"
+ maxLength={10}
+ style={tw`bg-gray-50`}
+ error={!!errors.mobile}
+ />
+
+ )}
+ />
+ {errors.mobile && (
+
+ {errors.mobile.message}
+
+ )}
+
+ {!isEdit && (
+ <>
+ (
+
+
+
+ )}
+ />
+ {errors.password && (
+
+ {errors.password.message}
+
+ )}
+
+ (
+
+
+
+ )}
+ />
+ {errors.confirmPassword && (
+
+ {errors.confirmPassword.message}
+
+ )}
+
+ (
+
+ onChange(!value)}
+ >
+
+ {value && (
+
+ ✓
+
+ )}
+
+
+ I agree to the{" "}
+
+ Terms and Conditions
+ {" "}
+ and{" "}
+
+ Privacy Policy
+
+
+
+
+ )}
+ />
+ {errors.termsAccepted && (
+
+ {errors.termsAccepted.message}
+
+ )}
+ >
+ )}
+
+
+ {isLoading ? (isEdit ? "Updating..." : "Creating Account...") : (isEdit ? "Update Profile" : "Create Account")}
+
+
+ {isEdit && (
+
+ setIsPasswordDialogOpen(true)}
+ fillColor="brand500"
+ textColor="white1"
+ fullWidth
+ />
+
+ )}
+
+
+ {isEdit && (
+ setIsPasswordDialogOpen(false)}>
+
+
+ Update Password
+
+
+
+
+ setIsPasswordDialogOpen(false)}
+ fillColor="gray1"
+ textColor="white1"
+ />
+
+
+
+
+ )}
+ >
+ );
+}
+
+export default RegistrationForm;
\ No newline at end of file
diff --git a/apps/user-ui/components/stores/flashNavigationStore.ts b/apps/user-ui/components/stores/flashNavigationStore.ts
new file mode 100644
index 0000000..17e2e95
--- /dev/null
+++ b/apps/user-ui/components/stores/flashNavigationStore.ts
@@ -0,0 +1,13 @@
+import { create } from 'zustand';
+
+interface FlashNavigationState {
+ shouldNavigateToCart: boolean;
+ setShouldNavigateToCart: (value: boolean) => void;
+ reset: () => void;
+}
+
+export const useFlashNavigationStore = create((set) => ({
+ shouldNavigateToCart: false,
+ setShouldNavigateToCart: (value) => set({ shouldNavigateToCart: value }),
+ reset: () => set({ shouldNavigateToCart: false }),
+}));
diff --git a/apps/user-ui/components/stores/slotStore.ts b/apps/user-ui/components/stores/slotStore.ts
new file mode 100644
index 0000000..8ba258a
--- /dev/null
+++ b/apps/user-ui/components/stores/slotStore.ts
@@ -0,0 +1,15 @@
+import { create } from 'zustand';
+
+interface SlotStore {
+ slotId?: number;
+ storeId?: number;
+ setSlotId: (id?: number) => void;
+ setStoreId: (id?: number) => void;
+}
+
+export const useSlotStore = create((set) => ({
+ slotId: undefined,
+ storeId: undefined,
+ setSlotId: (slotId) => set({ slotId }),
+ setStoreId: (storeId) => set({ storeId }),
+}));
\ No newline at end of file
diff --git a/apps/user-ui/components/ui/IconSymbol.ios.tsx b/apps/user-ui/components/ui/IconSymbol.ios.tsx
new file mode 100755
index 0000000..9177f4d
--- /dev/null
+++ b/apps/user-ui/components/ui/IconSymbol.ios.tsx
@@ -0,0 +1,32 @@
+import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols';
+import { StyleProp, ViewStyle } from 'react-native';
+
+export function IconSymbol({
+ name,
+ size = 24,
+ color,
+ style,
+ weight = 'regular',
+}: {
+ name: SymbolViewProps['name'];
+ size?: number;
+ color: string;
+ style?: StyleProp;
+ weight?: SymbolWeight;
+}) {
+ return (
+
+ );
+}
diff --git a/apps/user-ui/components/ui/IconSymbol.tsx b/apps/user-ui/components/ui/IconSymbol.tsx
new file mode 100755
index 0000000..b7ece6b
--- /dev/null
+++ b/apps/user-ui/components/ui/IconSymbol.tsx
@@ -0,0 +1,41 @@
+// Fallback for using MaterialIcons on Android and web.
+
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import { SymbolWeight, SymbolViewProps } from 'expo-symbols';
+import { ComponentProps } from 'react';
+import { OpaqueColorValue, type StyleProp, type TextStyle } from 'react-native';
+
+type IconMapping = Record['name']>;
+type IconSymbolName = keyof typeof MAPPING;
+
+/**
+ * Add your SF Symbols to Material Icons mappings here.
+ * - see Material Icons in the [Icons Directory](https://icons.expo.fyi).
+ * - see SF Symbols in the [SF Symbols](https://developer.apple.com/sf-symbols/) app.
+ */
+const MAPPING = {
+ 'house.fill': 'home',
+ 'paperplane.fill': 'send',
+ 'chevron.left.forwardslash.chevron.right': 'code',
+ 'chevron.right': 'chevron-right',
+} as IconMapping;
+
+/**
+ * An icon component that uses native SF Symbols on iOS, and Material Icons on Android and web.
+ * This ensures a consistent look across platforms, and optimal resource usage.
+ * Icon `name`s are based on SF Symbols and require manual mapping to Material Icons.
+ */
+export function IconSymbol({
+ name,
+ size = 24,
+ color,
+ style,
+}: {
+ name: IconSymbolName;
+ size?: number;
+ color: string | OpaqueColorValue;
+ style?: StyleProp;
+ weight?: SymbolWeight;
+}) {
+ return ;
+}
diff --git a/apps/user-ui/components/ui/TabBarBackground.ios.tsx b/apps/user-ui/components/ui/TabBarBackground.ios.tsx
new file mode 100755
index 0000000..495b2d4
--- /dev/null
+++ b/apps/user-ui/components/ui/TabBarBackground.ios.tsx
@@ -0,0 +1,19 @@
+import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
+import { BlurView } from 'expo-blur';
+import { StyleSheet } from 'react-native';
+
+export default function BlurTabBarBackground() {
+ return (
+
+ );
+}
+
+export function useBottomTabOverflow() {
+ return useBottomTabBarHeight();
+}
diff --git a/apps/user-ui/components/ui/TabBarBackground.tsx b/apps/user-ui/components/ui/TabBarBackground.tsx
new file mode 100755
index 0000000..70d1c3c
--- /dev/null
+++ b/apps/user-ui/components/ui/TabBarBackground.tsx
@@ -0,0 +1,6 @@
+// This is a shim for web and Android where the tab bar is generally opaque.
+export default undefined;
+
+export function useBottomTabOverflow() {
+ return 0;
+}
diff --git a/apps/user-ui/constants/Colors.ts b/apps/user-ui/constants/Colors.ts
new file mode 100755
index 0000000..14e6784
--- /dev/null
+++ b/apps/user-ui/constants/Colors.ts
@@ -0,0 +1,26 @@
+/**
+ * Below are the colors that are used in the app. The colors are defined in the light and dark mode.
+ * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
+ */
+
+const tintColorLight = '#0a7ea4';
+const tintColorDark = '#fff';
+
+export const Colors = {
+ light: {
+ text: '#11181C',
+ background: '#fff',
+ tint: tintColorLight,
+ icon: '#687076',
+ tabIconDefault: '#687076',
+ tabIconSelected: tintColorLight,
+ },
+ dark: {
+ text: '#ECEDEE',
+ background: '#151718',
+ tint: tintColorDark,
+ icon: '#9BA1A6',
+ tabIconDefault: '#9BA1A6',
+ tabIconSelected: tintColorDark,
+ },
+};
diff --git a/apps/user-ui/eas.json b/apps/user-ui/eas.json
new file mode 100755
index 0000000..a9e57d3
--- /dev/null
+++ b/apps/user-ui/eas.json
@@ -0,0 +1,24 @@
+{
+ "cli": {
+ "version": ">= 16.17.4",
+ "appVersionSource": "remote"
+ },
+ "build": {
+ "development": {
+ "developmentClient": true,
+ "distribution": "internal",
+ "channel": "development"
+ },
+ "preview": {
+ "channel": "preview",
+ "autoIncrement": true
+ },
+ "production": {
+ "autoIncrement": true,
+ "channel": "production"
+ }
+ },
+ "submit": {
+ "production": {}
+ }
+}
diff --git a/apps/user-ui/eslint.config.js b/apps/user-ui/eslint.config.js
new file mode 100755
index 0000000..5025da6
--- /dev/null
+++ b/apps/user-ui/eslint.config.js
@@ -0,0 +1,10 @@
+// https://docs.expo.dev/guides/using-eslint/
+const { defineConfig } = require('eslint/config');
+const expoConfig = require('eslint-config-expo/flat');
+
+module.exports = defineConfig([
+ expoConfig,
+ {
+ ignores: ['dist/*'],
+ },
+]);
diff --git a/apps/user-ui/hooks/cart-query-hooks.tsx b/apps/user-ui/hooks/cart-query-hooks.tsx
new file mode 100644
index 0000000..8480897
--- /dev/null
+++ b/apps/user-ui/hooks/cart-query-hooks.tsx
@@ -0,0 +1,501 @@
+import { trpc } from '@/src/trpc-client';
+import { Alert } from 'react-native';
+import { useState, useEffect } from 'react';
+import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
+import { StorageServiceCasual } from 'common-ui/src/services/StorageServiceCasual';
+
+// Cart type definition
+export type CartType = "regular" | "flash";
+
+// const CART_MODE: 'remote' | 'local' = 'remote';
+const CART_MODE: 'remote' | 'local' = 'local';
+
+const getCartStorageKey = (cartType: CartType = "regular"): string => {
+ return cartType === "flash" ? "flash_cart_items" : "cart_items";
+};
+
+interface LocalCartItem {
+ id: number;
+ productId: number;
+ quantity: number;
+ slotId: number;
+ addedAt: string;
+}
+
+interface ProductSummary {
+ id: number;
+ name: string;
+ price: number;
+ unit: string;
+ isOutOfStock: boolean;
+ images: string[];
+ incrementStep?: number;
+}
+
+interface CartItem {
+ id: number;
+ productId: number;
+ quantity: number;
+ addedAt: string;
+ product: ProductSummary;
+ subtotal: number;
+}
+
+const getLocalCart = async (cartType: CartType = "regular"): Promise => {
+ const key = getCartStorageKey(cartType);
+ const data = await StorageServiceCasual.getItem(key);
+ return data ? JSON.parse(data) : [];
+};
+
+const saveLocalCart = async (items: LocalCartItem[], cartType: CartType = "regular"): Promise => {
+ const key = getCartStorageKey(cartType);
+ await StorageServiceCasual.setItem(key, JSON.stringify(items));
+ const fetchedItems = await getLocalCart(cartType);
+
+};
+
+const getNextCartItemId = (items: LocalCartItem[]): number => {
+ const maxId = items.length > 0 ? Math.max(...items.map(item => item.id)) : 0;
+ return maxId + 1;
+};
+
+const addToLocalCart = async (productId: number, quantity: number, slotId?: number, cartType: CartType = "regular"): Promise => {
+
+ const items = await getLocalCart(cartType);
+ const existingIndex = items.findIndex(item => item.productId === productId);
+
+ if (existingIndex >= 0) {
+ items[existingIndex].quantity += quantity;
+ if (slotId !== undefined) {
+ items[existingIndex].slotId = slotId;
+ }
+ } else {
+ const newId = getNextCartItemId(items);
+ const cartItem = {
+ id: newId,
+ productId,
+ quantity,
+ slotId: slotId ?? 0, // Default to 0 if not provided
+ addedAt: new Date().toISOString(),
+ }
+
+ items.push(cartItem);
+ }
+
+ await saveLocalCart(items, cartType);
+ return items;
+};
+
+const updateLocalCartItem = async (itemId: number, quantity: number, cartType: CartType = "regular"): Promise => {
+ const items = await getLocalCart(cartType);
+ const item = items.find(i => i.id === itemId);
+ if (item) {
+ item.quantity = quantity;
+ await saveLocalCart(items, cartType);
+ }
+ return items;
+};
+
+const removeFromLocalCart = async (itemId: number, cartType: CartType = "regular"): Promise => {
+ const items = await getLocalCart(cartType);
+ const filtered = items.filter(i => i.id !== itemId);
+ await saveLocalCart(filtered, cartType);
+ return filtered;
+};
+
+const clearLocalCart = async (cartType: CartType = "regular"): Promise => {
+ const key = getCartStorageKey(cartType);
+ await StorageServiceCasual.setItem(key, JSON.stringify([]));
+};
+
+export function useGetCart(options?: {
+ refetchOnWindowFocus?: boolean;
+ enabled?: boolean;
+}, cartType: CartType = "regular") {
+ if (CART_MODE === 'remote') {
+ const query = trpc.user.cart.getCart.useQuery(undefined, {
+ refetchOnWindowFocus: options?.refetchOnWindowFocus ?? true,
+ enabled: options?.enabled ?? true,
+ ...options
+ });
+
+ return {
+ // Original tRPC returns
+ data: query.data,
+ isLoading: query.isLoading,
+ error: query.error,
+ refetch: query.refetch,
+
+ // Computed properties
+ cartItems: query.data?.items || [],
+ totalItems: query.data?.totalItems || 0,
+ totalPrice: query.data?.totalAmount || 0,
+
+ // Helper methods
+ isEmpty: !query.data?.items?.length,
+ hasItems: Boolean(query.data?.items?.length),
+ };
+ } else {
+
+ const { data: products } = trpc.user.product.getAllProductsSummary.useQuery();
+ const query = useQuery({
+ queryKey: [`local-cart-${cartType}`],
+ queryFn: async () => {
+
+ const cartItems = await getLocalCart(cartType);
+
+ // const productMap = Object.fromEntries(products?.map((p: ProductSummary) => [p.id, p]) || []);
+ const productMap = Object.fromEntries(products?.map((p) => [p.id, p]) || []);
+
+ const items: CartItem[] = cartItems.map(cartItem => {
+ const product = productMap[cartItem.productId];
+
+ if (!product) return null as any;
+ return {
+ id: cartItem.id,
+ productId: cartItem.productId,
+ quantity: cartItem.quantity,
+ addedAt: cartItem.addedAt,
+ product,
+ incrementStep: product.incrementStep,
+ subtotal: Number(product.price) * cartItem.quantity,
+ slotId: cartItem.slotId,
+ };
+ }).filter(Boolean) as CartItem[];
+ const totalAmount = items.reduce((sum, item) => sum + item.subtotal, 0);
+
+ return {
+ items,
+ totalItems: items.length,
+ totalAmount,
+ };
+ },
+ refetchOnWindowFocus: options?.refetchOnWindowFocus ?? true,
+ enabled: (options?.enabled ?? true) && !!products,
+ });
+
+ return {
+ data: query.data,
+ isLoading: query.isLoading,
+ error: query.error,
+ refetch: query.refetch,
+
+ // Computed properties
+ cartItems: query.data?.items || [],
+ totalItems: query.data?.totalItems || 0,
+ totalPrice: query.data?.totalAmount || 0,
+
+ // Helper methods
+ isEmpty: !query.data?.items?.length,
+ hasItems: Boolean(query.data?.items?.length),
+ };
+ }
+}
+
+interface UseAddToCartReturn {
+ mutate: any;
+ mutateAsync: any;
+ isLoading: boolean;
+ error: any;
+ data: any;
+ addToCart: (productId: number, quantity?: number, slotId?: number, onSettled?: (data: any, error: any) => void) => void;
+ addToCartAsync: (productId: number, quantity?: number, slotId?: number) => Promise;
+}
+
+export function useAddToCart(options?: {
+ onSuccess?: (data: any, variables: any) => void;
+ onError?: (error: any) => void;
+ showSuccessAlert?: boolean;
+ showErrorAlert?: boolean;
+ refetchCart?: boolean;
+}, cartType: CartType = "regular"): UseAddToCartReturn {
+ if (CART_MODE === 'remote') {
+ const utils = trpc.useUtils();
+
+ const mutation = trpc.user.cart.addToCart.useMutation({
+ onSuccess: (data, variables) => {
+ // Default success handling
+ if (options?.showSuccessAlert !== false) {
+ Alert.alert("Success", "Item added to cart!");
+ }
+
+ // Auto-refetch cart if requested
+ if (options?.refetchCart) {
+ utils.user.cart.getCart.invalidate();
+ }
+
+ // Custom success callback
+ options?.onSuccess?.(data, variables);
+ },
+ onError: (error) => {
+ // Default error handling
+ if (options?.showErrorAlert !== false) {
+ Alert.alert("Error", error.message || "Failed to add item to cart");
+ }
+
+ // Custom error callback
+ options?.onError?.(error);
+ },
+ }) as any;
+
+ const addToCart = (productId: number, quantity = 1, slotId?: number, onSettled?: (data: any, error: any) => void) => {
+
+ if (slotId == null) {
+ throw new Error('slotId is required for adding to cart');
+ }
+ return mutation.mutate({ productId, quantity, slotId }, {
+ onSettled: (data: any, error: any) => {
+ onSettled?.(data, error);
+ }
+ });
+ };
+
+ return {
+ // Original mutation returns
+ mutate: mutation.mutate,
+ mutateAsync: mutation.mutateAsync,
+ isLoading: mutation.isPending,
+ error: mutation.error,
+ data: mutation.data,
+
+ addToCart,
+
+ addToCartAsync: (productId: number, quantity = 1, slotId?: number) => {
+ if (slotId == null) {
+ throw new Error('slotId is required for adding to cart');
+ }
+ return mutation.mutateAsync({ productId, quantity, slotId });
+ },
+ };
+ } else {
+
+ const queryClient = useQueryClient();
+
+ const mutation = useMutation({
+ mutationFn: async ({ productId, quantity, slotId }: { productId: number, quantity: number, slotId: number }) => {
+ return await addToLocalCart(productId, quantity, slotId, cartType);
+ },
+ onSuccess: (data, variables) => {
+ queryClient.invalidateQueries({ queryKey: [`local-cart-${cartType}`] });
+ if (options?.showSuccessAlert !== false) {
+ Alert.alert("Success", "Item added to cart!");
+ }
+ options?.onSuccess?.(data, variables);
+ },
+ onError: (error) => {
+ if (options?.showErrorAlert !== false) {
+ Alert.alert("Error", error.message || "Failed to add item to cart");
+ }
+ options?.onError?.(error);
+ },
+ });
+
+ const addToCart = (productId: number, quantity = 1, slotId?: number, onSettled?: (data: any, error: any) => void) => {
+
+ if (slotId == null) {
+ throw new Error('slotId is required for adding to cart');
+ }
+ return mutation.mutate({ productId, quantity, slotId }, {
+ onSettled: (data: any, error: any) => {
+ onSettled?.(data, error);
+ }
+ });
+ };
+
+ return {
+ mutate: mutation.mutate,
+ mutateAsync: mutation.mutateAsync,
+ isLoading: mutation.isPending,
+ error: mutation.error,
+ data: mutation.data,
+ addToCart,
+ addToCartAsync: (productId: number, quantity = 1, slotId?: number) => {
+ if (slotId == null) {
+ throw new Error('slotId is required for adding to cart');
+ }
+ return mutation.mutateAsync({ productId, quantity, slotId });
+ },
+ };
+ }
+}
+
+export function useUpdateCartItem(options?: {
+ onSuccess?: (data: any, variables: any) => void;
+ onError?: (error: any) => void;
+ showSuccessAlert?: boolean;
+ showErrorAlert?: boolean;
+ refetchCart?: boolean;
+}, cartType: CartType = "regular") {
+ if (CART_MODE === 'remote') {
+ const utils = trpc.useUtils();
+
+ const mutation = trpc.user.cart.updateCartItem.useMutation({
+ onSuccess: (data, variables) => {
+ // Default success handling
+ if (options?.showSuccessAlert !== false) {
+ Alert.alert("Success", "Cart item updated!");
+ }
+
+ // Auto-refetch cart if requested
+ if (options?.refetchCart) {
+ utils.user.cart.getCart.invalidate();
+ }
+
+ // Custom success callback
+ options?.onSuccess?.(data, variables);
+ },
+ onError: (error) => {
+ // Default error handling
+ if (options?.showErrorAlert !== false) {
+ Alert.alert("Error", error.message || "Failed to update cart item");
+ }
+
+ // Custom error callback
+ options?.onError?.(error);
+ },
+ });
+
+ return {
+ // Original mutation returns
+ mutate: mutation.mutate,
+ mutateAsync: mutation.mutateAsync,
+ isLoading: mutation.isPending,
+ error: mutation.error,
+ data: mutation.data,
+
+ // Helper methods
+ updateCartItem: (itemId: number, quantity: number) =>
+ mutation.mutate({ itemId, quantity }),
+
+ updateCartItemAsync: (itemId: number, quantity: number) =>
+ mutation.mutateAsync({ itemId, quantity }),
+ };
+ } else {
+ const queryClient = useQueryClient();
+
+ const mutation = useMutation({
+ mutationFn: async ({ itemId, quantity }: { itemId: number, quantity: number }) => {
+ return await updateLocalCartItem(itemId, quantity, cartType);
+ },
+ onSuccess: (data, variables) => {
+ queryClient.invalidateQueries({ queryKey: [`local-cart-${cartType}`] });
+ if (options?.showSuccessAlert !== false) {
+ Alert.alert("Success", "Cart item updated!");
+ }
+ options?.onSuccess?.(data, variables);
+ },
+ onError: (error) => {
+ if (options?.showErrorAlert !== false) {
+ Alert.alert("Error", error.message || "Failed to update cart item");
+ }
+ options?.onError?.(error);
+ },
+ });
+
+ return {
+ mutate: mutation.mutate,
+ mutateAsync: mutation.mutateAsync,
+ isLoading: mutation.isPending,
+ error: mutation.error,
+ data: mutation.data,
+
+ updateCartItem: (itemId: number, quantity: number) =>
+ mutation.mutate({ itemId, quantity }),
+
+ updateCartItemAsync: (itemId: number, quantity: number) =>
+ mutation.mutateAsync({ itemId, quantity }),
+ };
+ }
+}
+
+export function useRemoveFromCart(options?: {
+ onSuccess?: (data: any, variables: any) => void;
+ onError?: (error: any) => void;
+ showSuccessAlert?: boolean;
+ showErrorAlert?: boolean;
+ refetchCart?: boolean;
+}, cartType: CartType = "regular") {
+ if (CART_MODE === 'remote') {
+ const utils = trpc.useUtils();
+
+ const mutation = trpc.user.cart.removeFromCart.useMutation({
+ onSuccess: (data, variables) => {
+ // Default success handling
+ if (options?.showSuccessAlert !== false) {
+ Alert.alert("Success", "Item removed from cart!");
+ }
+
+ // Auto-refetch cart if requested
+ if (options?.refetchCart) {
+ utils.user.cart.getCart.invalidate();
+ }
+
+ // Custom success callback
+ options?.onSuccess?.(data, variables);
+ },
+ onError: (error) => {
+ // Default error handling
+ if (options?.showErrorAlert !== false) {
+ Alert.alert("Error", error.message || "Failed to remove item from cart");
+ }
+
+ // Custom error callback
+ options?.onError?.(error);
+ },
+ });
+
+ return {
+ // Original mutation returns
+ mutate: mutation.mutate,
+ mutateAsync: mutation.mutateAsync,
+ isLoading: mutation.isPending,
+ error: mutation.error,
+ data: mutation.data,
+
+ // Helper methods
+ removeFromCart: (itemId: number) =>
+ mutation.mutate({ itemId }),
+
+ removeFromCartAsync: (itemId: number) =>
+ mutation.mutateAsync({ itemId }),
+ };
+ } else {
+ const queryClient = useQueryClient();
+
+ const mutation = useMutation({
+ mutationFn: async ({ itemId }: { itemId: number }) => {
+ return await removeFromLocalCart(itemId, cartType);
+ },
+ onSuccess: (data, variables) => {
+ queryClient.invalidateQueries({ queryKey: [`local-cart-${cartType}`] });
+ if (options?.showSuccessAlert !== false) {
+ Alert.alert("Success", "Item removed from cart!");
+ }
+ options?.onSuccess?.(data, variables);
+ },
+ onError: (error) => {
+ if (options?.showErrorAlert !== false) {
+ Alert.alert("Error", error.message || "Failed to remove item from cart");
+ }
+ options?.onError?.(error);
+ },
+ });
+
+ return {
+ mutate: mutation.mutate,
+ mutateAsync: mutation.mutateAsync,
+ isLoading: mutation.isPending,
+ error: mutation.error,
+ data: mutation.data,
+
+ removeFromCart: (itemId: number) =>
+ mutation.mutate({ itemId }),
+
+ removeFromCartAsync: (itemId: number) =>
+ mutation.mutateAsync({ itemId }),
+ };
+ }
+}
+
+// Export clear cart function for direct use
+export { clearLocalCart };
\ No newline at end of file
diff --git a/apps/user-ui/hooks/useAuthenticatedRoute.ts b/apps/user-ui/hooks/useAuthenticatedRoute.ts
new file mode 100644
index 0000000..d8e750d
--- /dev/null
+++ b/apps/user-ui/hooks/useAuthenticatedRoute.ts
@@ -0,0 +1,55 @@
+import { useFocusEffect } from '@react-navigation/native';
+import { useRouter } from 'expo-router';
+import { useAuth } from '@/src/contexts/AuthContext';
+import { StorageServiceCasual } from 'common-ui';
+import constants from '@/src/constants';
+
+interface AuthenticatedRouteOptions {
+ targetUrl?: string;
+ queryParams?: Record;
+}
+
+interface RedirectState {
+ targetUrl: string;
+ queryParams: Record;
+ timestamp: number;
+}
+
+export function useAuthenticatedRoute(options: AuthenticatedRouteOptions = {}) {
+ const { isAuthenticated, isLoading } = useAuth();
+ const router = useRouter();
+
+ console.log({ops: options.queryParams})
+
+ useFocusEffect(() => {
+ // Don't redirect while auth is loading
+ if (isLoading) return;
+
+ // If user is authenticated, no need to do anything
+ if (isAuthenticated) return;
+
+ // User is not authenticated, store redirect state and navigate to login
+ const redirectState: RedirectState = {
+ targetUrl: options.targetUrl || '/',
+ queryParams: options.queryParams || {},
+ timestamp: Date.now(),
+ };
+
+ // Store the redirect state
+ StorageServiceCasual.setItem(constants.AUTH_REDIRECT_KEY, JSON.stringify(redirectState))
+ .then(() => {
+ // Navigate to login page (push to keep original route in stack)
+ router.push('/(auth)/login');
+ })
+ .catch((error) => {
+ console.error('Failed to store redirect state:', error);
+ // Still navigate to login even if storage fails
+ router.push('/(auth)/login');
+ });
+ });
+
+ return {
+ isAuthenticated,
+ isLoading,
+ };
+}
\ No newline at end of file
diff --git a/apps/user-ui/hooks/useColorScheme.ts b/apps/user-ui/hooks/useColorScheme.ts
new file mode 100755
index 0000000..17e3c63
--- /dev/null
+++ b/apps/user-ui/hooks/useColorScheme.ts
@@ -0,0 +1 @@
+export { useColorScheme } from 'react-native';
diff --git a/apps/user-ui/hooks/useColorScheme.web.ts b/apps/user-ui/hooks/useColorScheme.web.ts
new file mode 100755
index 0000000..7eb1c1b
--- /dev/null
+++ b/apps/user-ui/hooks/useColorScheme.web.ts
@@ -0,0 +1,21 @@
+import { useEffect, useState } from 'react';
+import { useColorScheme as useRNColorScheme } from 'react-native';
+
+/**
+ * To support static rendering, this value needs to be re-calculated on the client side for web
+ */
+export function useColorScheme() {
+ const [hasHydrated, setHasHydrated] = useState(false);
+
+ useEffect(() => {
+ setHasHydrated(true);
+ }, []);
+
+ const colorScheme = useRNColorScheme();
+
+ if (hasHydrated) {
+ return colorScheme;
+ }
+
+ return 'light';
+}
diff --git a/apps/user-ui/hooks/useCurrentUserId.ts b/apps/user-ui/hooks/useCurrentUserId.ts
new file mode 100755
index 0000000..7f92190
--- /dev/null
+++ b/apps/user-ui/hooks/useCurrentUserId.ts
@@ -0,0 +1,13 @@
+import React, { useEffect, useState } from 'react';
+import { getCurrentUserId } from '@/utils/getCurrentUserId';
+
+export function useCurrentUserId(): {userId:number|null, refetchUserId: () => void} {
+ const [userId, setUserId] = useState(null);
+ const refetchUserId = React.useCallback(() => {
+ getCurrentUserId().then(setUserId);
+ },[])
+ useEffect(() => {
+ getCurrentUserId().then(setUserId);
+ }, []);
+ return {userId,refetchUserId};
+}
diff --git a/apps/user-ui/hooks/useHideDrawerHeader.ts b/apps/user-ui/hooks/useHideDrawerHeader.ts
new file mode 100755
index 0000000..c277ec2
--- /dev/null
+++ b/apps/user-ui/hooks/useHideDrawerHeader.ts
@@ -0,0 +1,26 @@
+import { useFocusEffect, useNavigation } from "expo-router";
+import React from "react";
+
+
+function useHideDrawerHeader() {
+
+ const navigation = useNavigation();
+ useFocusEffect(() => {
+ let drawerNav = navigation.getParent();
+ const drawerNavList:any = [];
+ // Collect all parent navigators
+ while (drawerNav) {
+ drawerNavList.push(drawerNav);
+ drawerNav = drawerNav.getParent();
+ }
+
+ drawerNavList.at(-3)?.setOptions({ headerShown: false });
+
+ return () => {
+ drawerNavList.at(-3)?.setOptions({ headerShown: true });
+ };
+ });
+ return null;
+}
+
+export default useHideDrawerHeader;
diff --git a/apps/user-ui/hooks/useJWT.ts b/apps/user-ui/hooks/useJWT.ts
new file mode 100755
index 0000000..33e742b
--- /dev/null
+++ b/apps/user-ui/hooks/useJWT.ts
@@ -0,0 +1,49 @@
+// import { StorageService } from '@/lib/StorageService';
+import {StorageService} from 'common-ui';
+
+export const AUTH_TOKEN_KEY = 'authToken';
+export const ROLES_KEY = 'user_roles';
+export const USER_ID_KEY = 'userId';
+
+export async function saveUserId(userId:string) {
+ await StorageService.setItem(USER_ID_KEY, userId);
+}
+
+export async function getUserId() {
+ return await StorageService.getItem(USER_ID_KEY);
+}
+
+export async function saveAuthToken(token: string) {
+ await StorageService.setItem(AUTH_TOKEN_KEY, token);
+}
+
+export async function getAuthToken() {
+ return await StorageService.getItem(AUTH_TOKEN_KEY);
+}
+
+export async function deleteAuthToken() {
+ await StorageService.removeItem(AUTH_TOKEN_KEY);
+}
+
+export async function saveRoles(roles: string[]) {
+ await StorageService.setItem(ROLES_KEY, JSON.stringify(roles));
+}
+
+export async function getRoles(): Promise {
+ const token = await getAuthToken();
+ if (!token) {
+ StorageService.removeItem(ROLES_KEY);
+ return null;
+ }
+ const rolesStr = await StorageService.getItem(ROLES_KEY);
+ if (!rolesStr) return null;
+ try {
+ return JSON.parse(rolesStr);
+ } catch {
+ return null;
+ }
+}
+
+export async function deleteRoles() {
+ await StorageService.removeItem(ROLES_KEY);
+}
diff --git a/apps/user-ui/hooks/usePhonepeSdk.ts b/apps/user-ui/hooks/usePhonepeSdk.ts
new file mode 100755
index 0000000..2ec5276
--- /dev/null
+++ b/apps/user-ui/hooks/usePhonepeSdk.ts
@@ -0,0 +1,34 @@
+
+import { useEffect } from 'react';
+import PhonePePaymentSDK from 'react-native-phonepe-pg';
+
+export function usePhonepeSdk() {
+ // const { data: creds, isLoading, isError } = usePhonepeCreds();
+ const creds: any = {};
+ const isError = false;
+ const isLoading = false;
+
+ useEffect(() => {
+ if (creds && creds.clientId && creds.clientVersion) {
+ PhonePePaymentSDK.init('SANDBOX', creds.clientId, creds.clientId, true);
+ }
+ }, [creds]);
+
+ const startTransaction = async (orderId: string, token: string) => {
+ try {
+ const request = {
+ orderId,
+ token,
+ merchantId: creds?.merchantId,
+ paymentMode: { type: 'PAY_PAGE' }
+ };
+ const stringReq = JSON.stringify(request);
+ const response = await PhonePePaymentSDK.startTransaction(stringReq, null);
+ return response;
+ } catch (error) {
+ throw error;
+ }
+ };
+
+ return { startTransaction, isLoading, isError, creds };
+}
diff --git a/apps/user-ui/hooks/useProductSlotIdentifier.ts b/apps/user-ui/hooks/useProductSlotIdentifier.ts
new file mode 100644
index 0000000..6a781ac
--- /dev/null
+++ b/apps/user-ui/hooks/useProductSlotIdentifier.ts
@@ -0,0 +1,48 @@
+import { trpc } from '@/src/trpc-client';
+import dayjs from 'dayjs';
+
+export function useProductSlotIdentifier() {
+ // Fetch all slots with products
+ const { data: slotsData } = trpc.user.slots.getSlotsWithProducts.useQuery();
+
+ const productSlotsMap = new Map();
+
+ if (slotsData?.slots) {
+ const now = dayjs();
+
+ // Build map of productId to available slot IDs
+ slotsData.slots.forEach(slot => {
+ if (dayjs(slot.deliveryTime).isAfter(now)) {
+ slot.products.forEach(product => {
+ if (!productSlotsMap.has(product.id)) {
+ productSlotsMap.set(product.id, []);
+ }
+ productSlotsMap.get(product.id)!.push(slot.id);
+ });
+ }
+ });
+ }
+
+ const getQuickestSlot = (productId: number): number | null => {
+ if (!slotsData?.slots) return null;
+
+ const now = dayjs();
+
+ // Find slots that contain this product and have future delivery time
+ const availableSlots = slotsData.slots.filter(slot =>
+ slot.products.some(product => product.id === productId) &&
+ dayjs(slot.deliveryTime).isAfter(now)
+ );
+
+ if (availableSlots.length === 0) return null;
+
+ // Return earliest slot ID (sorted by delivery time)
+ const earliestSlot = availableSlots.sort((a, b) =>
+ dayjs(a.deliveryTime).diff(dayjs(b.deliveryTime))
+ )[0];
+
+ return earliestSlot.id;
+ };
+
+ return { getQuickestSlot, productSlotsMap };
+}
\ No newline at end of file
diff --git a/apps/user-ui/hooks/useThemeColor.ts b/apps/user-ui/hooks/useThemeColor.ts
new file mode 100755
index 0000000..0608e73
--- /dev/null
+++ b/apps/user-ui/hooks/useThemeColor.ts
@@ -0,0 +1,21 @@
+/**
+ * Learn more about light and dark modes:
+ * https://docs.expo.dev/guides/color-schemes/
+ */
+
+import { Colors } from '@/constants/Colors';
+import { useColorScheme } from '@/hooks/useColorScheme';
+
+export function useThemeColor(
+ props: { light?: string; dark?: string },
+ colorName: keyof typeof Colors.light & keyof typeof Colors.dark
+) {
+ const theme = useColorScheme() ?? 'light';
+ const colorFromProps = props[theme];
+
+ if (colorFromProps) {
+ return colorFromProps;
+ } else {
+ return Colors[theme][colorName];
+ }
+}
diff --git a/apps/user-ui/metro.config.js b/apps/user-ui/metro.config.js
new file mode 100755
index 0000000..fbbf1eb
--- /dev/null
+++ b/apps/user-ui/metro.config.js
@@ -0,0 +1,6 @@
+// Learn more on how to setup config for the app: https://docs.expo.dev/guides/config-plugins/#metro-config
+const { getDefaultConfig } = require('expo/metro-config');
+
+const config = getDefaultConfig(__dirname);
+
+module.exports = config;
diff --git a/apps/user-ui/package-lock.json b/apps/user-ui/package-lock.json
new file mode 100644
index 0000000..3821a2a
--- /dev/null
+++ b/apps/user-ui/package-lock.json
@@ -0,0 +1,6 @@
+{
+ "name": "user-ui",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {}
+}
diff --git a/apps/user-ui/package.json b/apps/user-ui/package.json
new file mode 100644
index 0000000..026136f
--- /dev/null
+++ b/apps/user-ui/package.json
@@ -0,0 +1,81 @@
+{
+ "name": "user-ui",
+ "main": "expo-router/entry",
+ "version": "1.0.0",
+ "scripts": {
+ "start": "expo start",
+ "reset-project": "node ./scripts/reset-project.js",
+ "android": "expo run:android",
+ "ios": "expo run:ios",
+ "web": "expo start --web",
+ "lint": "expo lint"
+ },
+ "dependencies": {
+ "@expo/vector-icons": "^14.1.0",
+ "@react-native-community/datetimepicker": "8.4.1",
+ "@react-native-google-signin/google-signin": "^16.0.0",
+ "@react-native-picker/picker": "2.11.1",
+ "@react-navigation/bottom-tabs": "^7.3.10",
+ "@react-navigation/drawer": "^7.3.9",
+ "@react-navigation/elements": "^2.3.8",
+ "@react-navigation/native": "^7.1.6",
+ "@tanstack/react-query": "^5.85.9",
+ "@trpc/client": "^11.6.0",
+ "@trpc/react-query": "^11.6.0",
+ "axios": "^1.11.0",
+ "buffer": "^6.0.3",
+ "dayjs": "^1.11.18",
+ "expo": "~53.0.22",
+ "expo-blur": "~14.1.5",
+ "expo-constants": "~17.1.7",
+ "expo-crypto": "~14.1.5",
+ "expo-device": "~7.1.4",
+ "expo-document-picker": "~13.1.6",
+ "expo-font": "~13.3.2",
+ "expo-haptics": "~14.1.4",
+ "expo-image": "2.4.1",
+ "expo-image-picker": "~16.1.4",
+ "expo-linear-gradient": "~14.1.5",
+ "expo-linking": "~7.1.7",
+ "expo-location": "~18.1.6",
+ "expo-notifications": "~0.31.4",
+ "expo-router": "~5.1.5",
+ "expo-secure-store": "~14.2.4",
+ "expo-splash-screen": "~0.30.10",
+ "expo-status-bar": "~2.2.3",
+ "expo-symbols": "~0.4.5",
+ "expo-system-ui": "~5.0.11",
+ "expo-updates": "~0.28.17",
+ "expo-web-browser": "~14.2.0",
+ "formik": "^2.4.6",
+ "jwt-decode": "^4.0.0",
+ "react": "19.0.0",
+ "react-dom": "19.0.0",
+ "react-hook-form": "^7.62.0",
+ "react-native": "0.79.6",
+ "react-native-element-dropdown": "^2.12.4",
+ "react-native-gesture-handler": "~2.24.0",
+ "react-native-pager-view": "6.7.1",
+ "react-native-paper": "^5.14.5",
+ "react-native-razorpay": "^2.3.1",
+ "react-native-reanimated": "~3.17.4",
+ "react-native-safe-area-context": "5.4.0",
+ "react-native-screens": "~4.11.1",
+ "react-native-svg": "15.11.2",
+ "react-native-tab-view": "^4.1.3",
+ "react-native-toast-message": "^2.3.3",
+ "react-native-web": "~0.20.0",
+ "react-native-webview": "13.13.5",
+ "twrnc": "^4.9.1",
+ "yup": "^1.7.0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.25.2",
+ "@types/react": "~19.0.10",
+ "@types/react-native-razorpay": "^2.2.6",
+ "eslint": "^9.25.0",
+ "eslint-config-expo": "~9.2.0",
+ "typescript": "~5.8.3"
+ },
+ "private": true
+}
diff --git a/apps/user-ui/scripts/reset-project.js b/apps/user-ui/scripts/reset-project.js
new file mode 100755
index 0000000..51dff15
--- /dev/null
+++ b/apps/user-ui/scripts/reset-project.js
@@ -0,0 +1,112 @@
+#!/usr/bin/env node
+
+/**
+ * This script is used to reset the project to a blank state.
+ * It deletes or moves the /app, /components, /hooks, /scripts, and /constants directories to /app-example based on user input and creates a new /app directory with an index.tsx and _layout.tsx file.
+ * You can remove the `reset-project` script from package.json and safely delete this file after running it.
+ */
+
+const fs = require("fs");
+const path = require("path");
+const readline = require("readline");
+
+const root = process.cwd();
+const oldDirs = ["app", "components", "hooks", "constants", "scripts"];
+const exampleDir = "app-example";
+const newAppDir = "app";
+const exampleDirPath = path.join(root, exampleDir);
+
+const indexContent = `import { Text, View } from "react-native";
+
+export default function Index() {
+ return (
+
+ Edit app/index.tsx to edit this screen.
+
+ );
+}
+`;
+
+const layoutContent = `import { Stack } from "expo-router";
+
+export default function RootLayout() {
+ return ;
+}
+`;
+
+const rl = readline.createInterface({
+ input: process.stdin,
+ output: process.stdout,
+});
+
+const moveDirectories = async (userInput) => {
+ try {
+ if (userInput === "y") {
+ // Create the app-example directory
+ await fs.promises.mkdir(exampleDirPath, { recursive: true });
+ console.log(`📁 /${exampleDir} directory created.`);
+ }
+
+ // Move old directories to new app-example directory or delete them
+ for (const dir of oldDirs) {
+ const oldDirPath = path.join(root, dir);
+ if (fs.existsSync(oldDirPath)) {
+ if (userInput === "y") {
+ const newDirPath = path.join(root, exampleDir, dir);
+ await fs.promises.rename(oldDirPath, newDirPath);
+ console.log(`➡️ /${dir} moved to /${exampleDir}/${dir}.`);
+ } else {
+ await fs.promises.rm(oldDirPath, { recursive: true, force: true });
+ console.log(`❌ /${dir} deleted.`);
+ }
+ } else {
+ console.log(`➡️ /${dir} does not exist, skipping.`);
+ }
+ }
+
+ // Create new /app directory
+ const newAppDirPath = path.join(root, newAppDir);
+ await fs.promises.mkdir(newAppDirPath, { recursive: true });
+ console.log("\n📁 New /app directory created.");
+
+ // Create index.tsx
+ const indexPath = path.join(newAppDirPath, "index.tsx");
+ await fs.promises.writeFile(indexPath, indexContent);
+ console.log("📄 app/index.tsx created.");
+
+ // Create _layout.tsx
+ const layoutPath = path.join(newAppDirPath, "_layout.tsx");
+ await fs.promises.writeFile(layoutPath, layoutContent);
+ console.log("📄 app/_layout.tsx created.");
+
+ console.log("\n✅ Project reset complete. Next steps:");
+ console.log(
+ `1. Run \`npx expo start\` to start a development server.\n2. Edit app/index.tsx to edit the main screen.${
+ userInput === "y"
+ ? `\n3. Delete the /${exampleDir} directory when you're done referencing it.`
+ : ""
+ }`
+ );
+ } catch (error) {
+ console.error(`❌ Error during script execution: ${error.message}`);
+ }
+};
+
+rl.question(
+ "Do you want to move existing files to /app-example instead of deleting them? (Y/n): ",
+ (answer) => {
+ const userInput = answer.trim().toLowerCase() || "y";
+ if (userInput === "y" || userInput === "n") {
+ moveDirectories(userInput).finally(() => rl.close());
+ } else {
+ console.log("❌ Invalid input. Please enter 'Y' or 'N'.");
+ rl.close();
+ }
+ }
+);
diff --git a/apps/user-ui/services/axios-user-ui.ts b/apps/user-ui/services/axios-user-ui.ts
new file mode 100644
index 0000000..9b36cc7
--- /dev/null
+++ b/apps/user-ui/services/axios-user-ui.ts
@@ -0,0 +1,61 @@
+import axiosParent from 'axios';
+import { FORCE_LOGOUT_EVENT } from 'common-ui/src/lib/const-strs';
+import { DeviceEventEmitter } from 'react-native'
+// import { getJWT } from '@/hooks/useJWT';
+import { BASE_API_URL } from 'common-ui';
+import { getAuthToken } from '@/hooks/useJWT';
+
+// export const API_BASE_URL = 'http://192.168.100.95:4000'; // Change to your API base URL
+// const API_BASE_URL = 'https://www.technocracy.ovh/mf'; // Change to your API base URL
+// const API_BASE_URL = 'http://10.195.26.42:4000'; // Change to your API base URL
+// const API_BASE_URL = 'http://localhost:4000/api/mobile/'; // Change to your API base URL
+// const API_BASE_URL = 'https://car-safar.com/api/mobile/'; // Change to your API base URL
+
+const axios = axiosParent.create({
+ baseURL: BASE_API_URL + '/api/v1',
+ timeout: 60000,
+ // headers: {
+ // 'Content-Type': 'application/json',
+ // },
+});
+
+
+axios.interceptors.request.use(
+ async (config) => {
+ // const token = await getJWT();
+ const token = await getAuthToken();
+
+ if (token) {
+ config.headers = config.headers || {};
+ config.headers['Authorization'] = `Bearer ${token}`;
+ }
+ return config;
+ },
+ (error) => Promise.reject(error)
+);
+
+axios.interceptors.response.use(
+ (response) => response,
+ (error) => {
+
+ const status = error?.status;
+ const msg = error.response?.data?.error;
+
+ if (status === 401 && msg.startsWith('Access denied')) {
+ // Handle unauthorized access
+ DeviceEventEmitter.emit(FORCE_LOGOUT_EVENT);
+ }
+ const message = error?.response?.data?.error;
+
+ if (msg) {
+ // Optionally, you can attach the message to the error object or throw a new error
+ const err = new Error(msg);
+ // Optionally attach the original error for debugging
+ (err as any).original = error;
+ return Promise.reject(err);
+ }
+ return Promise.reject(error);
+ }
+);
+
+export default axios;
diff --git a/apps/user-ui/services/notif-service/notif-checker.tsx b/apps/user-ui/services/notif-service/notif-checker.tsx
new file mode 100755
index 0000000..b9cc93d
--- /dev/null
+++ b/apps/user-ui/services/notif-service/notif-checker.tsx
@@ -0,0 +1,72 @@
+import React from "react";
+import { useNotification } from "./notif-context";
+import { BottomDialog } from "common-ui";
+import { MyText } from "common-ui";
+import { View, Linking } from "react-native";
+import { tw } from "common-ui";
+import { MyButton } from "common-ui";
+import { useAuth } from "@/components/context/auth-context";
+
+interface Props {}
+
+function NotifChecker(props: Props) {
+ const {} = props;
+ const [showPermissionDialog, setShowPermissionDialog] = React.useState(false);
+
+ const {isLoggedIn} = useAuth();
+ // const { data: hasPushToken, isLoading, isError } = useHasPushToken({enabled: isLoggedIn});
+ const hasPushToken = false;
+ // const { mutate: addPushToken } = useAddPushToken();
+ const addPushToken = (input:any) => {};
+ const { notifPermission, expoPushToken } = useNotification();
+ React.useEffect(() => {
+ if(isLoggedIn && !hasPushToken && notifPermission =='granted') {
+ addPushToken(expoPushToken!);
+ }
+ },[isLoggedIn, hasPushToken])
+
+ React.useEffect(() => {
+ if (notifPermission === "denied") {
+ setShowPermissionDialog(true);
+ }
+ }, [notifPermission]);
+
+ return (
+ <>
+ setShowPermissionDialog(false)}
+ >
+
+
+ Notification Permission Denied
+
+
+ It seems you have denied notification permissions. Please enable
+ them in your device settings.
+
+
+ setShowPermissionDialog(false)}
+ style={tw`flex-1`}
+ >
+ Cancel
+
+ {
+ Linking.openSettings();
+ }}
+ style={tw`flex-1`}
+ >
+ Settings
+
+
+
+
+ >
+ );
+}
+
+export default NotifChecker;
diff --git a/apps/user-ui/services/notif-service/notif-context.tsx b/apps/user-ui/services/notif-service/notif-context.tsx
new file mode 100755
index 0000000..db392b1
--- /dev/null
+++ b/apps/user-ui/services/notif-service/notif-context.tsx
@@ -0,0 +1,111 @@
+import React, {
+ createContext,
+ useContext,
+ useState,
+ useEffect,
+ useRef,
+ ReactNode,
+} from "react";
+import * as Notifications from "expo-notifications";
+import { registerForPushNotificationsAsync } from "./notif-register";
+import { useRouter } from "expo-router";
+import { NotificationToast } from "../toaster";
+import { NOTIF_PERMISSION_DENIED } from "common-ui/src/lib/const-strs";
+
+interface NotificationContextType {
+ expoPushToken: string | null;
+ notification: Notifications.Notification | null;
+ error: Error | null;
+ notifPermission: 'pending' | 'granted' | 'denied'
+}
+
+export const NotificationContext = createContext<
+ NotificationContextType | undefined
+>(undefined);
+
+export const useNotification = () => {
+ const context = useContext(NotificationContext);
+ if (context === undefined) {
+ throw new Error(
+ "useNotification must be used within a NotificationProvider"
+ );
+ }
+ return context;
+};
+
+interface NotificationProviderProps {
+ children: ReactNode;
+}
+
+export const NotificationProvider: React.FC = ({
+ children,
+}) => {
+ const [expoPushToken, setExpoPushToken] = useState(null);
+ const [notification, setNotification] =
+ useState(null);
+ const [error, setError] = useState(null);
+ const [notifPermission, setNotifPermission] = React.useState("pending");
+
+ const notificationListener = useRef(null);
+ const responseListener = useRef(null);
+ const router = useRouter();
+
+ useEffect(() => {
+ registerForPushNotificationsAsync()
+ .then((token) => {
+ setExpoPushToken(token);
+ setNotifPermission("granted");
+ })
+ .catch((errorRaw) => {
+
+ const err = String(errorRaw).slice(7); //remove the "Error: " string component in beginning
+
+ if (err === NOTIF_PERMISSION_DENIED) {
+ setNotifPermission("denied");
+ }
+ });
+
+ notificationListener.current =
+ Notifications.addNotificationReceivedListener((notification) => {
+ setNotification(notification);
+ // Show a visible toast when app is in foreground
+ const content = notification.request?.content;
+ if (content) {
+ NotificationToast(
+ content.title || "Notification",
+ content.body || "",
+ content.data || {}
+ );
+ }
+ });
+
+ responseListener.current =
+ Notifications.addNotificationResponseReceivedListener((response) => {
+ const data = response.notification.request.content.data;
+ if (data && data.doctorId) {
+ router.push(`/(drawer)/(tabs)/home`);
+ } else if (data && data.tokenId) {
+ router.push(`/(drawer)/(tabs)/home`);
+ }
+ });
+
+ return () => {
+ if (notificationListener.current) {
+ Notifications.removeNotificationSubscription(
+ notificationListener.current
+ );
+ }
+ if (responseListener.current) {
+ Notifications.removeNotificationSubscription(responseListener.current);
+ }
+ };
+ }, []);
+
+ return (
+
+ {children}
+
+ );
+};
diff --git a/apps/user-ui/services/notif-service/notif-register.ts b/apps/user-ui/services/notif-service/notif-register.ts
new file mode 100755
index 0000000..dc317f6
--- /dev/null
+++ b/apps/user-ui/services/notif-service/notif-register.ts
@@ -0,0 +1,51 @@
+import * as Notifications from "expo-notifications";
+import * as Device from "expo-device";
+import Constants from "expo-constants";
+import { Platform } from "react-native";
+import { NOTIF_PERMISSION_DENIED } from "common-ui/src/lib/const-strs";
+
+export async function registerForPushNotificationsAsync() {
+ if (Platform.OS === "android") {
+ await Notifications.setNotificationChannelAsync("default", {
+ name: "default",
+ importance: Notifications.AndroidImportance.MAX,
+ vibrationPattern: [0, 250, 250, 250],
+ lightColor: "#FF231F7C",
+ });
+ }
+
+ if (Device.isDevice) {
+ const { status: existingStatus } =
+ await Notifications.getPermissionsAsync();
+ let finalStatus = existingStatus;
+ if (existingStatus !== "granted") {
+ const { status } = await Notifications.requestPermissionsAsync();
+ finalStatus = status;
+ }
+
+ if (finalStatus !== "granted") {
+ throw new Error(
+ NOTIF_PERMISSION_DENIED
+ );
+ }
+ const projectId =
+ Constants?.expoConfig?.extra?.eas?.projectId ??
+ Constants?.easConfig?.projectId;
+ if (!projectId) {
+ throw new Error("Project ID not found");
+ }
+ try {
+ const pushTokenString = (
+ await Notifications.getExpoPushTokenAsync({
+ projectId,
+ })
+ ).data;
+ console.log(pushTokenString);
+ return pushTokenString;
+ } catch (e: unknown) {
+ throw new Error(`${e}`);
+ }
+ } else {
+ throw new Error("Must use physical device for push notifications");
+ }
+}
\ No newline at end of file
diff --git a/apps/user-ui/services/toaster.tsx b/apps/user-ui/services/toaster.tsx
new file mode 100755
index 0000000..55e6697
--- /dev/null
+++ b/apps/user-ui/services/toaster.tsx
@@ -0,0 +1,57 @@
+import Toast from "react-native-toast-message";
+import React from "react";
+import { useRouter } from "expo-router";
+
+export function InfoToast(message: string) {
+ Toast.show({
+ type: "info",
+ text1: message,
+ position: "top",
+ visibilityTime: 10000,
+ onPress: () => {
+ Toast.hide();
+ },
+ });
+}
+
+export function ErrorToast(message: string) {
+ Toast.show({
+ type: "error",
+ text1: message,
+ position: "top",
+ onPress: () => {
+ Toast.hide();
+ },
+ });
+}
+
+export function SuccessToast(message: string) {
+ Toast.show({
+ type: "success",
+ text1: message,
+ position: "top",
+ onPress: () => {
+ Toast.hide();
+ },
+ });
+}
+
+export function NotificationToast(title: string, subtitle: string, data: any) {
+ const router = useRouter();
+ Toast.show({
+ type: "info",
+ text1: title,
+ text2: subtitle,
+ position: "top",
+ onPress: () => {
+ if (data && data.rideId) {
+ // router.push(`/(drawer)/dashboard/ride-details?id=${data.rideId}`);
+ } else if (data && data.carId) {
+ // router.push(`/(drawer)/my-cars/car-details?id=${data.carId}`);
+ }
+ Toast.hide();
+ },
+ });
+}
+
+export default Toast;
diff --git a/apps/user-ui/src/api-hooks/auth.api.ts b/apps/user-ui/src/api-hooks/auth.api.ts
new file mode 100644
index 0000000..a462431
--- /dev/null
+++ b/apps/user-ui/src/api-hooks/auth.api.ts
@@ -0,0 +1,64 @@
+import { useMutation } from "@tanstack/react-query";
+import axios from 'common-ui/src/services/axios';
+import { LoginCredentials, RegisterData } from '@/src/types/auth';
+
+// API response types
+interface RegisterResponse {
+ token: string;
+ user: {
+ id: number;
+ name: string;
+ email: string;
+ mobile: string;
+ profileImage?: string;
+ createdAt: string;
+ };
+}
+
+interface UpdateProfileResponse {
+ token: string;
+ user: {
+ id: number;
+ name: string;
+ email: string | null;
+ mobile: string | null;
+ profileImage?: string | null;
+ bio?: string | null;
+ dateOfBirth?: string | null;
+ gender?: string | null;
+ occupation?: string | null;
+ };
+}
+
+// API functions
+const registerApi = async (data: FormData): Promise => {
+ const response = await axios.post('/uv/auth/register', data, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+ return response.data.data; // response.data is {success, data}, we want the inner data
+};
+
+const updateProfileApi = async (data: FormData): Promise => {
+ const response = await axios.put('/uv/auth/profile', data, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
+ return response.data.data; // response.data is {success, data}, we want the inner data
+};
+
+// React Query hooks
+export const useRegister = () => {
+ return useMutation({
+ mutationFn: registerApi,
+ });
+};
+
+export const useUpdateProfile = () => {
+ return useMutation({
+ mutationFn: updateProfileApi,
+ onError: e => console.log(JSON.stringify(e))
+ });
+};
\ No newline at end of file
diff --git a/apps/user-ui/src/api-hooks/essential-consts.api.ts b/apps/user-ui/src/api-hooks/essential-consts.api.ts
new file mode 100644
index 0000000..586592c
--- /dev/null
+++ b/apps/user-ui/src/api-hooks/essential-consts.api.ts
@@ -0,0 +1,7 @@
+import { trpc } from '@/src/trpc-client';
+
+export const useGetEssentialConsts = () => {
+ return trpc.common.essentialConsts.useQuery(undefined, {
+ refetchInterval: 60000,
+ });
+};
diff --git a/apps/user-ui/src/components/AddressForm.tsx b/apps/user-ui/src/components/AddressForm.tsx
new file mode 100644
index 0000000..c824913
--- /dev/null
+++ b/apps/user-ui/src/components/AddressForm.tsx
@@ -0,0 +1,213 @@
+import React, { useState } from 'react';
+import { View, Alert, ScrollView } from 'react-native';
+import { useMutation } from '@tanstack/react-query';
+import { Formik } from 'formik';
+import * as Yup from 'yup';
+import * as Location from 'expo-location';
+import { tw, MyText, MyTouchableOpacity , Checkbox , MyTextInput , LoadingDialog } from 'common-ui';
+import { trpc } from '../trpc-client';
+
+interface AddressFormProps {
+ onSuccess: () => void;
+ initialValues?: {
+ name: string;
+ phone: string;
+ addressLine1: string;
+ addressLine2: string;
+ city: string;
+ state: string;
+ pincode: string;
+ isDefault: boolean;
+ };
+ isEdit?: boolean;
+}
+
+const AddressForm: React.FC = ({ onSuccess, initialValues, isEdit = false }) => {
+ const [locationLoading, setLocationLoading] = useState(false);
+ const [locationError, setLocationError] = useState(null);
+ const [isSubmitting, setIsSubmitting] = useState(false);
+
+ const createAddressMutation = trpc.user.address.createAddress.useMutation({
+ onSuccess: () => {
+ setIsSubmitting(false);
+ onSuccess();
+ },
+ onError: (error: any) => {
+ setIsSubmitting(false);
+ Alert.alert('Error', error.message || 'Failed to save address');
+ },
+ });
+
+ const attachCurrentLocation = async (setFieldValue: (field: string, value: any) => void) => {
+ setLocationLoading(true);
+ setLocationError(null);
+
+ try {
+ // Request location permission
+ const { status } = await Location.requestForegroundPermissionsAsync();
+
+ if (status !== 'granted') {
+ setLocationError('Location Permission denied');
+ return;
+ }
+
+ // Get current position
+ const location = await Location.getCurrentPositionAsync({
+ accuracy: Location.Accuracy.High,
+ });
+
+ // Reverse geocode to get address
+ const address = await Location.reverseGeocodeAsync({
+ latitude: location.coords.latitude,
+ longitude: location.coords.longitude,
+ });
+
+ // Populate form fields with geocoded data
+ if (address[0]) {
+ const addr = address[0];
+ const addressLine1 = `${addr.streetNumber || ''} ${addr.street || ''}`.trim();
+ setFieldValue('addressLine1', addressLine1 || addr.name || '');
+ setFieldValue('city', addr.city || addr.subregion || '');
+ setFieldValue('state', addr.region || '');
+ setFieldValue('pincode', addr.postalCode || '');
+ } else {
+ setLocationError('Unable to determine address from your location');
+ }
+ } catch (error) {
+ console.error('Location error:', error);
+ setLocationError('Unable to fetch location. Please check your GPS settings.');
+ } finally {
+ setLocationLoading(false);
+ }
+ };
+
+ const validationSchema = Yup.object({
+ name: Yup.string().required('Name is required'),
+ phone: Yup.string().required('Phone is required').matches(/^\d{10}$/, 'Phone must be 10 digits'),
+ addressLine1: Yup.string().required('Address Line 1 is required'),
+ addressLine2: Yup.string(),
+ city: Yup.string().required('City is required'),
+ state: Yup.string().required('State is required'),
+ pincode: Yup.string().required('Pincode is required').matches(/^\d{6}$/, 'Pincode must be 6 digits'),
+ isDefault: Yup.boolean(),
+ });
+
+ return (
+
+ {isEdit ? 'Edit Address' : 'Add Address'}
+ {
+ setIsSubmitting(true);
+ createAddressMutation.mutate(values);
+ }}
+ >
+ {({ handleChange, handleBlur, handleSubmit, values, errors, touched, setFieldValue }) => (
+
+
+ {touched.name && errors.name && {errors.name}}
+
+
+ {touched.phone && errors.phone && {errors.phone}}
+
+
+ {touched.addressLine1 && errors.addressLine1 && {errors.addressLine1}}
+
+
+
+
+ {touched.city && errors.city && {errors.city}}
+
+
+ {touched.state && errors.state && {errors.state}}
+
+
+ {touched.pincode && errors.pincode && {errors.pincode}}
+
+
+ setFieldValue('isDefault', !values.isDefault)}
+ />
+ Set as default address
+
+
+ handleSubmit()}
+ disabled={isSubmitting}
+ >
+
+ {isSubmitting ? (isEdit ? 'Updating...' : 'Adding...') : (isEdit ? 'Update Address' : 'Add Address')}
+
+
+
+ )}
+
+
+
+
+ );
+};
+
+export default AddressForm;
\ No newline at end of file
diff --git a/apps/user-ui/src/components/google-sign-in.tsx b/apps/user-ui/src/components/google-sign-in.tsx
new file mode 100644
index 0000000..fdc2423
--- /dev/null
+++ b/apps/user-ui/src/components/google-sign-in.tsx
@@ -0,0 +1,47 @@
+import * as React from 'react';
+import * as AuthSession from 'expo-auth-session';
+import * as WebBrowser from 'expo-web-browser';
+import { Button, View } from 'react-native';
+import * as Google from 'expo-auth-session/providers/google';
+
+
+WebBrowser.maybeCompleteAuthSession();
+
+const discovery = {
+ authorizationEndpoint: 'https://accounts.google.com/o/oauth2/v2/auth',
+ tokenEndpoint: 'https://oauth2.googleapis.com/token',
+};
+
+
+WebBrowser.maybeCompleteAuthSession();
+export default function GoogleSignInPKCE() {
+
+
+
+
+ // const [request, response, promptAsync] = Google.useAuthRequest({
+ // androidClientId: androidClientId,
+ // iosClientId: iosClientId,
+ // webClientId: webClientId,
+ // redirectUri: 'https://www.freshyo.in/oauthredirect',
+ // // redirectUri: AuthSession.makeRedirectUri({ scheme: 'freshyo', path: 'oauthredirect' }),
+ // scopes: ["openid", "profile", "email"],
+ // });
+
+
+
+ // React.useEffect(() => {
+ // if (response?.type === "success") {
+ // const { authentication } = response;
+ // console.log("Access token:", authentication?.accessToken);
+ // }
+ // }, [response]);
+
+
+ return (
+
+
+ );
+}
diff --git a/apps/user-ui/src/constants.ts b/apps/user-ui/src/constants.ts
new file mode 100644
index 0000000..45ef3c2
--- /dev/null
+++ b/apps/user-ui/src/constants.ts
@@ -0,0 +1,9 @@
+const constants = {
+ GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
+ APP_SCHEME: process.env.APP_SCHEME,
+ BASE_URL: process.env.BASE_URL,
+ GOOGLE_AUTH_URL: process.env.GOOGLE_AUTH_URL,
+ AUTH_REDIRECT_KEY: 'auth_redirect_state',
+}
+
+export default constants;
\ No newline at end of file
diff --git a/apps/user-ui/src/contexts/AuthContext.tsx b/apps/user-ui/src/contexts/AuthContext.tsx
new file mode 100644
index 0000000..6ce1e85
--- /dev/null
+++ b/apps/user-ui/src/contexts/AuthContext.tsx
@@ -0,0 +1,340 @@
+import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react';
+import { getAuthToken, saveAuthToken, deleteAuthToken, saveUserId, getUserId } from '../../hooks/useJWT';
+import { getCurrentUserId } from '@/utils/getCurrentUserId';
+import { useRegister } from '@/src/api-hooks/auth.api';
+import { AuthState, AuthContextType, LoginCredentials, RegisterData, User, UserDetails } from '@/src/types/auth';
+import { trpc } from '@/src/trpc-client';
+import { StorageServiceCasual } from 'common-ui';
+import { useRouter } from 'expo-router';
+import constants from '@/src/constants';
+
+interface RedirectState {
+ targetUrl: string;
+ queryParams: Record;
+ timestamp: number;
+}
+
+const AuthContext = createContext(undefined);
+
+interface AuthProviderProps {
+ children: ReactNode;
+}
+
+export const AuthProvider: React.FC = ({ children }) => {
+ const router = useRouter();
+ const [authState, setAuthState] = useState({
+ user: null,
+ userDetails: null,
+ isAuthenticated: false,
+ isLoading: true,
+ token: null,
+ });
+
+ // const loginMutation = useLogin();
+ const loginMutation = trpc.user.auth.login.useMutation();
+ const registerMutation = useRegister();
+
+ // Initialize auth state on app startup
+ useEffect(() => {
+ const initializeAuth = async () => {
+ try {
+ const token = await getAuthToken();
+ const userId = await getCurrentUserId();
+
+ if (token && userId) {
+ // Use existing token, only fetch user data
+ setAuthState({
+ user: {
+ id: userId,
+ name: '', // Will be populated by useQuery
+ email: '',
+ mobile: '',
+ profileImage: '',
+ createdAt: '',
+ },
+ userDetails: null,
+ isAuthenticated: true,
+ isLoading: true, // Keep loading while fetching user data
+ token,
+ });
+ } else {
+ setAuthState(prev => ({
+ ...prev,
+ userDetails: null,
+ isLoading: false,
+ }));
+ }
+ } catch (error) {
+ console.error('Auth initialization error:', error);
+ setAuthState(prev => ({
+ ...prev,
+ userDetails: null,
+ isLoading: false,
+ }));
+ }
+ };
+
+ initializeAuth();
+ }, []);
+
+ // Fetch user data using tRPC query
+ const { data: selfData, error: selfDataError, refetch: refetchSelfData } = trpc.user.user.getSelfData.useQuery(undefined, {
+ enabled: !!(authState.token && authState.user?.id), // Only run if we have token and userId
+ retry: false, // Don't retry on auth errors
+ refetchOnMount: true, // Refetch on every component mount (app startup)
+ refetchOnWindowFocus: false, // Don't refetch on window focus
+ staleTime: 0, // Consider data stale immediately
+ });
+
+ // Handle user data response
+ useEffect(() => {
+ if (selfData && authState.isAuthenticated) {
+ const { user } = selfData.data;
+
+ setAuthState(prev => ({
+ ...prev,
+ user: {
+ id: user.id,
+ name: user.name,
+ email: user.email,
+ mobile: user.mobile,
+ profileImage: user.profileImage,
+ createdAt: '',
+ },
+ userDetails: user,
+ isLoading: false,
+ }));
+ } else if (selfDataError && authState.isAuthenticated) {
+ console.error('Failed to fetch user data:', selfDataError);
+ // If token is invalid, clear auth state
+ // deleteAuthToken();
+ setAuthState({
+ user: null,
+ userDetails: null,
+ isAuthenticated: false,
+ isLoading: false,
+ token: null,
+ });
+ }
+ }, [selfData, selfDataError, authState.isAuthenticated]);
+
+ // Helper function to handle redirect after successful login
+ const handlePostLoginRedirect = async () => {
+ try {
+ const storedData = await StorageServiceCasual.getItem(constants.AUTH_REDIRECT_KEY);
+ console.log({storedData})
+
+ if (storedData) {
+ const redirectState: RedirectState = JSON.parse(storedData);
+ console.log({redirectState})
+
+
+ // Clear the stored state
+ await StorageServiceCasual.removeItem(constants.AUTH_REDIRECT_KEY);
+
+ // Check if the redirect state is not too old (24 hours)
+ const isExpired = Date.now() - redirectState.timestamp > 24 * 60 * 60 * 1000;
+ if (isExpired) {
+ console.warn('Redirect state expired, navigating to home');
+ // router.replace('/');
+ router.back();
+ return;
+ }
+
+ // Build the path with query params
+ let targetPath = redirectState.targetUrl;
+ const queryParams = redirectState.queryParams;
+
+ if (Object.keys(queryParams).length > 0) {
+ const searchParams = new URLSearchParams();
+ Object.entries(queryParams).forEach(([key, value]) => {
+ if (value !== undefined && value !== null) {
+ searchParams.set(key, String(value));
+ }
+ });
+ targetPath += `?${searchParams.toString()}`;
+ }
+
+ // Navigate to the target URL with params
+ // router.replace(targetPath as any);
+ router.back();
+ } else {
+ // No stored redirect state, navigate to home
+ // router.replace('/');
+ router.back();
+ }
+ } catch (error) {
+ console.error('Error handling post-login redirect:', error);
+ // Fallback to home on error
+ router.replace('/');
+ }
+ };
+
+ const loginWithToken = async (token: string, user: User): Promise => {
+ try {
+ setAuthState(prev => ({ ...prev, isLoading: true }));
+
+ await saveAuthToken(token);
+ await saveUserId(user.id.toString());
+
+ setAuthState({
+ user: {
+ id: user.id,
+ name: user.name,
+ email: user.email,
+ mobile: user.mobile,
+ profileImage: user.profileImage,
+ createdAt: '',
+ },
+ userDetails: user,
+ isAuthenticated: true,
+ isLoading: false,
+ token,
+ });
+
+ // Handle post-login redirect after auth state is set
+ handlePostLoginRedirect();
+ } catch (error) {
+ console.error('Login with token error:', error);
+ setAuthState(prev => ({ ...prev, isLoading: false }));
+ throw error;
+ }
+ };
+
+ const login = async (credentials: LoginCredentials): Promise => {
+ try {
+ setAuthState(prev => ({ ...prev, isLoading: true }));
+
+ const response = await loginMutation.mutateAsync(credentials);
+ // const response = loginMutation.mutate(credentials);
+ const { token, user } = response.data;
+
+ await saveAuthToken(token);
+ await saveUserId(user.id.toString());
+
+ setAuthState({
+ user: {
+ id: user.id,
+ name: user.name || null,
+ email: user.email,
+ mobile: user.mobile,
+ profileImage: user.profileImage,
+ createdAt: '',
+ },
+ userDetails: user,
+ isAuthenticated: true,
+ isLoading: false,
+ token,
+ });
+
+ // Refetch user details to ensure we have the latest data
+ refetchSelfData();
+ } catch (error) {
+ setAuthState(prev => ({ ...prev, isLoading: false }));
+ throw error;
+ }
+ };
+
+
+ const register = async (data: FormData): Promise => {
+ try {
+ setAuthState(prev => ({ ...prev, isLoading: true }));
+
+ const response = await registerMutation.mutateAsync(data);
+ const { token, user } = response;
+
+ await saveAuthToken(token);
+ await saveUserId(user.id.toString());
+
+ setAuthState({
+ user: {
+ id: user.id,
+ name: user.name,
+ email: user.email,
+ mobile: user.mobile,
+ profileImage: user.profileImage,
+ createdAt: '',
+ },
+ userDetails: user,
+ isAuthenticated: true,
+ isLoading: false,
+ token,
+ });
+
+ // Refetch user details to ensure we have the latest data
+ refetchSelfData();
+ } catch (error) {
+ setAuthState(prev => ({ ...prev, isLoading: false }));
+ throw error;
+ }
+ };
+
+ const logout = async (): Promise => {
+ try {
+ await deleteAuthToken();
+ setAuthState({
+ user: null,
+ userDetails: null,
+ isAuthenticated: false,
+ isLoading: false,
+ token: null,
+ });
+ } catch (error) {
+ console.error('Logout error:', error);
+ // Still clear local state even if deleteJWT fails
+ setAuthState({
+ user: null,
+ userDetails: null,
+ isAuthenticated: false,
+ isLoading: false,
+ token: null,
+ });
+ }
+ };
+
+ const updateUser = (userData: Partial): void => {
+ setAuthState(prev => ({
+ ...prev,
+ user: prev.user ? { ...prev.user, ...userData } : null,
+ }));
+ };
+
+ const updateUserDetails = (userDetailsData: Partial): void => {
+ setAuthState(prev => ({
+ ...prev,
+ userDetails: prev.userDetails ? { ...prev.userDetails, ...userDetailsData } : null,
+ }));
+ };
+
+ const contextValue: AuthContextType = {
+ ...authState,
+ login,
+ loginWithToken,
+ register,
+ logout,
+ updateUser,
+ updateUserDetails,
+ };
+
+ return (
+
+ {children}
+
+ );
+};
+
+export const useAuth = (): AuthContextType => {
+ const context = useContext(AuthContext);
+ if (context === undefined) {
+ throw new Error('useAuth must be used within an AuthProvider');
+ }
+ return context;
+};
+
+export const useUserDetails = (): UserDetails | null => {
+ const context = useContext(AuthContext);
+ if (context === undefined) {
+ throw new Error('useUserDetails must be used within an AuthProvider');
+ }
+ return context.userDetails;
+};
\ No newline at end of file
diff --git a/apps/user-ui/src/hooks/useHideTabNav.ts b/apps/user-ui/src/hooks/useHideTabNav.ts
new file mode 100644
index 0000000..1a6ea5e
--- /dev/null
+++ b/apps/user-ui/src/hooks/useHideTabNav.ts
@@ -0,0 +1,14 @@
+import { useFocusEffect } from '@react-navigation/native';
+import { useAppStore } from '@/src/store/appStore';
+
+export const useHideTabNav = (caller: string = 'default') => {
+ const setHideTabsNavKey = useAppStore((state) => state.setHideTabsNavKey);
+
+ useFocusEffect(() => {
+ setHideTabsNavKey(caller, true); // Hide tabs when screen focuses
+
+ return () => {
+ setHideTabsNavKey(caller, false); // Show tabs when screen blurs
+ };
+ });
+};
\ No newline at end of file
diff --git a/apps/user-ui/src/store/addressStore.ts b/apps/user-ui/src/store/addressStore.ts
new file mode 100644
index 0000000..c62b062
--- /dev/null
+++ b/apps/user-ui/src/store/addressStore.ts
@@ -0,0 +1,13 @@
+import { create } from 'zustand';
+
+interface AddressState {
+ selectedAddressId: number | null;
+ setSelectedAddressId: (addressId: number | null) => void;
+ clearSelectedAddress: () => void;
+}
+
+export const useAddressStore = create((set) => ({
+ selectedAddressId: null,
+ setSelectedAddressId: (addressId) => set({ selectedAddressId: addressId }),
+ clearSelectedAddress: () => set({ selectedAddressId: null }),
+}));
\ No newline at end of file
diff --git a/apps/user-ui/src/store/appStore.ts b/apps/user-ui/src/store/appStore.ts
new file mode 100644
index 0000000..129e6ef
--- /dev/null
+++ b/apps/user-ui/src/store/appStore.ts
@@ -0,0 +1,14 @@
+import { create } from 'zustand';
+
+interface AppStore {
+ hideTabsNav: Record;
+ setHideTabsNavKey: (key: string, hide: boolean) => void;
+}
+
+export const useAppStore = create((set) => ({
+ hideTabsNav: {},
+ setHideTabsNavKey: (key: string, hide: boolean) =>
+ set((state) => ({
+ hideTabsNav: { ...state.hideTabsNav, [key]: hide }
+ })),
+}));
\ No newline at end of file
diff --git a/apps/user-ui/src/store/navigationStore.ts b/apps/user-ui/src/store/navigationStore.ts
new file mode 100644
index 0000000..02e19fc
--- /dev/null
+++ b/apps/user-ui/src/store/navigationStore.ts
@@ -0,0 +1,15 @@
+import { create } from 'zustand';
+
+interface NavigationState {
+ isNavigatedFromHome: boolean;
+ setNavigatedFromHome: (value: boolean) => void;
+ selectedStoreId: number | null;
+ setSelectedStoreId: (storeId: number | null) => void;
+}
+
+export const useNavigationStore = create((set) => ({
+ isNavigatedFromHome: false,
+ setNavigatedFromHome: (value) => set({ isNavigatedFromHome: value }),
+ selectedStoreId: null,
+ setSelectedStoreId: (storeId) => set({ selectedStoreId: storeId }),
+}));
diff --git a/apps/user-ui/src/store/quickDeliveryStore.ts b/apps/user-ui/src/store/quickDeliveryStore.ts
new file mode 100644
index 0000000..3980d49
--- /dev/null
+++ b/apps/user-ui/src/store/quickDeliveryStore.ts
@@ -0,0 +1,15 @@
+import { create } from 'zustand';
+
+interface QuickDeliveryState {
+ isDrawerHidden: boolean;
+ setDrawerHidden: (hidden: boolean) => void;
+ selectedSlotId: number | null;
+ setSelectedSlotId: (slotId: number | null) => void;
+}
+
+export const useQuickDeliveryStore = create((set) => ({
+ isDrawerHidden: false,
+ setDrawerHidden: (hidden: boolean) => set({ isDrawerHidden: hidden }),
+ selectedSlotId: null,
+ setSelectedSlotId: (slotId) => set({ selectedSlotId: slotId }),
+}));
\ No newline at end of file
diff --git a/apps/user-ui/src/trpc-client.ts b/apps/user-ui/src/trpc-client.ts
new file mode 100644
index 0000000..eb1f5e5
--- /dev/null
+++ b/apps/user-ui/src/trpc-client.ts
@@ -0,0 +1,40 @@
+import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
+import { createTRPCReact } from "@trpc/react-query";
+import { AppRouter } from "../../backend/src/trpc/router";
+import { BASE_API_URL } from "common-ui";
+import { getAuthToken } from "@/hooks/useJWT";
+import { DeviceEventEmitter } from "react-native";
+import { FORCE_LOGOUT_EVENT } from "common-ui/src/lib/const-strs";
+
+// Create tRPC React hooks without strict typing for now
+export const trpc = createTRPCReact();
+
+// Create tRPC client for direct usage
+export const trpcClient = createTRPCProxyClient({
+ links: [
+ httpBatchLink({
+ url: BASE_API_URL + "/api/trpc",
+ headers: async () => {
+ const token = await getAuthToken();
+ return token ? { Authorization: `Bearer ${token}` } : {};
+ },
+ fetch: async (url, options) => {
+ const response = await fetch(url, options);
+ if (response.status === 401) {
+ const data = await response
+ .clone()
+ .json()
+ .catch(() => ({}));
+ let code = "";
+ if (data[0]?.error || data?.error) {
+ code = data[0]?.error?.message || data?.error?.message;
+ }
+ if (code === "UNAUTHORIZED") {
+ DeviceEventEmitter.emit(FORCE_LOGOUT_EVENT);
+ }
+ }
+ return response;
+ },
+ }),
+ ],
+});
diff --git a/apps/user-ui/src/types/auth.ts b/apps/user-ui/src/types/auth.ts
new file mode 100644
index 0000000..892a062
--- /dev/null
+++ b/apps/user-ui/src/types/auth.ts
@@ -0,0 +1,50 @@
+export interface User {
+ id: number;
+ name?: string | null;
+ email: string | null;
+ mobile: string | null;
+ profileImage?: string | null;
+ createdAt: string;
+}
+
+export interface UserDetails {
+ id: number;
+ name?: string | null;
+ email: string | null;
+ mobile: string | null;
+ profileImage?: string | null;
+ bio?: string | null;
+ dateOfBirth?: string | null;
+ gender?: string | null;
+ occupation?: string | null;
+}
+
+export interface AuthState {
+ user: User | null;
+ userDetails: UserDetails | null;
+ isAuthenticated: boolean;
+ isLoading: boolean;
+ token: string | null;
+}
+
+export interface LoginCredentials {
+ identifier: string; // email or mobile
+ password: string;
+}
+
+export interface RegisterData {
+ name: string;
+ email: string;
+ mobile: string;
+ password: string;
+ profileImage?: string;
+}
+
+export interface AuthContextType extends AuthState {
+ login: (credentials: LoginCredentials) => Promise;
+ loginWithToken: (token: string, user: User) => Promise;
+ register: (data: FormData) => Promise;
+ logout: () => Promise;
+ updateUser: (user: Partial) => void;
+ updateUserDetails: (userDetails: Partial) => void;
+}
\ No newline at end of file
diff --git a/apps/user-ui/tsconfig.json b/apps/user-ui/tsconfig.json
new file mode 100755
index 0000000..7650c47
--- /dev/null
+++ b/apps/user-ui/tsconfig.json
@@ -0,0 +1,34 @@
+{
+ "extends": "expo/tsconfig.base",
+ "compilerOptions": {
+ "strict": true,
+ "paths": {
+ "@/*": [
+ "./*"
+ ],
+ "shared-types": [
+ "../shared-types"
+ ],
+ "common-ui": [
+ "../../packages/ui"
+ ],
+ "common-ui/*": [
+ "../../packages/ui/*"
+ ]
+ },
+ "moduleSuffixes": [
+ ".ios",
+ ".android",
+ ".native",
+ ".web",
+ ""
+ ],
+ "jsx": "react-native"
+ },
+ "include": [
+ "**/*.ts",
+ "**/*.tsx",
+ ".expo/types/**/*.ts",
+ "expo-env.d.ts",
+ ]
+}
\ No newline at end of file
diff --git a/apps/user-ui/utils/getCurrentUserId.ts b/apps/user-ui/utils/getCurrentUserId.ts
new file mode 100755
index 0000000..4c32f60
--- /dev/null
+++ b/apps/user-ui/utils/getCurrentUserId.ts
@@ -0,0 +1,14 @@
+import {jwtDecode} from 'jwt-decode';
+import { getAuthToken } from '../hooks/useJWT';
+
+export async function getCurrentUserId(): Promise {
+ const token = await getAuthToken();
+ if (!token) return null;
+ try {
+ const decoded: any = jwtDecode(token);
+ // Adjust this if your JWT uses a different field for user id
+ return decoded.id || decoded.userId || null;
+ } catch {
+ return null;
+ }
+}
diff --git a/apps/user-ui/utils/queryClient.ts b/apps/user-ui/utils/queryClient.ts
new file mode 100755
index 0000000..98b5f1e
--- /dev/null
+++ b/apps/user-ui/utils/queryClient.ts
@@ -0,0 +1,11 @@
+import { QueryClient } from '@tanstack/react-query';
+
+const queryClient = new QueryClient({
+ defaultOptions: {
+ queries: {
+ retry: 3,
+ refetchOnWindowFocus: true,
+ },
+ }
+});
+export default queryClient;
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..771f202
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,47 @@
+version: '3.8'
+
+services:
+ db:
+ image: postgres:15
+ container_name: meat_farmer_db
+ environment:
+ POSTGRES_DB: meat_farmer
+ POSTGRES_USER: meat_farmer_user
+ POSTGRES_PASSWORD: meat_farmer_password
+ ports:
+ - "5432:5432"
+ volumes:
+ - postgres_data:/var/lib/postgresql/data
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U meat_farmer_user -d meat_farmer"]
+ interval: 10s
+ timeout: 5s
+ retries: 5
+
+ backend:
+ image: mohdshafiuddin54/meat_farmer
+ container_name: meat_farmer_backend
+ ports:
+ - "4000:4000"
+ depends_on:
+ db:
+ condition: service_healthy
+ environment:
+ DATABASE_URL: postgres://postgres:postgres_shafi_password@technocracy.ovh:5435/meat_farmer
+ 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_ACCESS_KEY_ID: admin
+ S3_SECRET_ACCESS_KEY: admin12345
+ S3_URL: http://technocracy.ovh:9000/
+ S3_BUCKET_NAME: meatfarmer
+ EXPO_ACCESS_TOKEN: Asvpy8cByRh6T4ksnWScO6PLcio2n35-BwES5zK-
+ JWT_SECRET: my_meatfarmer_jwt_secret_key
+ NODE_ENV: production
+ restart: unless-stopped
+
+volumes:
+ postgres_data:
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..c6460f5
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,24431 @@
+{
+ "name": "meat-farmer-monorepo",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "meat-farmer-monorepo",
+ "version": "1.0.0",
+ "workspaces": [
+ "apps/*",
+ "packages/*"
+ ],
+ "dependencies": {
+ "@react-native/virtualized-lists": "^0.79.6",
+ "admin-ui": "^1.0.0",
+ "backend": "^1.0.0",
+ "expo": "~53.0.22",
+ "expo-auth-session": "~6.2.1",
+ "expo-crypto": "~14.1.5",
+ "expo-web-browser": "~14.2.0",
+ "node-cron": "^4.2.1",
+ "react": "19.0.0",
+ "react-native": "0.79.6",
+ "user-ui": "^1.0.0",
+ "zustand": "^5.0.9"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.25.2",
+ "@types/react": "~19.0.10",
+ "@types/react-native-razorpay": "^2.2.6",
+ "eslint": "^9.25.0",
+ "eslint-config-expo": "~9.2.0",
+ "turbo": "^2.0.0",
+ "typescript": "~5.8.3"
+ }
+ },
+ "apps/admin-ui": {
+ "version": "1.0.0",
+ "dependencies": {
+ "@expo/vector-icons": "^14.1.0",
+ "@react-native-community/datetimepicker": "8.4.1",
+ "@react-native-picker/picker": "2.11.1",
+ "@react-navigation/bottom-tabs": "^7.3.10",
+ "@react-navigation/drawer": "^7.3.9",
+ "@react-navigation/elements": "^2.3.8",
+ "@react-navigation/material-top-tabs": "^7.4.11",
+ "@react-navigation/native": "^7.1.6",
+ "@tanstack/react-query": "^5.85.9",
+ "@trpc/client": "^11.6.0",
+ "@trpc/react-query": "^11.6.0",
+ "axios": "^1.11.0",
+ "buffer": "^6.0.3",
+ "dayjs": "^1.11.18",
+ "expo": "~53.0.22",
+ "expo-blur": "~14.1.5",
+ "expo-constants": "~17.1.7",
+ "expo-device": "~7.1.4",
+ "expo-document-picker": "~13.1.6",
+ "expo-font": "~13.3.2",
+ "expo-haptics": "~14.1.4",
+ "expo-image": "~2.4.0",
+ "expo-image-picker": "~16.1.4",
+ "expo-linear-gradient": "~14.1.5",
+ "expo-linking": "~7.1.7",
+ "expo-location": "^19.0.8",
+ "expo-notifications": "~0.31.4",
+ "expo-router": "~5.1.5",
+ "expo-secure-store": "~14.2.4",
+ "expo-splash-screen": "~0.30.10",
+ "expo-status-bar": "~2.2.3",
+ "expo-symbols": "~0.4.5",
+ "expo-system-ui": "~5.0.11",
+ "expo-updates": "~0.28.17",
+ "expo-web-browser": "~14.2.0",
+ "formik": "^2.4.6",
+ "jwt-decode": "^4.0.0",
+ "react": "19.0.0",
+ "react-dom": "19.0.0",
+ "react-hook-form": "^7.62.0",
+ "react-native": "0.79.6",
+ "react-native-draggable-flatlist": "^4.0.3",
+ "react-native-element-dropdown": "^2.12.4",
+ "react-native-gesture-handler": "~2.24.0",
+ "react-native-pager-view": "6.7.1",
+ "react-native-paper": "^5.14.5",
+ "react-native-reanimated": "~3.17.4",
+ "react-native-safe-area-context": "5.4.0",
+ "react-native-screens": "~4.11.1",
+ "react-native-tab-view": "^4.1.3",
+ "react-native-toast-message": "^2.3.3",
+ "react-native-web": "~0.20.0",
+ "react-native-webview": "13.13.5",
+ "twrnc": "^4.9.1",
+ "yup": "^1.7.0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.25.2",
+ "@types/react": "~19.0.10",
+ "@types/react-native-razorpay": "^2.2.6",
+ "eslint": "^9.25.0",
+ "eslint-config-expo": "~9.2.0",
+ "typescript": "~5.8.3"
+ }
+ },
+ "apps/admin-ui/node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "apps/admin-ui/node_modules/expo-location": {
+ "version": "19.0.8",
+ "resolved": "https://registry.npmjs.org/expo-location/-/expo-location-19.0.8.tgz",
+ "integrity": "sha512-H/FI75VuJ1coodJbbMu82pf+Zjess8X8Xkiv9Bv58ZgPKS/2ztjC1YO1/XMcGz7+s9DrbLuMIw22dFuP4HqneA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "apps/admin-ui/node_modules/react-native-pager-view": {
+ "version": "6.7.1",
+ "resolved": "https://registry.npmjs.org/react-native-pager-view/-/react-native-pager-view-6.7.1.tgz",
+ "integrity": "sha512-cBSr6xw4g5N7Kd3VGWcf+kmaH7iBWb0DXAf2bVo3bXkzBcBbTOmYSvc0LVLHhUPW8nEq5WjT9LCIYAzgF++EXw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "apps/backend": {
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@aws-sdk/client-s3": "^3.888.0",
+ "@aws-sdk/s3-request-presigner": "^3.888.0",
+ "@trpc/server": "^11.6.0",
+ "@turf/turf": "^7.2.0",
+ "@types/bcryptjs": "^2.4.6",
+ "@types/cors": "^2.8.19",
+ "@types/jsonwebtoken": "^9.0.10",
+ "@types/multer": "^2.0.0",
+ "axios": "^1.11.0",
+ "bcryptjs": "^3.0.2",
+ "bullmq": "^5.63.0",
+ "cors": "^2.8.5",
+ "dayjs": "^1.11.18",
+ "dotenv": "^17.2.1",
+ "drizzle-orm": "^0.44.5",
+ "expo-server-sdk": "^4.0.0",
+ "express": "^5.1.0",
+ "jsonwebtoken": "^9.0.2",
+ "multer": "^2.0.2",
+ "node-cron": "^4.2.1",
+ "pg": "^8.16.3",
+ "pg-sdk-node": "https://phonepe.mycloudrepo.io/public/repositories/phonepe-pg-sdk-node/releases/v2/phonepe-pg-sdk-node.tgz",
+ "razorpay": "^2.9.6",
+ "redis": "^5.9.0",
+ "zod": "^4.1.12"
+ },
+ "devDependencies": {
+ "@types/express": "^5.0.3",
+ "@types/node": "^24.5.2",
+ "@types/pg": "^8.15.5",
+ "drizzle-kit": "^0.31.4",
+ "rimraf": "^6.1.2",
+ "ts-node-dev": "^2.0.0",
+ "tsx": "^4.20.5",
+ "typescript": "^5.9.2"
+ }
+ },
+ "apps/backend/node_modules/typescript": {
+ "version": "5.9.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "apps/fallback-ui": {
+ "version": "0.1.0",
+ "dependencies": {
+ "@radix-ui/react-slot": "^1.1.2",
+ "@tanstack/react-query": "^5.59.16",
+ "@tanstack/react-router": "^1.92.8",
+ "@tanstack/router-devtools": "^1.92.8",
+ "@trpc/client": "^11.6.0",
+ "@trpc/react-query": "^11.6.0",
+ "axios": "^1.7.9",
+ "class-variance-authority": "^0.7.0",
+ "clsx": "^2.1.1",
+ "formik": "^2.4.9",
+ "jwt-decode": "^4.0.0",
+ "react": "19.0.0",
+ "react-dom": "19.0.0",
+ "superjson": "^2.2.1",
+ "tailwind-merge": "^2.5.5",
+ "yup": "^1.7.1",
+ "zod": "^3.24.1",
+ "zustand": "^5.0.10"
+ },
+ "devDependencies": {
+ "@types/node": "^20.17.10",
+ "@types/react": "~19.0.10",
+ "@types/react-dom": "~19.0.4",
+ "@typescript-eslint/eslint-plugin": "^8.18.1",
+ "@typescript-eslint/parser": "^8.18.1",
+ "@vitejs/plugin-react-swc": "^3.7.2",
+ "autoprefixer": "^10.4.20",
+ "eslint": "^9.25.0",
+ "eslint-plugin-react-hooks": "^5.1.0",
+ "eslint-plugin-react-refresh": "^0.4.9",
+ "postcss": "^8.4.49",
+ "tailwindcss": "^3.4.16",
+ "tailwindcss-animate": "^1.0.7",
+ "typescript": "~5.8.3",
+ "vite": "^6.0.5"
+ }
+ },
+ "apps/fallback-ui/node_modules/@types/node": {
+ "version": "20.19.26",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.26.tgz",
+ "integrity": "sha512-0l6cjgF0XnihUpndDhk+nyD3exio3iKaYROSgvh/qSevPXax3L8p5DBRFjbvalnwatGgHEQn2R88y2fA3g4irg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
+ "apps/fallback-ui/node_modules/zod": {
+ "version": "3.25.76",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
+ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
+ "apps/info-site": {
+ "name": "symbuyote-info-site",
+ "version": "1.0.0",
+ "dependencies": {
+ "express": "^4.18.2",
+ "pug": "^3.0.2"
+ }
+ },
+ "apps/info-site/node_modules/express": {
+ "version": "4.22.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz",
+ "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "~1.20.3",
+ "content-disposition": "~0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "~0.7.1",
+ "cookie-signature": "~1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "~1.3.1",
+ "fresh": "~0.5.2",
+ "http-errors": "~2.0.0",
+ "merge-descriptors": "1.0.3",
+ "methods": "~1.1.2",
+ "on-finished": "~2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "~0.1.12",
+ "proxy-addr": "~2.0.7",
+ "qs": "~6.14.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "~0.19.0",
+ "serve-static": "~1.16.2",
+ "setprototypeof": "1.2.0",
+ "statuses": "~2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "apps/user-ui": {
+ "version": "1.0.0",
+ "dependencies": {
+ "@expo/vector-icons": "^14.1.0",
+ "@react-native-community/datetimepicker": "8.4.1",
+ "@react-native-google-signin/google-signin": "^16.0.0",
+ "@react-native-picker/picker": "2.11.1",
+ "@react-navigation/bottom-tabs": "^7.3.10",
+ "@react-navigation/drawer": "^7.3.9",
+ "@react-navigation/elements": "^2.3.8",
+ "@react-navigation/native": "^7.1.6",
+ "@tanstack/react-query": "^5.85.9",
+ "@trpc/client": "^11.6.0",
+ "@trpc/react-query": "^11.6.0",
+ "axios": "^1.11.0",
+ "buffer": "^6.0.3",
+ "dayjs": "^1.11.18",
+ "expo": "~53.0.22",
+ "expo-blur": "~14.1.5",
+ "expo-constants": "~17.1.7",
+ "expo-crypto": "~14.1.5",
+ "expo-device": "~7.1.4",
+ "expo-document-picker": "~13.1.6",
+ "expo-font": "~13.3.2",
+ "expo-haptics": "~14.1.4",
+ "expo-image": "2.4.1",
+ "expo-image-picker": "~16.1.4",
+ "expo-linear-gradient": "~14.1.5",
+ "expo-linking": "~7.1.7",
+ "expo-location": "~18.1.6",
+ "expo-notifications": "~0.31.4",
+ "expo-router": "~5.1.5",
+ "expo-secure-store": "~14.2.4",
+ "expo-splash-screen": "~0.30.10",
+ "expo-status-bar": "~2.2.3",
+ "expo-symbols": "~0.4.5",
+ "expo-system-ui": "~5.0.11",
+ "expo-updates": "~0.28.17",
+ "expo-web-browser": "~14.2.0",
+ "formik": "^2.4.6",
+ "jwt-decode": "^4.0.0",
+ "react": "19.0.0",
+ "react-dom": "19.0.0",
+ "react-hook-form": "^7.62.0",
+ "react-native": "0.79.6",
+ "react-native-element-dropdown": "^2.12.4",
+ "react-native-gesture-handler": "~2.24.0",
+ "react-native-pager-view": "6.7.1",
+ "react-native-paper": "^5.14.5",
+ "react-native-razorpay": "^2.3.1",
+ "react-native-reanimated": "~3.17.4",
+ "react-native-safe-area-context": "5.4.0",
+ "react-native-screens": "~4.11.1",
+ "react-native-svg": "15.11.2",
+ "react-native-tab-view": "^4.1.3",
+ "react-native-toast-message": "^2.3.3",
+ "react-native-web": "~0.20.0",
+ "react-native-webview": "13.13.5",
+ "twrnc": "^4.9.1",
+ "yup": "^1.7.0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.25.2",
+ "@types/react": "~19.0.10",
+ "@types/react-native-razorpay": "^2.2.6",
+ "eslint": "^9.25.0",
+ "eslint-config-expo": "~9.2.0",
+ "typescript": "~5.8.3"
+ }
+ },
+ "apps/user-ui/node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "apps/user-ui/node_modules/react-native-pager-view": {
+ "version": "6.7.1",
+ "resolved": "https://registry.npmjs.org/react-native-pager-view/-/react-native-pager-view-6.7.1.tgz",
+ "integrity": "sha512-cBSr6xw4g5N7Kd3VGWcf+kmaH7iBWb0DXAf2bVo3bXkzBcBbTOmYSvc0LVLHhUPW8nEq5WjT9LCIYAzgF++EXw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/@0no-co/graphql.web": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@0no-co/graphql.web/-/graphql.web-1.2.0.tgz",
+ "integrity": "sha512-/1iHy9TTr63gE1YcR5idjx8UREz1s0kFhydf3bBLCXyqjhkIc6igAzTOx3zPifCwFR87tsh/4Pa9cNts6d2otw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
+ },
+ "peerDependenciesMeta": {
+ "graphql": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@alloc/quick-lru": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
+ "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@aws-crypto/crc32": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz",
+ "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/util": "^5.2.0",
+ "@aws-sdk/types": "^3.222.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/crc32c": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-5.2.0.tgz",
+ "integrity": "sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/util": "^5.2.0",
+ "@aws-sdk/types": "^3.222.0",
+ "tslib": "^2.6.2"
+ }
+ },
+ "node_modules/@aws-crypto/sha1-browser": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-5.2.0.tgz",
+ "integrity": "sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/supports-web-crypto": "^5.2.0",
+ "@aws-crypto/util": "^5.2.0",
+ "@aws-sdk/types": "^3.222.0",
+ "@aws-sdk/util-locate-window": "^3.0.0",
+ "@smithy/util-utf8": "^2.0.0",
+ "tslib": "^2.6.2"
+ }
+ },
+ "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/is-array-buffer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz",
+ "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-buffer-from": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz",
+ "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/is-array-buffer": "^2.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",
+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/util-buffer-from": "^2.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/sha256-browser": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz",
+ "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/sha256-js": "^5.2.0",
+ "@aws-crypto/supports-web-crypto": "^5.2.0",
+ "@aws-crypto/util": "^5.2.0",
+ "@aws-sdk/types": "^3.222.0",
+ "@aws-sdk/util-locate-window": "^3.0.0",
+ "@smithy/util-utf8": "^2.0.0",
+ "tslib": "^2.6.2"
+ }
+ },
+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz",
+ "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz",
+ "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/is-array-buffer": "^2.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",
+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/util-buffer-from": "^2.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/sha256-js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz",
+ "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/util": "^5.2.0",
+ "@aws-sdk/types": "^3.222.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/supports-web-crypto": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz",
+ "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ }
+ },
+ "node_modules/@aws-crypto/util": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz",
+ "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "^3.222.0",
+ "@smithy/util-utf8": "^2.0.0",
+ "tslib": "^2.6.2"
+ }
+ },
+ "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz",
+ "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz",
+ "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/is-array-buffer": "^2.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",
+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/util-buffer-from": "^2.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-s3": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.948.0.tgz",
+ "integrity": "sha512-uvEjds8aYA9SzhBS8RKDtsDUhNV9VhqKiHTcmvhM7gJO92q0WTn8/QeFTdNyLc6RxpiDyz+uBxS7PcdNiZzqfA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/sha1-browser": "5.2.0",
+ "@aws-crypto/sha256-browser": "5.2.0",
+ "@aws-crypto/sha256-js": "5.2.0",
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/credential-provider-node": "3.948.0",
+ "@aws-sdk/middleware-bucket-endpoint": "3.936.0",
+ "@aws-sdk/middleware-expect-continue": "3.936.0",
+ "@aws-sdk/middleware-flexible-checksums": "3.947.0",
+ "@aws-sdk/middleware-host-header": "3.936.0",
+ "@aws-sdk/middleware-location-constraint": "3.936.0",
+ "@aws-sdk/middleware-logger": "3.936.0",
+ "@aws-sdk/middleware-recursion-detection": "3.948.0",
+ "@aws-sdk/middleware-sdk-s3": "3.947.0",
+ "@aws-sdk/middleware-ssec": "3.936.0",
+ "@aws-sdk/middleware-user-agent": "3.947.0",
+ "@aws-sdk/region-config-resolver": "3.936.0",
+ "@aws-sdk/signature-v4-multi-region": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@aws-sdk/util-endpoints": "3.936.0",
+ "@aws-sdk/util-user-agent-browser": "3.936.0",
+ "@aws-sdk/util-user-agent-node": "3.947.0",
+ "@smithy/config-resolver": "^4.4.3",
+ "@smithy/core": "^3.18.7",
+ "@smithy/eventstream-serde-browser": "^4.2.5",
+ "@smithy/eventstream-serde-config-resolver": "^4.3.5",
+ "@smithy/eventstream-serde-node": "^4.2.5",
+ "@smithy/fetch-http-handler": "^5.3.6",
+ "@smithy/hash-blob-browser": "^4.2.6",
+ "@smithy/hash-node": "^4.2.5",
+ "@smithy/hash-stream-node": "^4.2.5",
+ "@smithy/invalid-dependency": "^4.2.5",
+ "@smithy/md5-js": "^4.2.5",
+ "@smithy/middleware-content-length": "^4.2.5",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/middleware-retry": "^4.4.14",
+ "@smithy/middleware-serde": "^4.2.6",
+ "@smithy/middleware-stack": "^4.2.5",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/node-http-handler": "^4.4.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "@smithy/url-parser": "^4.2.5",
+ "@smithy/util-base64": "^4.3.0",
+ "@smithy/util-body-length-browser": "^4.2.0",
+ "@smithy/util-body-length-node": "^4.2.1",
+ "@smithy/util-defaults-mode-browser": "^4.3.13",
+ "@smithy/util-defaults-mode-node": "^4.2.16",
+ "@smithy/util-endpoints": "^3.2.5",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-retry": "^4.2.5",
+ "@smithy/util-stream": "^4.5.6",
+ "@smithy/util-utf8": "^4.2.0",
+ "@smithy/util-waiter": "^4.2.5",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-sso": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.948.0.tgz",
+ "integrity": "sha512-iWjchXy8bIAVBUsKnbfKYXRwhLgRg3EqCQ5FTr3JbR+QR75rZm4ZOYXlvHGztVTmtAZ+PQVA1Y4zO7v7N87C0A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/sha256-browser": "5.2.0",
+ "@aws-crypto/sha256-js": "5.2.0",
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/middleware-host-header": "3.936.0",
+ "@aws-sdk/middleware-logger": "3.936.0",
+ "@aws-sdk/middleware-recursion-detection": "3.948.0",
+ "@aws-sdk/middleware-user-agent": "3.947.0",
+ "@aws-sdk/region-config-resolver": "3.936.0",
+ "@aws-sdk/types": "3.936.0",
+ "@aws-sdk/util-endpoints": "3.936.0",
+ "@aws-sdk/util-user-agent-browser": "3.936.0",
+ "@aws-sdk/util-user-agent-node": "3.947.0",
+ "@smithy/config-resolver": "^4.4.3",
+ "@smithy/core": "^3.18.7",
+ "@smithy/fetch-http-handler": "^5.3.6",
+ "@smithy/hash-node": "^4.2.5",
+ "@smithy/invalid-dependency": "^4.2.5",
+ "@smithy/middleware-content-length": "^4.2.5",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/middleware-retry": "^4.4.14",
+ "@smithy/middleware-serde": "^4.2.6",
+ "@smithy/middleware-stack": "^4.2.5",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/node-http-handler": "^4.4.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "@smithy/url-parser": "^4.2.5",
+ "@smithy/util-base64": "^4.3.0",
+ "@smithy/util-body-length-browser": "^4.2.0",
+ "@smithy/util-body-length-node": "^4.2.1",
+ "@smithy/util-defaults-mode-browser": "^4.3.13",
+ "@smithy/util-defaults-mode-node": "^4.2.16",
+ "@smithy/util-endpoints": "^3.2.5",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-retry": "^4.2.5",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/core": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.947.0.tgz",
+ "integrity": "sha512-Khq4zHhuAkvCFuFbgcy3GrZTzfSX7ZIjIcW1zRDxXRLZKRtuhnZdonqTUfaWi5K42/4OmxkYNpsO7X7trQOeHw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@aws-sdk/xml-builder": "3.930.0",
+ "@smithy/core": "^3.18.7",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/signature-v4": "^5.3.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-base64": "^4.3.0",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/credential-provider-env": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.947.0.tgz",
+ "integrity": "sha512-VR2V6dRELmzwAsCpK4GqxUi6UW5WNhAXS9F9AzWi5jvijwJo3nH92YNJUP4quMpgFZxJHEWyXLWgPjh9u0zYOA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/credential-provider-http": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.947.0.tgz",
+ "integrity": "sha512-inF09lh9SlHj63Vmr5d+LmwPXZc2IbK8lAruhOr3KLsZAIHEgHgGPXWDC2ukTEMzg0pkexQ6FOhXXad6klK4RA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/fetch-http-handler": "^5.3.6",
+ "@smithy/node-http-handler": "^4.4.5",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-stream": "^4.5.6",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/credential-provider-ini": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.948.0.tgz",
+ "integrity": "sha512-Cl//Qh88e8HBL7yYkJNpF5eq76IO6rq8GsatKcfVBm7RFVxCqYEPSSBtkHdbtNwQdRQqAMXc6E/lEB/CZUDxnA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/credential-provider-env": "3.947.0",
+ "@aws-sdk/credential-provider-http": "3.947.0",
+ "@aws-sdk/credential-provider-login": "3.948.0",
+ "@aws-sdk/credential-provider-process": "3.947.0",
+ "@aws-sdk/credential-provider-sso": "3.948.0",
+ "@aws-sdk/credential-provider-web-identity": "3.948.0",
+ "@aws-sdk/nested-clients": "3.948.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/credential-provider-imds": "^4.2.5",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/credential-provider-login": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.948.0.tgz",
+ "integrity": "sha512-gcKO2b6eeTuZGp3Vvgr/9OxajMrD3W+FZ2FCyJox363ZgMoYJsyNid1vuZrEuAGkx0jvveLXfwiVS0UXyPkgtw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/nested-clients": "3.948.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/credential-provider-node": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.948.0.tgz",
+ "integrity": "sha512-ep5vRLnrRdcsP17Ef31sNN4g8Nqk/4JBydcUJuFRbGuyQtrZZrVT81UeH2xhz6d0BK6ejafDB9+ZpBjXuWT5/Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/credential-provider-env": "3.947.0",
+ "@aws-sdk/credential-provider-http": "3.947.0",
+ "@aws-sdk/credential-provider-ini": "3.948.0",
+ "@aws-sdk/credential-provider-process": "3.947.0",
+ "@aws-sdk/credential-provider-sso": "3.948.0",
+ "@aws-sdk/credential-provider-web-identity": "3.948.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/credential-provider-imds": "^4.2.5",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/credential-provider-process": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.947.0.tgz",
+ "integrity": "sha512-WpanFbHe08SP1hAJNeDdBDVz9SGgMu/gc0XJ9u3uNpW99nKZjDpvPRAdW7WLA4K6essMjxWkguIGNOpij6Do2Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/credential-provider-sso": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.948.0.tgz",
+ "integrity": "sha512-gqLhX1L+zb/ZDnnYbILQqJ46j735StfWV5PbDjxRzBKS7GzsiYoaf6MyHseEopmWrez5zl5l6aWzig7UpzSeQQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/client-sso": "3.948.0",
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/token-providers": "3.948.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/credential-provider-web-identity": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.948.0.tgz",
+ "integrity": "sha512-MvYQlXVoJyfF3/SmnNzOVEtANRAiJIObEUYYyjTqKZTmcRIVVky0tPuG26XnB8LmTYgtESwJIZJj/Eyyc9WURQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/nested-clients": "3.948.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-bucket-endpoint": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.936.0.tgz",
+ "integrity": "sha512-XLSVVfAorUxZh6dzF+HTOp4R1B5EQcdpGcPliWr0KUj2jukgjZEcqbBmjyMF/p9bmyQsONX80iURF1HLAlW0qg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@aws-sdk/util-arn-parser": "3.893.0",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-config-provider": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-expect-continue": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.936.0.tgz",
+ "integrity": "sha512-Eb4ELAC23bEQLJmUMYnPWcjD3FZIsmz2svDiXEcxRkQU9r7NRID7pM7C5NPH94wOfiCk0b2Y8rVyFXW0lGQwbA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-flexible-checksums": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.947.0.tgz",
+ "integrity": "sha512-kXXxS2raNESNO+zR0L4YInVjhcGGNI2Mx0AE1ThRhDkAt2se3a+rGf9equ9YvOqA1m8Jl/GSI8cXYvSxXmS9Ag==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/crc32": "5.2.0",
+ "@aws-crypto/crc32c": "5.2.0",
+ "@aws-crypto/util": "5.2.0",
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/is-array-buffer": "^4.2.0",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-stream": "^4.5.6",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-host-header": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.936.0.tgz",
+ "integrity": "sha512-tAaObaAnsP1XnLGndfkGWFuzrJYuk9W0b/nLvol66t8FZExIAf/WdkT2NNAWOYxljVs++oHnyHBCxIlaHrzSiw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-location-constraint": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.936.0.tgz",
+ "integrity": "sha512-SCMPenDtQMd9o5da9JzkHz838w3327iqXk3cbNnXWqnNRx6unyW8FL0DZ84gIY12kAyVHz5WEqlWuekc15ehfw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-logger": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.936.0.tgz",
+ "integrity": "sha512-aPSJ12d3a3Ea5nyEnLbijCaaYJT2QjQ9iW+zGh5QcZYXmOGWbKVyPSxmVOboZQG+c1M8t6d2O7tqrwzIq8L8qw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-recursion-detection": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.948.0.tgz",
+ "integrity": "sha512-Qa8Zj+EAqA0VlAVvxpRnpBpIWJI9KUwaioY1vkeNVwXPlNaz9y9zCKVM9iU9OZ5HXpoUg6TnhATAHXHAE8+QsQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@aws/lambda-invoke-store": "^0.2.2",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-sdk-s3": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.947.0.tgz",
+ "integrity": "sha512-DS2tm5YBKhPW2PthrRBDr6eufChbwXe0NjtTZcYDfUCXf0OR+W6cIqyKguwHMJ+IyYdey30AfVw9/Lb5KB8U8A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@aws-sdk/util-arn-parser": "3.893.0",
+ "@smithy/core": "^3.18.7",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/signature-v4": "^5.3.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-config-provider": "^4.2.0",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-stream": "^4.5.6",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-ssec": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.936.0.tgz",
+ "integrity": "sha512-/GLC9lZdVp05ozRik5KsuODR/N7j+W+2TbfdFL3iS+7un+gnP6hC8RDOZd6WhpZp7drXQ9guKiTAxkZQwzS8DA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/middleware-user-agent": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.947.0.tgz",
+ "integrity": "sha512-7rpKV8YNgCP2R4F9RjWZFcD2R+SO/0R4VHIbY9iZJdH2MzzJ8ZG7h8dZ2m8QkQd1fjx4wrFJGGPJUTYXPV3baA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@aws-sdk/util-endpoints": "3.936.0",
+ "@smithy/core": "^3.18.7",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/nested-clients": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.948.0.tgz",
+ "integrity": "sha512-zcbJfBsB6h254o3NuoEkf0+UY1GpE9ioiQdENWv7odo69s8iaGBEQ4BDpsIMqcuiiUXw1uKIVNxCB1gUGYz8lw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/sha256-browser": "5.2.0",
+ "@aws-crypto/sha256-js": "5.2.0",
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/middleware-host-header": "3.936.0",
+ "@aws-sdk/middleware-logger": "3.936.0",
+ "@aws-sdk/middleware-recursion-detection": "3.948.0",
+ "@aws-sdk/middleware-user-agent": "3.947.0",
+ "@aws-sdk/region-config-resolver": "3.936.0",
+ "@aws-sdk/types": "3.936.0",
+ "@aws-sdk/util-endpoints": "3.936.0",
+ "@aws-sdk/util-user-agent-browser": "3.936.0",
+ "@aws-sdk/util-user-agent-node": "3.947.0",
+ "@smithy/config-resolver": "^4.4.3",
+ "@smithy/core": "^3.18.7",
+ "@smithy/fetch-http-handler": "^5.3.6",
+ "@smithy/hash-node": "^4.2.5",
+ "@smithy/invalid-dependency": "^4.2.5",
+ "@smithy/middleware-content-length": "^4.2.5",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/middleware-retry": "^4.4.14",
+ "@smithy/middleware-serde": "^4.2.6",
+ "@smithy/middleware-stack": "^4.2.5",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/node-http-handler": "^4.4.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "@smithy/url-parser": "^4.2.5",
+ "@smithy/util-base64": "^4.3.0",
+ "@smithy/util-body-length-browser": "^4.2.0",
+ "@smithy/util-body-length-node": "^4.2.1",
+ "@smithy/util-defaults-mode-browser": "^4.3.13",
+ "@smithy/util-defaults-mode-node": "^4.2.16",
+ "@smithy/util-endpoints": "^3.2.5",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-retry": "^4.2.5",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/region-config-resolver": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.936.0.tgz",
+ "integrity": "sha512-wOKhzzWsshXGduxO4pqSiNyL9oUtk4BEvjWm9aaq6Hmfdoydq6v6t0rAGHWPjFwy9z2haovGRi3C8IxdMB4muw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/config-resolver": "^4.4.3",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/s3-request-presigner": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.948.0.tgz",
+ "integrity": "sha512-tlQhMDsDWwUDUzzlo8XYGpmMfjGDmXgbysv1+h1v2xJe0A+ogv/nJ6KFVP94uf1j4ePmCN/gDdxEp2PWZMBPOQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/signature-v4-multi-region": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@aws-sdk/util-format-url": "3.936.0",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/signature-v4-multi-region": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.947.0.tgz",
+ "integrity": "sha512-UaYmzoxf9q3mabIA2hc4T6x5YSFUG2BpNjAZ207EA1bnQMiK+d6vZvb83t7dIWL/U1de1sGV19c1C81Jf14rrA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/middleware-sdk-s3": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/signature-v4": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/token-providers": {
+ "version": "3.948.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.948.0.tgz",
+ "integrity": "sha512-V487/kM4Teq5dcr1t5K6eoUKuqlGr9FRWL3MIMukMERJXHZvio6kox60FZ/YtciRHRI75u14YUqm2Dzddcu3+A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/core": "3.947.0",
+ "@aws-sdk/nested-clients": "3.948.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/types": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.936.0.tgz",
+ "integrity": "sha512-uz0/VlMd2pP5MepdrHizd+T+OKfyK4r3OA9JI+L/lPKg0YFQosdJNCKisr6o70E3dh8iMpFYxF1UN/4uZsyARg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/util-arn-parser": {
+ "version": "3.893.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.893.0.tgz",
+ "integrity": "sha512-u8H4f2Zsi19DGnwj5FSZzDMhytYF/bCh37vAtBsn3cNDL3YG578X5oc+wSX54pM3tOxS+NY7tvOAo52SW7koUA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/util-endpoints": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.936.0.tgz",
+ "integrity": "sha512-0Zx3Ntdpu+z9Wlm7JKUBOzS9EunwKAb4KdGUQQxDqh5Lc3ta5uBoub+FgmVuzwnmBu9U1Os8UuwVTH0Lgu+P5w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/types": "^4.9.0",
+ "@smithy/url-parser": "^4.2.5",
+ "@smithy/util-endpoints": "^3.2.5",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/util-format-url": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.936.0.tgz",
+ "integrity": "sha512-MS5eSEtDUFIAMHrJaMERiHAvDPdfxc/T869ZjDNFAIiZhyc037REw0aoTNeimNXDNy2txRNZJaAUn/kE4RwN+g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/querystring-builder": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/util-locate-window": {
+ "version": "3.893.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.893.0.tgz",
+ "integrity": "sha512-T89pFfgat6c8nMmpI8eKjBcDcgJq36+m9oiXbcUzeU55MP9ZuGgBomGjGnHaEyF36jenW9gmg3NfZDm0AO2XPg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/util-user-agent-browser": {
+ "version": "3.936.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.936.0.tgz",
+ "integrity": "sha512-eZ/XF6NxMtu+iCma58GRNRxSq4lHo6zHQLOZRIeL/ghqYJirqHdenMOwrzPettj60KWlv827RVebP9oNVrwZbw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/types": "^4.9.0",
+ "bowser": "^2.11.0",
+ "tslib": "^2.6.2"
+ }
+ },
+ "node_modules/@aws-sdk/util-user-agent-node": {
+ "version": "3.947.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.947.0.tgz",
+ "integrity": "sha512-+vhHoDrdbb+zerV4noQk1DHaUMNzWFWPpPYjVTwW2186k5BEJIecAMChYkghRrBVJ3KPWP1+JnZwOd72F3d4rQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-sdk/middleware-user-agent": "3.947.0",
+ "@aws-sdk/types": "3.936.0",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "peerDependencies": {
+ "aws-crt": ">=1.0.0"
+ },
+ "peerDependenciesMeta": {
+ "aws-crt": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@aws-sdk/xml-builder": {
+ "version": "3.930.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.930.0.tgz",
+ "integrity": "sha512-YIfkD17GocxdmlUVc3ia52QhcWuRIUJonbF8A2CYfcWNV3HzvAqpcPeC0bYUhkK+8e8YO1ARnLKZQE0TlwzorA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "fast-xml-parser": "5.2.5",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@aws/lambda-invoke-store": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.2.2.tgz",
+ "integrity": "sha512-C0NBLsIqzDIae8HFw9YIrIBsbc0xTiOtt7fAukGPnqQ/+zZNaq+4jhuccltK0QuWHBnNm/a6kLIRA6GFiM10eg==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
+ "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.27.1",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/compat-data": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz",
+ "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz",
+ "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.27.1",
+ "@babel/generator": "^7.28.5",
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-module-transforms": "^7.28.3",
+ "@babel/helpers": "^7.28.4",
+ "@babel/parser": "^7.28.5",
+ "@babel/template": "^7.27.2",
+ "@babel/traverse": "^7.28.5",
+ "@babel/types": "^7.28.5",
+ "@jridgewell/remapping": "^2.3.5",
+ "convert-source-map": "^2.0.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
+ },
+ "node_modules/@babel/core/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@babel/core/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@babel/generator": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz",
+ "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.28.5",
+ "@babel/types": "^7.28.5",
+ "@jridgewell/gen-mapping": "^0.3.12",
+ "@jridgewell/trace-mapping": "^0.3.28",
+ "jsesc": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-annotate-as-pure": {
+ "version": "7.27.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz",
+ "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.27.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.27.2",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz",
+ "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.27.2",
+ "@babel/helper-validator-option": "^7.27.1",
+ "browserslist": "^4.24.0",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-create-class-features-plugin": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.5.tgz",
+ "integrity": "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "@babel/helper-member-expression-to-functions": "^7.28.5",
+ "@babel/helper-optimise-call-expression": "^7.27.1",
+ "@babel/helper-replace-supers": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
+ "@babel/traverse": "^7.28.5",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-create-regexp-features-plugin": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz",
+ "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "regexpu-core": "^6.3.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-define-polyfill-provider": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.5.tgz",
+ "integrity": "sha512-uJnGFcPsWQK8fvjgGP5LZUZZsYGIoPeRjSF5PGwrelYgq7Q15/Ft9NGFp1zglwgIv//W0uG4BevRuSJRyylZPg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "debug": "^4.4.1",
+ "lodash.debounce": "^4.0.8",
+ "resolve": "^1.22.10"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/@babel/helper-define-polyfill-provider/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@babel/helper-define-polyfill-provider/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@babel/helper-globals": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
+ "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-member-expression-to-functions": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz",
+ "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.28.5",
+ "@babel/types": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz",
+ "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.27.1",
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz",
+ "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.27.1",
+ "@babel/traverse": "^7.28.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-optimise-call-expression": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz",
+ "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-plugin-utils": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz",
+ "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-remap-async-to-generator": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.27.1.tgz",
+ "integrity": "sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-wrap-function": "^7.27.1",
+ "@babel/traverse": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-replace-supers": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz",
+ "integrity": "sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-member-expression-to-functions": "^7.27.1",
+ "@babel/helper-optimise-call-expression": "^7.27.1",
+ "@babel/traverse": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-skip-transparent-expression-wrappers": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz",
+ "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.27.1",
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
+ "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-wrap-function": {
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.3.tgz",
+ "integrity": "sha512-zdf983tNfLZFletc0RRXYrHrucBEg95NIFMkn6K9dbeMYnsgHaSBGcQqdsCSStG2PYwRre0Qc2NNSCXbG+xc6g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.27.2",
+ "@babel/traverse": "^7.28.3",
+ "@babel/types": "^7.28.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz",
+ "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.27.2",
+ "@babel/types": "^7.28.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz",
+ "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.25.9",
+ "chalk": "^2.4.2",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "license": "MIT"
+ },
+ "node_modules/@babel/highlight/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz",
+ "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.28.5"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-proposal-decorators": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.28.0.tgz",
+ "integrity": "sha512-zOiZqvANjWDUaUS9xMxbMcK/Zccztbe/6ikvUXaG9nsPH3w6qh5UaPGAnirI/WhIbZ8m3OHU0ReyPrknG+ZKeg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/plugin-syntax-decorators": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-proposal-export-default-from": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.27.1.tgz",
+ "integrity": "sha512-hjlsMBl1aJc5lp8MoCDEZCiYzlgdRAShOjAfRw6X+GlpLpUPU7c3XNLsKFZbQk/1cRzBlJ7CXg3xJAJMrFa1Uw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-async-generators": {
+ "version": "7.8.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
+ "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-bigint": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz",
+ "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-class-properties": {
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
+ "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.12.13"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-class-static-block": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz",
+ "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-decorators": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.27.1.tgz",
+ "integrity": "sha512-YMq8Z87Lhl8EGkmb0MwYkt36QnxC+fzCgrl66ereamPlYToRpIk5nUjKUY3QKLWq8mwUB1BgbeXcTJhZOCDg5A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-dynamic-import": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
+ "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-export-default-from": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.27.1.tgz",
+ "integrity": "sha512-eBC/3KSekshx19+N40MzjWqJd7KTEdOoLesAfa4IDFI8eRz5a47i5Oszus6zG/cwIXN63YhgLOMSSNJx49sENg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-flow": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.27.1.tgz",
+ "integrity": "sha512-p9OkPbZ5G7UT1MofwYFigGebnrzGJacoBSQM0/6bi/PUMVE+qlWDD/OalvQKbwgQzU6dl0xAv6r4X7Jme0RYxA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-import-attributes": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz",
+ "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-import-meta": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz",
+ "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-json-strings": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+ "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-jsx": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz",
+ "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-logical-assignment-operators": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+ "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
+ "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-numeric-separator": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
+ "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-object-rest-spread": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
+ "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-optional-catch-binding": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
+ "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-optional-chaining": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
+ "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-private-property-in-object": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz",
+ "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-top-level-await": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
+ "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-typescript": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz",
+ "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-arrow-functions": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz",
+ "integrity": "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-async-generator-functions": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.0.tgz",
+ "integrity": "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-remap-async-to-generator": "^7.27.1",
+ "@babel/traverse": "^7.28.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-async-to-generator": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.27.1.tgz",
+ "integrity": "sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-remap-async-to-generator": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-block-scoping": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.5.tgz",
+ "integrity": "sha512-45DmULpySVvmq9Pj3X9B+62Xe+DJGov27QravQJU1LLcapR6/10i+gYVAucGGJpHBp5mYxIMK4nDAT/QDLr47g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-class-properties": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.27.1.tgz",
+ "integrity": "sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-classes": {
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.4.tgz",
+ "integrity": "sha512-cFOlhIYPBv/iBoc+KS3M6et2XPtbT2HiCRfBXWtfpc9OAyostldxIf9YAYB6ypURBBbx+Qv6nyrLzASfJe+hBA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-globals": "^7.28.0",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-replace-supers": "^7.27.1",
+ "@babel/traverse": "^7.28.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-computed-properties": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.27.1.tgz",
+ "integrity": "sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/template": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-destructuring": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz",
+ "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/traverse": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-export-namespace-from": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.27.1.tgz",
+ "integrity": "sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-flow-strip-types": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.27.1.tgz",
+ "integrity": "sha512-G5eDKsu50udECw7DL2AcsysXiQyB7Nfg521t2OAJ4tbfTJ27doHLeF/vlI1NZGlLdbb/v+ibvtL1YBQqYOwJGg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/plugin-syntax-flow": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-for-of": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz",
+ "integrity": "sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-function-name": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.27.1.tgz",
+ "integrity": "sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/traverse": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-literals": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.27.1.tgz",
+ "integrity": "sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-logical-assignment-operators": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.5.tgz",
+ "integrity": "sha512-axUuqnUTBuXyHGcJEVVh9pORaN6wC5bYfE7FGzPiaWa3syib9m7g+/IT/4VgCOe2Upef43PHzeAvcrVek6QuuA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-commonjs": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz",
+ "integrity": "sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.27.1.tgz",
+ "integrity": "sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-nullish-coalescing-operator": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.27.1.tgz",
+ "integrity": "sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-numeric-separator": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.27.1.tgz",
+ "integrity": "sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-object-rest-spread": {
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.4.tgz",
+ "integrity": "sha512-373KA2HQzKhQCYiRVIRr+3MjpCObqzDlyrM6u4I201wL8Mp2wHf7uB8GhDwis03k2ti8Zr65Zyyqs1xOxUF/Ew==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/plugin-transform-destructuring": "^7.28.0",
+ "@babel/plugin-transform-parameters": "^7.27.7",
+ "@babel/traverse": "^7.28.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-optional-catch-binding": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.27.1.tgz",
+ "integrity": "sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-optional-chaining": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.5.tgz",
+ "integrity": "sha512-N6fut9IZlPnjPwgiQkXNhb+cT8wQKFlJNqcZkWlcTqkcqx6/kU4ynGmLFoa4LViBSirn05YAwk+sQBbPfxtYzQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-parameters": {
+ "version": "7.27.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.7.tgz",
+ "integrity": "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-private-methods": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.27.1.tgz",
+ "integrity": "sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-private-property-in-object": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.27.1.tgz",
+ "integrity": "sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-create-class-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-display-name": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.28.0.tgz",
+ "integrity": "sha512-D6Eujc2zMxKjfa4Zxl4GHMsmhKKZ9VpcqIchJLvwTxad9zWIYulwYItBovpDOoNLISpcZSXoDJ5gaGbQUDqViA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.27.1.tgz",
+ "integrity": "sha512-2KH4LWGSrJIkVf5tSiBFYuXDAoWRq2MMwgivCf+93dd0GQi8RXLjKA/0EvRnVV5G0hrHczsquXuD01L8s6dmBw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-module-imports": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/plugin-syntax-jsx": "^7.27.1",
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-development": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.27.1.tgz",
+ "integrity": "sha512-ykDdF5yI4f1WrAolLqeF3hmYU12j9ntLQl/AOG1HAS21jxyg1Q0/J/tpREuYLfatGdGmXp/3yS0ZA76kOlVq9Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/plugin-transform-react-jsx": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-self": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz",
+ "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-source": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz",
+ "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-pure-annotations": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.27.1.tgz",
+ "integrity": "sha512-JfuinvDOsD9FVMTHpzA/pBLisxpv1aSf+OIV8lgH3MuWrks19R27e6a6DipIg4aX1Zm9Wpb04p8wljfKrVSnPA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-regenerator": {
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.4.tgz",
+ "integrity": "sha512-+ZEdQlBoRg9m2NnzvEeLgtvBMO4tkFBw5SQIUgLICgTrumLoU7lr+Oghi6km2PFj+dbUt2u1oby2w3BDO9YQnA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-runtime": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.28.5.tgz",
+ "integrity": "sha512-20NUVgOrinudkIBzQ2bNxP08YpKprUkRTiRSd2/Z5GOdPImJGkoN4Z7IQe1T5AdyKI1i5L6RBmluqdSzvaq9/w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "babel-plugin-polyfill-corejs2": "^0.4.14",
+ "babel-plugin-polyfill-corejs3": "^0.13.0",
+ "babel-plugin-polyfill-regenerator": "^0.6.5",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-shorthand-properties": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz",
+ "integrity": "sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-spread": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.27.1.tgz",
+ "integrity": "sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-sticky-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.27.1.tgz",
+ "integrity": "sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-template-literals": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz",
+ "integrity": "sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-typescript": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.5.tgz",
+ "integrity": "sha512-x2Qa+v/CuEoX7Dr31iAfr0IhInrVOWZU/2vJMJ00FOR/2nM0BcBEclpaf9sWCDc+v5e9dMrhSH8/atq/kX7+bA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "@babel/helper-create-class-features-plugin": "^7.28.5",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
+ "@babel/plugin-syntax-typescript": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz",
+ "integrity": "sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/preset-react": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.28.5.tgz",
+ "integrity": "sha512-Z3J8vhRq7CeLjdC58jLv4lnZ5RKFUJWqH5emvxmv9Hv3BD1T9R/Im713R4MTKwvFaV74ejZ3sM01LyEKk4ugNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-validator-option": "^7.27.1",
+ "@babel/plugin-transform-react-display-name": "^7.28.0",
+ "@babel/plugin-transform-react-jsx": "^7.27.1",
+ "@babel/plugin-transform-react-jsx-development": "^7.27.1",
+ "@babel/plugin-transform-react-pure-annotations": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/preset-typescript": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz",
+ "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-validator-option": "^7.27.1",
+ "@babel/plugin-syntax-jsx": "^7.27.1",
+ "@babel/plugin-transform-modules-commonjs": "^7.27.1",
+ "@babel/plugin-transform-typescript": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
+ "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.27.2",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz",
+ "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.27.1",
+ "@babel/parser": "^7.27.2",
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz",
+ "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.27.1",
+ "@babel/generator": "^7.28.5",
+ "@babel/helper-globals": "^7.28.0",
+ "@babel/parser": "^7.28.5",
+ "@babel/template": "^7.27.2",
+ "@babel/types": "^7.28.5",
+ "debug": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse--for-generate-function-map": {
+ "name": "@babel/traverse",
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz",
+ "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.27.1",
+ "@babel/generator": "^7.28.5",
+ "@babel/helper-globals": "^7.28.0",
+ "@babel/parser": "^7.28.5",
+ "@babel/template": "^7.27.2",
+ "@babel/types": "^7.28.5",
+ "debug": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse--for-generate-function-map/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@babel/traverse--for-generate-function-map/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@babel/traverse/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@babel/traverse/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@babel/types": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz",
+ "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@callstack/react-theme-provider": {
+ "version": "3.0.9",
+ "resolved": "https://registry.npmjs.org/@callstack/react-theme-provider/-/react-theme-provider-3.0.9.tgz",
+ "integrity": "sha512-tTQ0uDSCL0ypeMa8T/E9wAZRGKWj8kXP7+6RYgPTfOPs9N07C9xM8P02GJ3feETap4Ux5S69D9nteq9mEj86NA==",
+ "license": "MIT",
+ "dependencies": {
+ "deepmerge": "^3.2.0",
+ "hoist-non-react-statics": "^3.3.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.3.0"
+ }
+ },
+ "node_modules/@callstack/react-theme-provider/node_modules/deepmerge": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz",
+ "integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/@drizzle-team/brocli": {
+ "version": "0.10.2",
+ "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.10.2.tgz",
+ "integrity": "sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/@egjs/hammerjs": {
+ "version": "2.0.17",
+ "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
+ "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hammerjs": "^2.0.36"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/@emnapi/core": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.1.tgz",
+ "integrity": "sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/wasi-threads": "1.1.0",
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/runtime": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz",
+ "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/wasi-threads": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz",
+ "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@esbuild-kit/core-utils/-/core-utils-3.3.2.tgz",
+ "integrity": "sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==",
+ "deprecated": "Merged into tsx: https://tsx.is",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "~0.18.20",
+ "source-map-support": "^0.5.21"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
+ "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz",
+ "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz",
+ "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
+ "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz",
+ "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz",
+ "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz",
+ "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz",
+ "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz",
+ "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz",
+ "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-loong64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz",
+ "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-mips64el": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz",
+ "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ppc64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz",
+ "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-riscv64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz",
+ "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-s390x": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz",
+ "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
+ "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/netbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/openbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/sunos-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz",
+ "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz",
+ "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz",
+ "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
+ "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
+ "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/android-arm": "0.18.20",
+ "@esbuild/android-arm64": "0.18.20",
+ "@esbuild/android-x64": "0.18.20",
+ "@esbuild/darwin-arm64": "0.18.20",
+ "@esbuild/darwin-x64": "0.18.20",
+ "@esbuild/freebsd-arm64": "0.18.20",
+ "@esbuild/freebsd-x64": "0.18.20",
+ "@esbuild/linux-arm": "0.18.20",
+ "@esbuild/linux-arm64": "0.18.20",
+ "@esbuild/linux-ia32": "0.18.20",
+ "@esbuild/linux-loong64": "0.18.20",
+ "@esbuild/linux-mips64el": "0.18.20",
+ "@esbuild/linux-ppc64": "0.18.20",
+ "@esbuild/linux-riscv64": "0.18.20",
+ "@esbuild/linux-s390x": "0.18.20",
+ "@esbuild/linux-x64": "0.18.20",
+ "@esbuild/netbsd-x64": "0.18.20",
+ "@esbuild/openbsd-x64": "0.18.20",
+ "@esbuild/sunos-x64": "0.18.20",
+ "@esbuild/win32-arm64": "0.18.20",
+ "@esbuild/win32-ia32": "0.18.20",
+ "@esbuild/win32-x64": "0.18.20"
+ }
+ },
+ "node_modules/@esbuild-kit/esm-loader": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.6.5.tgz",
+ "integrity": "sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==",
+ "deprecated": "Merged into tsx: https://tsx.is",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@esbuild-kit/core-utils": "^3.3.2",
+ "get-tsconfig": "^4.7.0"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",
+ "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz",
+ "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz",
+ "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz",
+ "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz",
+ "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz",
+ "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz",
+ "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz",
+ "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz",
+ "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz",
+ "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz",
+ "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz",
+ "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz",
+ "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz",
+ "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz",
+ "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz",
+ "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz",
+ "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz",
+ "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz",
+ "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz",
+ "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz",
+ "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz",
+ "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz",
+ "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.9.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz",
+ "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "eslint-visitor-keys": "^3.4.3"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.12.2",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",
+ "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@eslint/config-array": {
+ "version": "0.21.1",
+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz",
+ "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/object-schema": "^2.1.7",
+ "debug": "^4.3.1",
+ "minimatch": "^3.1.2"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/config-array/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/@eslint/config-array/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@eslint/config-array/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@eslint/config-array/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@eslint/config-helpers": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz",
+ "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^0.17.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/core": {
+ "version": "0.17.0",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
+ "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/json-schema": "^7.0.15"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/eslintrc": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz",
+ "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^6.12.4",
+ "debug": "^4.3.2",
+ "espree": "^10.0.1",
+ "globals": "^14.0.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.1",
+ "minimatch": "^3.1.2",
+ "strip-json-comments": "^3.1.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@eslint/js": {
+ "version": "9.39.1",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz",
+ "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://eslint.org/donate"
+ }
+ },
+ "node_modules/@eslint/object-schema": {
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz",
+ "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/plugin-kit": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz",
+ "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^0.17.0",
+ "levn": "^0.4.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@expo/cli": {
+ "version": "0.24.23",
+ "resolved": "https://registry.npmjs.org/@expo/cli/-/cli-0.24.23.tgz",
+ "integrity": "sha512-uIlgadw38yVOczYOm9BeW0wkWdC5rtcSP0+NHqOS31DAh2KNzOPRt9dnNuP0ErS+QJM3ymZSjZgo4hUvyFQ7Kw==",
+ "license": "MIT",
+ "dependencies": {
+ "@0no-co/graphql.web": "^1.0.8",
+ "@babel/runtime": "^7.20.0",
+ "@expo/code-signing-certificates": "^0.0.5",
+ "@expo/config": "~11.0.13",
+ "@expo/config-plugins": "~10.1.2",
+ "@expo/devcert": "^1.1.2",
+ "@expo/env": "~1.0.7",
+ "@expo/image-utils": "^0.7.6",
+ "@expo/json-file": "^9.1.5",
+ "@expo/metro-config": "~0.20.18",
+ "@expo/osascript": "^2.2.5",
+ "@expo/package-manager": "^1.8.6",
+ "@expo/plist": "^0.3.5",
+ "@expo/prebuild-config": "^9.0.12",
+ "@expo/schema-utils": "^0.1.0",
+ "@expo/spawn-async": "^1.7.2",
+ "@expo/ws-tunnel": "^1.0.1",
+ "@expo/xcpretty": "^4.3.0",
+ "@react-native/dev-middleware": "0.79.6",
+ "@urql/core": "^5.0.6",
+ "@urql/exchange-retry": "^1.3.0",
+ "accepts": "^1.3.8",
+ "arg": "^5.0.2",
+ "better-opn": "~3.0.2",
+ "bplist-creator": "0.1.0",
+ "bplist-parser": "^0.3.1",
+ "chalk": "^4.0.0",
+ "ci-info": "^3.3.0",
+ "compression": "^1.7.4",
+ "connect": "^3.7.0",
+ "debug": "^4.3.4",
+ "env-editor": "^0.4.1",
+ "freeport-async": "^2.0.0",
+ "getenv": "^2.0.0",
+ "glob": "^10.4.2",
+ "lan-network": "^0.1.6",
+ "minimatch": "^9.0.0",
+ "node-forge": "^1.3.1",
+ "npm-package-arg": "^11.0.0",
+ "ora": "^3.4.0",
+ "picomatch": "^3.0.1",
+ "pretty-bytes": "^5.6.0",
+ "pretty-format": "^29.7.0",
+ "progress": "^2.0.3",
+ "prompts": "^2.3.2",
+ "qrcode-terminal": "0.11.0",
+ "require-from-string": "^2.0.2",
+ "requireg": "^0.2.2",
+ "resolve": "^1.22.2",
+ "resolve-from": "^5.0.0",
+ "resolve.exports": "^2.0.3",
+ "semver": "^7.6.0",
+ "send": "^0.19.0",
+ "slugify": "^1.3.4",
+ "source-map-support": "~0.5.21",
+ "stacktrace-parser": "^0.1.10",
+ "structured-headers": "^0.4.1",
+ "tar": "^7.4.3",
+ "terminal-link": "^2.1.1",
+ "undici": "^6.18.2",
+ "wrap-ansi": "^7.0.0",
+ "ws": "^8.12.1"
+ },
+ "bin": {
+ "expo-internal": "build/bin/cli"
+ }
+ },
+ "node_modules/@expo/cli/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@expo/cli/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/cli/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@expo/code-signing-certificates": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/@expo/code-signing-certificates/-/code-signing-certificates-0.0.5.tgz",
+ "integrity": "sha512-BNhXkY1bblxKZpltzAx98G2Egj9g1Q+JRcvR7E99DOj862FTCX+ZPsAUtPTr7aHxwtrL7+fL3r0JSmM9kBm+Bw==",
+ "license": "MIT",
+ "dependencies": {
+ "node-forge": "^1.2.1",
+ "nullthrows": "^1.1.1"
+ }
+ },
+ "node_modules/@expo/config": {
+ "version": "11.0.13",
+ "resolved": "https://registry.npmjs.org/@expo/config/-/config-11.0.13.tgz",
+ "integrity": "sha512-TnGb4u/zUZetpav9sx/3fWK71oCPaOjZHoVED9NaEncktAd0Eonhq5NUghiJmkUGt3gGSjRAEBXiBbbY9/B1LA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "~7.10.4",
+ "@expo/config-plugins": "~10.1.2",
+ "@expo/config-types": "^53.0.5",
+ "@expo/json-file": "^9.1.5",
+ "deepmerge": "^4.3.1",
+ "getenv": "^2.0.0",
+ "glob": "^10.4.2",
+ "require-from-string": "^2.0.2",
+ "resolve-from": "^5.0.0",
+ "resolve-workspace-root": "^2.0.0",
+ "semver": "^7.6.0",
+ "slugify": "^1.3.4",
+ "sucrase": "3.35.0"
+ }
+ },
+ "node_modules/@expo/config-plugins": {
+ "version": "10.1.2",
+ "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-10.1.2.tgz",
+ "integrity": "sha512-IMYCxBOcnuFStuK0Ay+FzEIBKrwW8OVUMc65+v0+i7YFIIe8aL342l7T4F8lR4oCfhXn7d6M5QPgXvjtc/gAcw==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/config-types": "^53.0.5",
+ "@expo/json-file": "~9.1.5",
+ "@expo/plist": "^0.3.5",
+ "@expo/sdk-runtime-versions": "^1.0.0",
+ "chalk": "^4.1.2",
+ "debug": "^4.3.5",
+ "getenv": "^2.0.0",
+ "glob": "^10.4.2",
+ "resolve-from": "^5.0.0",
+ "semver": "^7.5.4",
+ "slash": "^3.0.0",
+ "slugify": "^1.6.6",
+ "xcode": "^3.0.1",
+ "xml2js": "0.6.0"
+ }
+ },
+ "node_modules/@expo/config-plugins/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@expo/config-plugins/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/config-plugins/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@expo/config-types": {
+ "version": "53.0.5",
+ "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-53.0.5.tgz",
+ "integrity": "sha512-kqZ0w44E+HEGBjy+Lpyn0BVL5UANg/tmNixxaRMLS6nf37YsDrLk2VMAmeKMMk5CKG0NmOdVv3ngeUjRQMsy9g==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/config/node_modules/@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "node_modules/@expo/config/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@expo/devcert": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@expo/devcert/-/devcert-1.2.1.tgz",
+ "integrity": "sha512-qC4eaxmKMTmJC2ahwyui6ud8f3W60Ss7pMkpBq40Hu3zyiAaugPXnZ24145U7K36qO9UHdZUVxsCvIpz2RYYCA==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/sudo-prompt": "^9.3.1",
+ "debug": "^3.1.0"
+ }
+ },
+ "node_modules/@expo/devcert/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/@expo/devcert/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/env": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/@expo/env/-/env-1.0.7.tgz",
+ "integrity": "sha512-qSTEnwvuYJ3umapO9XJtrb1fAqiPlmUUg78N0IZXXGwQRt+bkp0OBls+Y5Mxw/Owj8waAM0Z3huKKskRADR5ow==",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^4.0.0",
+ "debug": "^4.3.4",
+ "dotenv": "~16.4.5",
+ "dotenv-expand": "~11.0.6",
+ "getenv": "^2.0.0"
+ }
+ },
+ "node_modules/@expo/env/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@expo/env/node_modules/dotenv": {
+ "version": "16.4.7",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
+ "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/@expo/env/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/fingerprint": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/@expo/fingerprint/-/fingerprint-0.13.4.tgz",
+ "integrity": "sha512-MYfPYBTMfrrNr07DALuLhG6EaLVNVrY/PXjEzsjWdWE4ZFn0yqI0IdHNkJG7t1gePT8iztHc7qnsx+oo/rDo6w==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/spawn-async": "^1.7.2",
+ "arg": "^5.0.2",
+ "chalk": "^4.1.2",
+ "debug": "^4.3.4",
+ "find-up": "^5.0.0",
+ "getenv": "^2.0.0",
+ "glob": "^10.4.2",
+ "ignore": "^5.3.1",
+ "minimatch": "^9.0.0",
+ "p-limit": "^3.1.0",
+ "resolve-from": "^5.0.0",
+ "semver": "^7.6.0"
+ },
+ "bin": {
+ "fingerprint": "bin/cli.js"
+ }
+ },
+ "node_modules/@expo/fingerprint/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@expo/fingerprint/node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/@expo/fingerprint/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/fingerprint/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@expo/image-utils": {
+ "version": "0.7.6",
+ "resolved": "https://registry.npmjs.org/@expo/image-utils/-/image-utils-0.7.6.tgz",
+ "integrity": "sha512-GKnMqC79+mo/1AFrmAcUcGfbsXXTRqOMNS1umebuevl3aaw+ztsYEFEiuNhHZW7PQ3Xs3URNT513ZxKhznDscw==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/spawn-async": "^1.7.2",
+ "chalk": "^4.0.0",
+ "getenv": "^2.0.0",
+ "jimp-compact": "0.16.1",
+ "parse-png": "^2.1.0",
+ "resolve-from": "^5.0.0",
+ "semver": "^7.6.0",
+ "temp-dir": "~2.0.0",
+ "unique-string": "~2.0.0"
+ }
+ },
+ "node_modules/@expo/image-utils/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@expo/json-file": {
+ "version": "9.1.5",
+ "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-9.1.5.tgz",
+ "integrity": "sha512-prWBhLUlmcQtvN6Y7BpW2k9zXGd3ySa3R6rAguMJkp1z22nunLN64KYTUWfijFlprFoxm9r2VNnGkcbndAlgKA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "~7.10.4",
+ "json5": "^2.2.3"
+ }
+ },
+ "node_modules/@expo/json-file/node_modules/@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "node_modules/@expo/metro-config": {
+ "version": "0.20.18",
+ "resolved": "https://registry.npmjs.org/@expo/metro-config/-/metro-config-0.20.18.tgz",
+ "integrity": "sha512-qPYq3Cq61KQO1CppqtmxA1NGKpzFOmdiL7WxwLhEVnz73LPSgneW7dV/3RZwVFkjThzjA41qB4a9pxDqtpepPg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.20.0",
+ "@babel/generator": "^7.20.5",
+ "@babel/parser": "^7.20.0",
+ "@babel/types": "^7.20.0",
+ "@expo/config": "~11.0.13",
+ "@expo/env": "~1.0.7",
+ "@expo/json-file": "~9.1.5",
+ "@expo/spawn-async": "^1.7.2",
+ "chalk": "^4.1.0",
+ "debug": "^4.3.2",
+ "dotenv": "~16.4.5",
+ "dotenv-expand": "~11.0.6",
+ "getenv": "^2.0.0",
+ "glob": "^10.4.2",
+ "jsc-safe-url": "^0.2.4",
+ "lightningcss": "~1.27.0",
+ "minimatch": "^9.0.0",
+ "postcss": "~8.4.32",
+ "resolve-from": "^5.0.0"
+ }
+ },
+ "node_modules/@expo/metro-config/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@expo/metro-config/node_modules/dotenv": {
+ "version": "16.4.7",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
+ "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/@expo/metro-config/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/metro-config/node_modules/postcss": {
+ "version": "8.4.49",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
+ "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.7",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/@expo/metro-runtime": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/@expo/metro-runtime/-/metro-runtime-5.0.5.tgz",
+ "integrity": "sha512-P8UFTi+YsmiD1BmdTdiIQITzDMcZgronsA3RTQ4QKJjHM3bas11oGzLQOnFaIZnlEV8Rrr3m1m+RHxvnpL+t/A==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react-native": "*"
+ }
+ },
+ "node_modules/@expo/osascript": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/@expo/osascript/-/osascript-2.3.8.tgz",
+ "integrity": "sha512-/TuOZvSG7Nn0I8c+FcEaoHeBO07yu6vwDgk7rZVvAXoeAK5rkA09jRyjYsZo+0tMEFaToBeywA6pj50Mb3ny9w==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/spawn-async": "^1.7.2",
+ "exec-async": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@expo/package-manager": {
+ "version": "1.9.9",
+ "resolved": "https://registry.npmjs.org/@expo/package-manager/-/package-manager-1.9.9.tgz",
+ "integrity": "sha512-Nv5THOwXzPprMJwbnXU01iXSrCp3vJqly9M4EJ2GkKko9Ifer2ucpg7x6OUsE09/lw+npaoUnHMXwkw7gcKxlg==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/json-file": "^10.0.8",
+ "@expo/spawn-async": "^1.7.2",
+ "chalk": "^4.0.0",
+ "npm-package-arg": "^11.0.0",
+ "ora": "^3.4.0",
+ "resolve-workspace-root": "^2.0.0"
+ }
+ },
+ "node_modules/@expo/package-manager/node_modules/@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "node_modules/@expo/package-manager/node_modules/@expo/json-file": {
+ "version": "10.0.8",
+ "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-10.0.8.tgz",
+ "integrity": "sha512-9LOTh1PgKizD1VXfGQ88LtDH0lRwq9lsTb4aichWTWSWqy3Ugfkhfm3BhzBIkJJfQQ5iJu3m/BoRlEIjoCGcnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "~7.10.4",
+ "json5": "^2.2.3"
+ }
+ },
+ "node_modules/@expo/plist": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.3.5.tgz",
+ "integrity": "sha512-9RYVU1iGyCJ7vWfg3e7c/NVyMFs8wbl+dMWZphtFtsqyN9zppGREU3ctlD3i8KUE0sCUTVnLjCWr+VeUIDep2g==",
+ "license": "MIT",
+ "dependencies": {
+ "@xmldom/xmldom": "^0.8.8",
+ "base64-js": "^1.2.3",
+ "xmlbuilder": "^15.1.1"
+ }
+ },
+ "node_modules/@expo/prebuild-config": {
+ "version": "9.0.12",
+ "resolved": "https://registry.npmjs.org/@expo/prebuild-config/-/prebuild-config-9.0.12.tgz",
+ "integrity": "sha512-AKH5Scf+gEMgGxZZaimrJI2wlUJlRoqzDNn7/rkhZa5gUTnO4l6slKak2YdaH+nXlOWCNfAQWa76NnpQIfmv6Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/config": "~11.0.13",
+ "@expo/config-plugins": "~10.1.2",
+ "@expo/config-types": "^53.0.5",
+ "@expo/image-utils": "^0.7.6",
+ "@expo/json-file": "^9.1.5",
+ "@react-native/normalize-colors": "0.79.6",
+ "debug": "^4.3.1",
+ "resolve-from": "^5.0.0",
+ "semver": "^7.6.0",
+ "xml2js": "0.6.0"
+ }
+ },
+ "node_modules/@expo/prebuild-config/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@expo/prebuild-config/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/prebuild-config/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@expo/schema-utils": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/@expo/schema-utils/-/schema-utils-0.1.8.tgz",
+ "integrity": "sha512-9I6ZqvnAvKKDiO+ZF8BpQQFYWXOJvTAL5L/227RUbWG1OVZDInFifzCBiqAZ3b67NRfeAgpgvbA7rejsqhY62A==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/sdk-runtime-versions": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@expo/sdk-runtime-versions/-/sdk-runtime-versions-1.0.0.tgz",
+ "integrity": "sha512-Doz2bfiPndXYFPMRwPyGa1k5QaKDVpY806UJj570epIiMzWaYyCtobasyfC++qfIXVb5Ocy7r3tP9d62hAQ7IQ==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/server": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/@expo/server/-/server-0.6.3.tgz",
+ "integrity": "sha512-Ea7NJn9Xk1fe4YeJ86rObHSv/bm3u/6WiQPXEqXJ2GrfYpVab2Swoh9/PnSM3KjR64JAgKjArDn1HiPjITCfHA==",
+ "license": "MIT",
+ "dependencies": {
+ "abort-controller": "^3.0.0",
+ "debug": "^4.3.4",
+ "source-map-support": "~0.5.21",
+ "undici": "^6.18.2 || ^7.0.0"
+ }
+ },
+ "node_modules/@expo/server/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@expo/server/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/spawn-async": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/@expo/spawn-async/-/spawn-async-1.7.2.tgz",
+ "integrity": "sha512-QdWi16+CHB9JYP7gma19OVVg0BFkvU8zNj9GjWorYI8Iv8FUxjOCcYRuAmX4s/h91e4e7BPsskc8cSrZYho9Ew==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-spawn": "^7.0.3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@expo/sudo-prompt": {
+ "version": "9.3.2",
+ "resolved": "https://registry.npmjs.org/@expo/sudo-prompt/-/sudo-prompt-9.3.2.tgz",
+ "integrity": "sha512-HHQigo3rQWKMDzYDLkubN5WQOYXJJE2eNqIQC2axC2iO3mHdwnIR7FgZVvHWtBwAdzBgAP0ECp8KqS8TiMKvgw==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/vector-icons": {
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/@expo/vector-icons/-/vector-icons-14.1.0.tgz",
+ "integrity": "sha512-7T09UE9h8QDTsUeMGymB4i+iqvtEeaO5VvUjryFB4tugDTG/bkzViWA74hm5pfjjDEhYMXWaX112mcvhccmIwQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo-font": "*",
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/@expo/ws-tunnel": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/@expo/ws-tunnel/-/ws-tunnel-1.0.6.tgz",
+ "integrity": "sha512-nDRbLmSrJar7abvUjp3smDwH8HcbZcoOEa5jVPUv9/9CajgmWw20JNRwTuBRzWIWIkEJDkz20GoNA+tSwUqk0Q==",
+ "license": "MIT"
+ },
+ "node_modules/@expo/xcpretty": {
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/@expo/xcpretty/-/xcpretty-4.3.2.tgz",
+ "integrity": "sha512-ReZxZ8pdnoI3tP/dNnJdnmAk7uLT4FjsKDGW7YeDdvdOMz2XCQSmSCM9IWlrXuWtMF9zeSB6WJtEhCQ41gQOfw==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@babel/code-frame": "7.10.4",
+ "chalk": "^4.1.0",
+ "find-up": "^5.0.0",
+ "js-yaml": "^4.1.0"
+ },
+ "bin": {
+ "excpretty": "build/cli.js"
+ }
+ },
+ "node_modules/@expo/xcpretty/node_modules/@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "node_modules/@humanfs/core": {
+ "version": "0.19.1",
+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
+ "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanfs/node": {
+ "version": "0.16.7",
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",
+ "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@humanfs/core": "^0.19.1",
+ "@humanwhocodes/retry": "^0.4.0"
+ },
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@humanwhocodes/retry": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.18"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@ide/backoff": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@ide/backoff/-/backoff-1.0.0.tgz",
+ "integrity": "sha512-F0YfUDjvT+Mtt/R4xdl2X0EYCHMMiJqNLdxHD++jDT5ydEFIyqbCHh51Qx2E211dgZprPKhV7sHmnXKpLuvc5g==",
+ "license": "MIT"
+ },
+ "node_modules/@ioredis/commands": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.4.0.tgz",
+ "integrity": "sha512-aFT2yemJJo+TZCmieA7qnYGQooOS7QfNmYrzGtsYd3g9j5iDP8AimYYAesf79ohjbLG12XxC4nG5DyEnC88AsQ==",
+ "license": "MIT"
+ },
+ "node_modules/@isaacs/balanced-match": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
+ "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/@isaacs/brace-expansion": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
+ "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@isaacs/balanced-match": "^4.0.1"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/@isaacs/cliui": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
+ "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^5.1.2",
+ "string-width-cjs": "npm:string-width@^4.2.0",
+ "strip-ansi": "^7.0.1",
+ "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
+ "wrap-ansi": "^8.1.0",
+ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@isaacs/cliui/node_modules/ansi-styles": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
+ "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/@isaacs/cliui/node_modules/wrap-ansi": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
+ "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^6.1.0",
+ "string-width": "^5.0.1",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/@isaacs/fs-minipass": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
+ "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==",
+ "license": "ISC",
+ "dependencies": {
+ "minipass": "^7.0.4"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@isaacs/ttlcache": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz",
+ "integrity": "sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
+ "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
+ "license": "ISC",
+ "dependencies": {
+ "camelcase": "^5.3.1",
+ "find-up": "^4.1.0",
+ "get-package-type": "^0.1.0",
+ "js-yaml": "^3.13.1",
+ "resolve-from": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "license": "MIT",
+ "dependencies": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": {
+ "version": "3.14.2",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz",
+ "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==",
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "license": "MIT",
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@istanbuljs/schema": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
+ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/create-cache-key-function": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz",
+ "integrity": "sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "^29.6.3"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jest/environment": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",
+ "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/fake-timers": "^29.7.0",
+ "@jest/types": "^29.6.3",
+ "@types/node": "*",
+ "jest-mock": "^29.7.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jest/fake-timers": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",
+ "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "^29.6.3",
+ "@sinonjs/fake-timers": "^10.0.2",
+ "@types/node": "*",
+ "jest-message-util": "^29.7.0",
+ "jest-mock": "^29.7.0",
+ "jest-util": "^29.7.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jest/schemas": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
+ "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
+ "license": "MIT",
+ "dependencies": {
+ "@sinclair/typebox": "^0.27.8"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jest/transform": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",
+ "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.11.6",
+ "@jest/types": "^29.6.3",
+ "@jridgewell/trace-mapping": "^0.3.18",
+ "babel-plugin-istanbul": "^6.1.1",
+ "chalk": "^4.0.0",
+ "convert-source-map": "^2.0.0",
+ "fast-json-stable-stringify": "^2.1.0",
+ "graceful-fs": "^4.2.9",
+ "jest-haste-map": "^29.7.0",
+ "jest-regex-util": "^29.6.3",
+ "jest-util": "^29.7.0",
+ "micromatch": "^4.0.4",
+ "pirates": "^4.0.4",
+ "slash": "^3.0.0",
+ "write-file-atomic": "^4.0.2"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jest/types": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
+ "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/schemas": "^29.6.3",
+ "@types/istanbul-lib-coverage": "^2.0.0",
+ "@types/istanbul-reports": "^3.0.0",
+ "@types/node": "*",
+ "@types/yargs": "^17.0.8",
+ "chalk": "^4.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.13",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.0",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/source-map": {
+ "version": "0.3.11",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz",
+ "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.25"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.31",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz",
+ "integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz",
+ "integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz",
+ "integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz",
+ "integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz",
+ "integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz",
+ "integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@napi-rs/wasm-runtime": {
+ "version": "0.2.12",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz",
+ "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/core": "^1.4.3",
+ "@emnapi/runtime": "^1.4.3",
+ "@tybys/wasm-util": "^0.10.0"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nolyfill/is-core-module": {
+ "version": "1.0.39",
+ "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz",
+ "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.4.0"
+ }
+ },
+ "node_modules/@pkgjs/parseargs": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
+ "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
+ "license": "MIT",
+ "optional": true,
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",
+ "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-slot": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.4.tgz",
+ "integrity": "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@react-native-community/datetimepicker": {
+ "version": "8.4.1",
+ "resolved": "https://registry.npmjs.org/@react-native-community/datetimepicker/-/datetimepicker-8.4.1.tgz",
+ "integrity": "sha512-DrK+CUS5fZnz8dhzBezirkzQTcNDdaXer3oDLh0z4nc2tbdIdnzwvXCvi8IEOIvleoc9L95xS5tKUl0/Xv71Mg==",
+ "license": "MIT",
+ "dependencies": {
+ "invariant": "^2.2.4"
+ },
+ "peerDependencies": {
+ "expo": ">=52.0.0",
+ "react": "*",
+ "react-native": "*",
+ "react-native-windows": "*"
+ },
+ "peerDependenciesMeta": {
+ "expo": {
+ "optional": true
+ },
+ "react-native-windows": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@react-native-google-signin/google-signin": {
+ "version": "16.0.0",
+ "resolved": "https://registry.npmjs.org/@react-native-google-signin/google-signin/-/google-signin-16.0.0.tgz",
+ "integrity": "sha512-jVuzPo8odREekFc0b4RK3YsqCvedtLIM2P6NSszFr9cYyhKrUNikffPapL6LmkL9qkb8K6pDeb5CXg4qALOc0g==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": ">=52.0.40",
+ "react": "*",
+ "react-native": "*"
+ },
+ "peerDependenciesMeta": {
+ "expo": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@react-native-picker/picker": {
+ "version": "2.11.1",
+ "resolved": "https://registry.npmjs.org/@react-native-picker/picker/-/picker-2.11.1.tgz",
+ "integrity": "sha512-ThklnkK4fV3yynnIIRBkxxjxR4IFbdMNJVF6tlLdOJ/zEFUEFUEdXY0KmH0iYzMwY8W4/InWsLiA7AkpAbnexA==",
+ "license": "MIT",
+ "workspaces": [
+ "example"
+ ],
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/@react-native/assets-registry": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.79.6.tgz",
+ "integrity": "sha512-UVSP1224PWg0X+mRlZNftV5xQwZGfawhivuW8fGgxNK9MS/U84xZ+16lkqcPh1ank6MOt239lIWHQ1S33CHgqA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@react-native/babel-plugin-codegen": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.79.6.tgz",
+ "integrity": "sha512-CS5OrgcMPixOyUJ/Sk/HSsKsKgyKT5P7y3CojimOQzWqRZBmoQfxdST4ugj7n1H+ebM2IKqbgovApFbqXsoX0g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.25.3",
+ "@react-native/codegen": "0.79.6"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@react-native/babel-preset": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/babel-preset/-/babel-preset-0.79.6.tgz",
+ "integrity": "sha512-H+FRO+r2Ql6b5IwfE0E7D52JhkxjeGSBSUpCXAI5zQ60zSBJ54Hwh2bBJOohXWl4J+C7gKYSAd2JHMUETu+c/A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.25.2",
+ "@babel/plugin-proposal-export-default-from": "^7.24.7",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+ "@babel/plugin-syntax-export-default-from": "^7.24.7",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.3",
+ "@babel/plugin-transform-arrow-functions": "^7.24.7",
+ "@babel/plugin-transform-async-generator-functions": "^7.25.4",
+ "@babel/plugin-transform-async-to-generator": "^7.24.7",
+ "@babel/plugin-transform-block-scoping": "^7.25.0",
+ "@babel/plugin-transform-class-properties": "^7.25.4",
+ "@babel/plugin-transform-classes": "^7.25.4",
+ "@babel/plugin-transform-computed-properties": "^7.24.7",
+ "@babel/plugin-transform-destructuring": "^7.24.8",
+ "@babel/plugin-transform-flow-strip-types": "^7.25.2",
+ "@babel/plugin-transform-for-of": "^7.24.7",
+ "@babel/plugin-transform-function-name": "^7.25.1",
+ "@babel/plugin-transform-literals": "^7.25.2",
+ "@babel/plugin-transform-logical-assignment-operators": "^7.24.7",
+ "@babel/plugin-transform-modules-commonjs": "^7.24.8",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7",
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
+ "@babel/plugin-transform-numeric-separator": "^7.24.7",
+ "@babel/plugin-transform-object-rest-spread": "^7.24.7",
+ "@babel/plugin-transform-optional-catch-binding": "^7.24.7",
+ "@babel/plugin-transform-optional-chaining": "^7.24.8",
+ "@babel/plugin-transform-parameters": "^7.24.7",
+ "@babel/plugin-transform-private-methods": "^7.24.7",
+ "@babel/plugin-transform-private-property-in-object": "^7.24.7",
+ "@babel/plugin-transform-react-display-name": "^7.24.7",
+ "@babel/plugin-transform-react-jsx": "^7.25.2",
+ "@babel/plugin-transform-react-jsx-self": "^7.24.7",
+ "@babel/plugin-transform-react-jsx-source": "^7.24.7",
+ "@babel/plugin-transform-regenerator": "^7.24.7",
+ "@babel/plugin-transform-runtime": "^7.24.7",
+ "@babel/plugin-transform-shorthand-properties": "^7.24.7",
+ "@babel/plugin-transform-spread": "^7.24.7",
+ "@babel/plugin-transform-sticky-regex": "^7.24.7",
+ "@babel/plugin-transform-typescript": "^7.25.2",
+ "@babel/plugin-transform-unicode-regex": "^7.24.7",
+ "@babel/template": "^7.25.0",
+ "@react-native/babel-plugin-codegen": "0.79.6",
+ "babel-plugin-syntax-hermes-parser": "0.25.1",
+ "babel-plugin-transform-flow-enums": "^0.0.2",
+ "react-refresh": "^0.14.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@babel/core": "*"
+ }
+ },
+ "node_modules/@react-native/codegen": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.79.6.tgz",
+ "integrity": "sha512-iRBX8Lgbqypwnfba7s6opeUwVyaR23mowh9ILw7EcT2oLz3RqMmjJdrbVpWhGSMGq2qkPfqAH7bhO8C7O+xfjQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.25.2",
+ "@babel/parser": "^7.25.3",
+ "glob": "^7.1.1",
+ "hermes-parser": "0.25.1",
+ "invariant": "^2.2.4",
+ "nullthrows": "^1.1.1",
+ "yargs": "^17.6.2"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@babel/core": "*"
+ }
+ },
+ "node_modules/@react-native/codegen/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/@react-native/codegen/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Glob versions prior to v9 are no longer supported",
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@react-native/codegen/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@react-native/community-cli-plugin": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.79.6.tgz",
+ "integrity": "sha512-ZHVst9vByGsegeaddkD2YbZ6NvYb4n3pD9H7Pit94u+NlByq2uBJghoOjT6EKqg+UVl8tLRdi88cU2pDPwdHqA==",
+ "license": "MIT",
+ "dependencies": {
+ "@react-native/dev-middleware": "0.79.6",
+ "chalk": "^4.0.0",
+ "debug": "^2.2.0",
+ "invariant": "^2.2.4",
+ "metro": "^0.82.0",
+ "metro-config": "^0.82.0",
+ "metro-core": "^0.82.0",
+ "semver": "^7.1.3"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@react-native-community/cli": "*"
+ },
+ "peerDependenciesMeta": {
+ "@react-native-community/cli": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@react-native/community-cli-plugin/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@react-native/debugger-frontend": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.79.6.tgz",
+ "integrity": "sha512-lIK/KkaH7ueM22bLO0YNaQwZbT/oeqhaghOvmZacaNVbJR1Cdh/XAqjT8FgCS+7PUnbxA8B55NYNKGZG3O2pYw==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@react-native/dev-middleware": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.79.6.tgz",
+ "integrity": "sha512-BK3GZBa9c7XSNR27EDRtxrgyyA3/mf1j3/y+mPk7Ac0Myu85YNrXnC9g3mL5Ytwo0g58TKrAIgs1fF2Q5Mn6mQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@isaacs/ttlcache": "^1.4.1",
+ "@react-native/debugger-frontend": "0.79.6",
+ "chrome-launcher": "^0.15.2",
+ "chromium-edge-launcher": "^0.2.0",
+ "connect": "^3.6.5",
+ "debug": "^2.2.0",
+ "invariant": "^2.2.4",
+ "nullthrows": "^1.1.1",
+ "open": "^7.0.3",
+ "serve-static": "^1.16.2",
+ "ws": "^6.2.3"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@react-native/dev-middleware/node_modules/ws": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz",
+ "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==",
+ "license": "MIT",
+ "dependencies": {
+ "async-limiter": "~1.0.0"
+ }
+ },
+ "node_modules/@react-native/gradle-plugin": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.79.6.tgz",
+ "integrity": "sha512-C5odetI6py3CSELeZEVz+i00M+OJuFZXYnjVD4JyvpLn462GesHRh+Se8mSkU5QSaz9cnpMnyFLJAx05dokWbA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@react-native/js-polyfills": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.79.6.tgz",
+ "integrity": "sha512-6wOaBh1namYj9JlCNgX2ILeGUIwc6OP6MWe3Y5jge7Xz9fVpRqWQk88Q5Y9VrAtTMTcxoX3CvhrfRr3tGtSfQw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@react-native/normalize-colors": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.79.6.tgz",
+ "integrity": "sha512-0v2/ruY7eeKun4BeKu+GcfO+SHBdl0LJn4ZFzTzjHdWES0Cn+ONqKljYaIv8p9MV2Hx/kcdEvbY4lWI34jC/mQ==",
+ "license": "MIT"
+ },
+ "node_modules/@react-native/virtualized-lists": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.79.6.tgz",
+ "integrity": "sha512-khA/Hrbb+rB68YUHrLubfLgMOD9up0glJhw25UE3Kntj32YDyuO0Tqc81ryNTcCekFKJ8XrAaEjcfPg81zBGPw==",
+ "license": "MIT",
+ "dependencies": {
+ "invariant": "^2.2.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@types/react": "^19.0.0",
+ "react": "*",
+ "react-native": "*"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@react-navigation/bottom-tabs": {
+ "version": "7.8.12",
+ "resolved": "https://registry.npmjs.org/@react-navigation/bottom-tabs/-/bottom-tabs-7.8.12.tgz",
+ "integrity": "sha512-efVt5ydHK+b4ZtjmN81iduaO5dPCmzhLBFwjCR8pV4x4VzUfJmtUJizLqTXpT3WatHdeon2gDPwhhoelsvu/JA==",
+ "license": "MIT",
+ "dependencies": {
+ "@react-navigation/elements": "^2.9.2",
+ "color": "^4.2.3",
+ "sf-symbols-typescript": "^2.1.0"
+ },
+ "peerDependencies": {
+ "@react-navigation/native": "^7.1.25",
+ "react": ">= 18.2.0",
+ "react-native": "*",
+ "react-native-safe-area-context": ">= 4.0.0",
+ "react-native-screens": ">= 4.0.0"
+ }
+ },
+ "node_modules/@react-navigation/core": {
+ "version": "7.13.7",
+ "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-7.13.7.tgz",
+ "integrity": "sha512-k2ABo3250vq1ovOh/iVwXS6Hwr5PVRGXoPh/ewVFOOuEKTvOx9i//OBzt8EF+HokBxS2HBRlR2b+aCOmscRqBw==",
+ "license": "MIT",
+ "dependencies": {
+ "@react-navigation/routers": "^7.5.3",
+ "escape-string-regexp": "^4.0.0",
+ "fast-deep-equal": "^3.1.3",
+ "nanoid": "^3.3.11",
+ "query-string": "^7.1.3",
+ "react-is": "^19.1.0",
+ "use-latest-callback": "^0.2.4",
+ "use-sync-external-store": "^1.5.0"
+ },
+ "peerDependencies": {
+ "react": ">= 18.2.0"
+ }
+ },
+ "node_modules/@react-navigation/core/node_modules/react-is": {
+ "version": "19.2.3",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.3.tgz",
+ "integrity": "sha512-qJNJfu81ByyabuG7hPFEbXqNcWSU3+eVus+KJs+0ncpGfMyYdvSmxiJxbWR65lYi1I+/0HBcliO029gc4F+PnA==",
+ "license": "MIT"
+ },
+ "node_modules/@react-navigation/drawer": {
+ "version": "7.7.9",
+ "resolved": "https://registry.npmjs.org/@react-navigation/drawer/-/drawer-7.7.9.tgz",
+ "integrity": "sha512-xmGe0VkB7LW6g20iH7jB6iaCJ/cLZYBQmE7BYsEp1JGJG7tJHofICayXkpKavJwyx6NAWUItWE1HEo/xVaFEog==",
+ "license": "MIT",
+ "dependencies": {
+ "@react-navigation/elements": "^2.9.2",
+ "color": "^4.2.3",
+ "react-native-drawer-layout": "^4.2.0",
+ "use-latest-callback": "^0.2.4"
+ },
+ "peerDependencies": {
+ "@react-navigation/native": "^7.1.25",
+ "react": ">= 18.2.0",
+ "react-native": "*",
+ "react-native-gesture-handler": ">= 2.0.0",
+ "react-native-reanimated": ">= 2.0.0",
+ "react-native-safe-area-context": ">= 4.0.0",
+ "react-native-screens": ">= 4.0.0"
+ }
+ },
+ "node_modules/@react-navigation/elements": {
+ "version": "2.9.3",
+ "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-2.9.3.tgz",
+ "integrity": "sha512-3+eyvWiVPIEf6tN9UdduhOEHcTuNe3R5WovgiVkfH9+jApHMTZDc2loePTpY/i2HDJhObhhChpJzO6BVjrpdYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "color": "^4.2.3",
+ "use-latest-callback": "^0.2.4",
+ "use-sync-external-store": "^1.5.0"
+ },
+ "peerDependencies": {
+ "@react-native-masked-view/masked-view": ">= 0.2.0",
+ "@react-navigation/native": "^7.1.26",
+ "react": ">= 18.2.0",
+ "react-native": "*",
+ "react-native-safe-area-context": ">= 4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@react-native-masked-view/masked-view": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@react-navigation/material-top-tabs": {
+ "version": "7.4.11",
+ "resolved": "https://registry.npmjs.org/@react-navigation/material-top-tabs/-/material-top-tabs-7.4.11.tgz",
+ "integrity": "sha512-RSC/f1bSpodnx1oSXw7jNrwe83JddRhb12ehCY8oZZDtrNhm3atSHzlfvHN37i3E8cln7Tmc1ieLxjWrU65n/Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@react-navigation/elements": "^2.9.3",
+ "color": "^4.2.3",
+ "react-native-tab-view": "^4.2.2"
+ },
+ "peerDependencies": {
+ "@react-navigation/native": "^7.1.26",
+ "react": ">= 18.2.0",
+ "react-native": "*",
+ "react-native-pager-view": ">= 6.0.0",
+ "react-native-safe-area-context": ">= 4.0.0"
+ }
+ },
+ "node_modules/@react-navigation/native": {
+ "version": "7.1.26",
+ "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-7.1.26.tgz",
+ "integrity": "sha512-RhKmeD0E2ejzKS6z8elAfdfwShpcdkYY8zJzvHYLq+wv183BBcElTeyMLcIX6wIn7QutXeI92Yi21t7aUWfqNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@react-navigation/core": "^7.13.7",
+ "escape-string-regexp": "^4.0.0",
+ "fast-deep-equal": "^3.1.3",
+ "nanoid": "^3.3.11",
+ "use-latest-callback": "^0.2.4"
+ },
+ "peerDependencies": {
+ "react": ">= 18.2.0",
+ "react-native": "*"
+ }
+ },
+ "node_modules/@react-navigation/native-stack": {
+ "version": "7.8.6",
+ "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-7.8.6.tgz",
+ "integrity": "sha512-eBY92xb4H53c9jiWriKMOZmQ/Tu9w1qcUrgOA/qjQOvJFbgKF9D6y3e4UuBaDQzjWjLEDZLaiwXe8cwXRb46mg==",
+ "license": "MIT",
+ "dependencies": {
+ "@react-navigation/elements": "^2.9.2",
+ "color": "^4.2.3",
+ "sf-symbols-typescript": "^2.1.0",
+ "warn-once": "^0.1.1"
+ },
+ "peerDependencies": {
+ "@react-navigation/native": "^7.1.25",
+ "react": ">= 18.2.0",
+ "react-native": "*",
+ "react-native-safe-area-context": ">= 4.0.0",
+ "react-native-screens": ">= 4.0.0"
+ }
+ },
+ "node_modules/@react-navigation/routers": {
+ "version": "7.5.3",
+ "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-7.5.3.tgz",
+ "integrity": "sha512-1tJHg4KKRJuQ1/EvJxatrMef3NZXEPzwUIUZ3n1yJ2t7Q97siwRtbynRpQG9/69ebbtiZ8W3ScOZF/OmhvM4Rg==",
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.11"
+ }
+ },
+ "node_modules/@redis/bloom": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-5.10.0.tgz",
+ "integrity": "sha512-doIF37ob+l47n0rkpRNgU8n4iacBlKM9xLiP1LtTZTvz8TloJB8qx/MgvhMhKdYG+CvCY2aPBnN2706izFn/4A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "@redis/client": "^5.10.0"
+ }
+ },
+ "node_modules/@redis/client": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/@redis/client/-/client-5.10.0.tgz",
+ "integrity": "sha512-JXmM4XCoso6C75Mr3lhKA3eNxSzkYi3nCzxDIKY+YOszYsJjuKbFgVtguVPbLMOttN4iu2fXoc2BGhdnYhIOxA==",
+ "license": "MIT",
+ "dependencies": {
+ "cluster-key-slot": "1.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@redis/json": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/@redis/json/-/json-5.10.0.tgz",
+ "integrity": "sha512-B2G8XlOmTPUuZtD44EMGbtoepQG34RCDXLZbjrtON1Djet0t5Ri7/YPXvL9aomXqP8lLTreaprtyLKF4tmXEEA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "@redis/client": "^5.10.0"
+ }
+ },
+ "node_modules/@redis/search": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/@redis/search/-/search-5.10.0.tgz",
+ "integrity": "sha512-3SVcPswoSfp2HnmWbAGUzlbUPn7fOohVu2weUQ0S+EMiQi8jwjL+aN2p6V3TI65eNfVsJ8vyPvqWklm6H6esmg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "@redis/client": "^5.10.0"
+ }
+ },
+ "node_modules/@redis/time-series": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-5.10.0.tgz",
+ "integrity": "sha512-cPkpddXH5kc/SdRhF0YG0qtjL+noqFT0AcHbQ6axhsPsO7iqPi1cjxgdkE9TNeKiBUUdCaU1DbqkR/LzbzPBhg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "@redis/client": "^5.10.0"
+ }
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.0-beta.27",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",
+ "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.3.tgz",
+ "integrity": "sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.3.tgz",
+ "integrity": "sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.3.tgz",
+ "integrity": "sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.3.tgz",
+ "integrity": "sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.3.tgz",
+ "integrity": "sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.3.tgz",
+ "integrity": "sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.3.tgz",
+ "integrity": "sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.3.tgz",
+ "integrity": "sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.3.tgz",
+ "integrity": "sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.3.tgz",
+ "integrity": "sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.3.tgz",
+ "integrity": "sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.3.tgz",
+ "integrity": "sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.3.tgz",
+ "integrity": "sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.3.tgz",
+ "integrity": "sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.3.tgz",
+ "integrity": "sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.3.tgz",
+ "integrity": "sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.3.tgz",
+ "integrity": "sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.3.tgz",
+ "integrity": "sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.3.tgz",
+ "integrity": "sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.3.tgz",
+ "integrity": "sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.3.tgz",
+ "integrity": "sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.3.tgz",
+ "integrity": "sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rtsao/scc": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
+ "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@sinclair/typebox": {
+ "version": "0.27.8",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
+ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
+ "license": "MIT"
+ },
+ "node_modules/@sinonjs/commons": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz",
+ "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "type-detect": "4.0.8"
+ }
+ },
+ "node_modules/@sinonjs/fake-timers": {
+ "version": "10.3.0",
+ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz",
+ "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@sinonjs/commons": "^3.0.0"
+ }
+ },
+ "node_modules/@smithy/abort-controller": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.5.tgz",
+ "integrity": "sha512-j7HwVkBw68YW8UmFRcjZOmssE77Rvk0GWAIN1oFBhsaovQmZWYCIcGa9/pwRB0ExI8Sk9MWNALTjftjHZea7VA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/chunked-blob-reader": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-5.2.0.tgz",
+ "integrity": "sha512-WmU0TnhEAJLWvfSeMxBNe5xtbselEO8+4wG0NtZeL8oR21WgH1xiO37El+/Y+H/Ie4SCwBy3MxYWmOYaGgZueA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/chunked-blob-reader-native": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-4.2.1.tgz",
+ "integrity": "sha512-lX9Ay+6LisTfpLid2zZtIhSEjHMZoAR5hHCR4H7tBz/Zkfr5ea8RcQ7Tk4mi0P76p4cN+Btz16Ffno7YHpKXnQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/util-base64": "^4.3.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/config-resolver": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.3.tgz",
+ "integrity": "sha512-ezHLe1tKLUxDJo2LHtDuEDyWXolw8WGOR92qb4bQdWq/zKenO5BvctZGrVJBK08zjezSk7bmbKFOXIVyChvDLw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-config-provider": "^4.2.0",
+ "@smithy/util-endpoints": "^3.2.5",
+ "@smithy/util-middleware": "^4.2.5",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/core": {
+ "version": "3.18.7",
+ "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.18.7.tgz",
+ "integrity": "sha512-axG9MvKhMWOhFbvf5y2DuyTxQueO0dkedY9QC3mAfndLosRI/9LJv8WaL0mw7ubNhsO4IuXX9/9dYGPFvHrqlw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/middleware-serde": "^4.2.6",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-base64": "^4.3.0",
+ "@smithy/util-body-length-browser": "^4.2.0",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-stream": "^4.5.6",
+ "@smithy/util-utf8": "^4.2.0",
+ "@smithy/uuid": "^1.1.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/credential-provider-imds": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.5.tgz",
+ "integrity": "sha512-BZwotjoZWn9+36nimwm/OLIcVe+KYRwzMjfhd4QT7QxPm9WY0HiOV8t/Wlh+HVUif0SBVV7ksq8//hPaBC/okQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/url-parser": "^4.2.5",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/eventstream-codec": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.2.5.tgz",
+ "integrity": "sha512-Ogt4Zi9hEbIP17oQMd68qYOHUzmH47UkK7q7Gl55iIm9oKt27MUGrC5JfpMroeHjdkOliOA4Qt3NQ1xMq/nrlA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-crypto/crc32": "5.2.0",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-hex-encoding": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/eventstream-serde-browser": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.2.5.tgz",
+ "integrity": "sha512-HohfmCQZjppVnKX2PnXlf47CW3j92Ki6T/vkAT2DhBR47e89pen3s4fIa7otGTtrVxmj7q+IhH0RnC5kpR8wtw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/eventstream-serde-universal": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/eventstream-serde-config-resolver": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.3.5.tgz",
+ "integrity": "sha512-ibjQjM7wEXtECiT6my1xfiMH9IcEczMOS6xiCQXoUIYSj5b1CpBbJ3VYbdwDy8Vcg5JHN7eFpOCGk8nyZAltNQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/eventstream-serde-node": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.2.5.tgz",
+ "integrity": "sha512-+elOuaYx6F2H6x1/5BQP5ugv12nfJl66GhxON8+dWVUEDJ9jah/A0tayVdkLRP0AeSac0inYkDz5qBFKfVp2Gg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/eventstream-serde-universal": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/eventstream-serde-universal": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.2.5.tgz",
+ "integrity": "sha512-G9WSqbST45bmIFaeNuP/EnC19Rhp54CcVdX9PDL1zyEB514WsDVXhlyihKlGXnRycmHNmVv88Bvvt4EYxWef/Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/eventstream-codec": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/fetch-http-handler": {
+ "version": "5.3.6",
+ "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.6.tgz",
+ "integrity": "sha512-3+RG3EA6BBJ/ofZUeTFJA7mHfSYrZtQIrDP9dI8Lf7X6Jbos2jptuLrAAteDiFVrmbEmLSuRG/bUKzfAXk7dhg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/querystring-builder": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-base64": "^4.3.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/hash-blob-browser": {
+ "version": "4.2.6",
+ "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-4.2.6.tgz",
+ "integrity": "sha512-8P//tA8DVPk+3XURk2rwcKgYwFvwGwmJH/wJqQiSKwXZtf/LiZK+hbUZmPj/9KzM+OVSwe4o85KTp5x9DUZTjw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/chunked-blob-reader": "^5.2.0",
+ "@smithy/chunked-blob-reader-native": "^4.2.1",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/hash-node": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.5.tgz",
+ "integrity": "sha512-DpYX914YOfA3UDT9CN1BM787PcHfWRBB43fFGCYrZFUH0Jv+5t8yYl+Pd5PW4+QzoGEDvn5d5QIO4j2HyYZQSA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-buffer-from": "^4.2.0",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/hash-stream-node": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-4.2.5.tgz",
+ "integrity": "sha512-6+do24VnEyvWcGdHXomlpd0m8bfZePpUKBy7m311n+JuRwug8J4dCanJdTymx//8mi0nlkflZBvJe+dEO/O12Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/invalid-dependency": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.5.tgz",
+ "integrity": "sha512-2L2erASEro1WC5nV+plwIMxrTXpvpfzl4e+Nre6vBVRR2HKeGGcvpJyyL3/PpiSg+cJG2KpTmZmq934Olb6e5A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/is-array-buffer": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz",
+ "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/md5-js": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-4.2.5.tgz",
+ "integrity": "sha512-Bt6jpSTMWfjCtC0s79gZ/WZ1w90grfmopVOWqkI2ovhjpD5Q2XRXuecIPB9689L2+cCySMbaXDhBPU56FKNDNg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/middleware-content-length": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.5.tgz",
+ "integrity": "sha512-Y/RabVa5vbl5FuHYV2vUCwvh/dqzrEY/K2yWPSqvhFUwIY0atLqO4TienjBXakoy4zrKAMCZwg+YEqmH7jaN7A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/middleware-endpoint": {
+ "version": "4.3.14",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.14.tgz",
+ "integrity": "sha512-v0q4uTKgBM8dsqGjqsabZQyH85nFaTnFcgpWU1uydKFsdyyMzfvOkNum9G7VK+dOP01vUnoZxIeRiJ6uD0kjIg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/core": "^3.18.7",
+ "@smithy/middleware-serde": "^4.2.6",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "@smithy/url-parser": "^4.2.5",
+ "@smithy/util-middleware": "^4.2.5",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/middleware-retry": {
+ "version": "4.4.14",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.14.tgz",
+ "integrity": "sha512-Z2DG8Ej7FyWG1UA+7HceINtSLzswUgs2np3sZX0YBBxCt+CXG4QUxv88ZDS3+2/1ldW7LqtSY1UO/6VQ1pND8Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/service-error-classification": "^4.2.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-retry": "^4.2.5",
+ "@smithy/uuid": "^1.1.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/middleware-serde": {
+ "version": "4.2.6",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.6.tgz",
+ "integrity": "sha512-VkLoE/z7e2g8pirwisLz8XJWedUSY8my/qrp81VmAdyrhi94T+riBfwP+AOEEFR9rFTSonC/5D2eWNmFabHyGQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/middleware-stack": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.5.tgz",
+ "integrity": "sha512-bYrutc+neOyWxtZdbB2USbQttZN0mXaOyYLIsaTbJhFsfpXyGWUxJpEuO1rJ8IIJm2qH4+xJT0mxUSsEDTYwdQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/node-config-provider": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.5.tgz",
+ "integrity": "sha512-UTurh1C4qkVCtqggI36DGbLB2Kv8UlcFdMXDcWMbqVY2uRg0XmT9Pb4Vj6oSQ34eizO1fvR0RnFV4Axw4IrrAg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/shared-ini-file-loader": "^4.4.0",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/node-http-handler": {
+ "version": "4.4.5",
+ "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.5.tgz",
+ "integrity": "sha512-CMnzM9R2WqlqXQGtIlsHMEZfXKJVTIrqCNoSd/QpAyp+Dw0a1Vps13l6ma1fH8g7zSPNsA59B/kWgeylFuA/lw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/abort-controller": "^4.2.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/querystring-builder": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/property-provider": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.5.tgz",
+ "integrity": "sha512-8iLN1XSE1rl4MuxvQ+5OSk/Zb5El7NJZ1td6Tn+8dQQHIjp59Lwl6bd0+nzw6SKm2wSSriH2v/I9LPzUic7EOg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/protocol-http": {
+ "version": "5.3.5",
+ "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.5.tgz",
+ "integrity": "sha512-RlaL+sA0LNMp03bf7XPbFmT5gN+w3besXSWMkA8rcmxLSVfiEXElQi4O2IWwPfxzcHkxqrwBFMbngB8yx/RvaQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/querystring-builder": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.5.tgz",
+ "integrity": "sha512-y98otMI1saoajeik2kLfGyRp11e5U/iJYH/wLCh3aTV/XutbGT9nziKGkgCaMD1ghK7p6htHMm6b6scl9JRUWg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-uri-escape": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/querystring-parser": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.5.tgz",
+ "integrity": "sha512-031WCTdPYgiQRYNPXznHXof2YM0GwL6SeaSyTH/P72M1Vz73TvCNH2Nq8Iu2IEPq9QP2yx0/nrw5YmSeAi/AjQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/service-error-classification": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.5.tgz",
+ "integrity": "sha512-8fEvK+WPE3wUAcDvqDQG1Vk3ANLR8Px979te96m84CbKAjBVf25rPYSzb4xU4hlTyho7VhOGnh5i62D/JVF0JQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/shared-ini-file-loader": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.4.0.tgz",
+ "integrity": "sha512-5WmZ5+kJgJDjwXXIzr1vDTG+RhF9wzSODQBfkrQ2VVkYALKGvZX1lgVSxEkgicSAFnFhPj5rudJV0zoinqS0bA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/signature-v4": {
+ "version": "5.3.5",
+ "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.5.tgz",
+ "integrity": "sha512-xSUfMu1FT7ccfSXkoLl/QRQBi2rOvi3tiBZU2Tdy3I6cgvZ6SEi9QNey+lqps/sJRnogIS+lq+B1gxxbra2a/w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/is-array-buffer": "^4.2.0",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-hex-encoding": "^4.2.0",
+ "@smithy/util-middleware": "^4.2.5",
+ "@smithy/util-uri-escape": "^4.2.0",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/smithy-client": {
+ "version": "4.9.10",
+ "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.9.10.tgz",
+ "integrity": "sha512-Jaoz4Jw1QYHc1EFww/E6gVtNjhoDU+gwRKqXP6C3LKYqqH2UQhP8tMP3+t/ePrhaze7fhLE8vS2q6vVxBANFTQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/core": "^3.18.7",
+ "@smithy/middleware-endpoint": "^4.3.14",
+ "@smithy/middleware-stack": "^4.2.5",
+ "@smithy/protocol-http": "^5.3.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-stream": "^4.5.6",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/types": {
+ "version": "4.9.0",
+ "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.9.0.tgz",
+ "integrity": "sha512-MvUbdnXDTwykR8cB1WZvNNwqoWVaTRA0RLlLmf/cIFNMM2cKWz01X4Ly6SMC4Kks30r8tT3Cty0jmeWfiuyHTA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/url-parser": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.5.tgz",
+ "integrity": "sha512-VaxMGsilqFnK1CeBX+LXnSuaMx4sTL/6znSZh2829txWieazdVxr54HmiyTsIbpOTLcf5nYpq9lpzmwRdxj6rQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/querystring-parser": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-base64": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.0.tgz",
+ "integrity": "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/util-buffer-from": "^4.2.0",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-body-length-browser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.0.tgz",
+ "integrity": "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-body-length-node": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.2.1.tgz",
+ "integrity": "sha512-h53dz/pISVrVrfxV1iqXlx5pRg3V2YWFcSQyPyXZRrZoZj4R4DeWRDo1a7dd3CPTcFi3kE+98tuNyD2axyZReA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-buffer-from": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz",
+ "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/is-array-buffer": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-config-provider": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.2.0.tgz",
+ "integrity": "sha512-YEjpl6XJ36FTKmD+kRJJWYvrHeUvm5ykaUS5xK+6oXffQPHeEM4/nXlZPe+Wu0lsgRUcNZiliYNh/y7q9c2y6Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-defaults-mode-browser": {
+ "version": "4.3.13",
+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.13.tgz",
+ "integrity": "sha512-hlVLdAGrVfyNei+pKIgqDTxfu/ZI2NSyqj4IDxKd5bIsIqwR/dSlkxlPaYxFiIaDVrBy0he8orsFy+Cz119XvA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-defaults-mode-node": {
+ "version": "4.2.16",
+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.16.tgz",
+ "integrity": "sha512-F1t22IUiJLHrxW9W1CQ6B9PN+skZ9cqSuzB18Eh06HrJPbjsyZ7ZHecAKw80DQtyGTRcVfeukKaCRYebFwclbg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/config-resolver": "^4.4.3",
+ "@smithy/credential-provider-imds": "^4.2.5",
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/property-provider": "^4.2.5",
+ "@smithy/smithy-client": "^4.9.10",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-endpoints": {
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.2.5.tgz",
+ "integrity": "sha512-3O63AAWu2cSNQZp+ayl9I3NapW1p1rR5mlVHcF6hAB1dPZUQFfRPYtplWX/3xrzWthPGj5FqB12taJJCfH6s8A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/node-config-provider": "^4.3.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-hex-encoding": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz",
+ "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-middleware": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.5.tgz",
+ "integrity": "sha512-6Y3+rvBF7+PZOc40ybeZMcGln6xJGVeY60E7jy9Mv5iKpMJpHgRE6dKy9ScsVxvfAYuEX4Q9a65DQX90KaQ3bA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-retry": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.5.tgz",
+ "integrity": "sha512-GBj3+EZBbN4NAqJ/7pAhsXdfzdlznOh8PydUijy6FpNIMnHPSMO2/rP4HKu+UFeikJxShERk528oy7GT79YiJg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/service-error-classification": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-stream": {
+ "version": "4.5.6",
+ "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.6.tgz",
+ "integrity": "sha512-qWw/UM59TiaFrPevefOZ8CNBKbYEP6wBAIlLqxn3VAIo9rgnTNc4ASbVrqDmhuwI87usnjhdQrxodzAGFFzbRQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/fetch-http-handler": "^5.3.6",
+ "@smithy/node-http-handler": "^4.4.5",
+ "@smithy/types": "^4.9.0",
+ "@smithy/util-base64": "^4.3.0",
+ "@smithy/util-buffer-from": "^4.2.0",
+ "@smithy/util-hex-encoding": "^4.2.0",
+ "@smithy/util-utf8": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-uri-escape": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz",
+ "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-utf8": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz",
+ "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/util-buffer-from": "^4.2.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/util-waiter": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.2.5.tgz",
+ "integrity": "sha512-Dbun99A3InifQdIrsXZ+QLcC0PGBPAdrl4cj1mTgJvyc9N2zf7QSxg8TBkzsCmGJdE3TLbO9ycwpY0EkWahQ/g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@smithy/abort-controller": "^4.2.5",
+ "@smithy/types": "^4.9.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@smithy/uuid": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@smithy/uuid/-/uuid-1.1.0.tgz",
+ "integrity": "sha512-4aUIteuyxtBUhVdiQqcDhKFitwfd9hqoSDYY2KRXiWtgoWJ9Bmise+KfEPDiVHWeJepvF8xJO9/9+WDIciMFFw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@swc/core": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.3.tgz",
+ "integrity": "sha512-Qd8eBPkUFL4eAONgGjycZXj1jFCBW8Fd+xF0PzdTlBCWQIV1xnUT7B93wUANtW3KGjl3TRcOyxwSx/u/jyKw/Q==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@swc/counter": "^0.1.3",
+ "@swc/types": "^0.1.25"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/swc"
+ },
+ "optionalDependencies": {
+ "@swc/core-darwin-arm64": "1.15.3",
+ "@swc/core-darwin-x64": "1.15.3",
+ "@swc/core-linux-arm-gnueabihf": "1.15.3",
+ "@swc/core-linux-arm64-gnu": "1.15.3",
+ "@swc/core-linux-arm64-musl": "1.15.3",
+ "@swc/core-linux-x64-gnu": "1.15.3",
+ "@swc/core-linux-x64-musl": "1.15.3",
+ "@swc/core-win32-arm64-msvc": "1.15.3",
+ "@swc/core-win32-ia32-msvc": "1.15.3",
+ "@swc/core-win32-x64-msvc": "1.15.3"
+ },
+ "peerDependencies": {
+ "@swc/helpers": ">=0.5.17"
+ },
+ "peerDependenciesMeta": {
+ "@swc/helpers": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@swc/core-darwin-arm64": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.3.tgz",
+ "integrity": "sha512-AXfeQn0CvcQ4cndlIshETx6jrAM45oeUrK8YeEY6oUZU/qzz0Id0CyvlEywxkWVC81Ajpd8TQQ1fW5yx6zQWkQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-darwin-x64": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.3.tgz",
+ "integrity": "sha512-p68OeCz1ui+MZYG4wmfJGvcsAcFYb6Sl25H9TxWl+GkBgmNimIiRdnypK9nBGlqMZAcxngNPtnG3kEMNnvoJ2A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm-gnueabihf": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.3.tgz",
+ "integrity": "sha512-Nuj5iF4JteFgwrai97mUX+xUOl+rQRHqTvnvHMATL/l9xE6/TJfPBpd3hk/PVpClMXG3Uvk1MxUFOEzM1JrMYg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm64-gnu": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.3.tgz",
+ "integrity": "sha512-2Nc/s8jE6mW2EjXWxO/lyQuLKShcmTrym2LRf5Ayp3ICEMX6HwFqB1EzDhwoMa2DcUgmnZIalesq2lG3krrUNw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm64-musl": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.3.tgz",
+ "integrity": "sha512-j4SJniZ/qaZ5g8op+p1G9K1z22s/EYGg1UXIb3+Cg4nsxEpF5uSIGEE4mHUfA70L0BR9wKT2QF/zv3vkhfpX4g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-x64-gnu": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.3.tgz",
+ "integrity": "sha512-aKttAZnz8YB1VJwPQZtyU8Uk0BfMP63iDMkvjhJzRZVgySmqt/apWSdnoIcZlUoGheBrcqbMC17GGUmur7OT5A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-x64-musl": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.3.tgz",
+ "integrity": "sha512-oe8FctPu1gnUsdtGJRO2rvOUIkkIIaHqsO9xxN0bTR7dFTlPTGi2Fhk1tnvXeyAvCPxLIcwD8phzKg6wLv9yug==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-arm64-msvc": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.3.tgz",
+ "integrity": "sha512-L9AjzP2ZQ/Xh58e0lTRMLvEDrcJpR7GwZqAtIeNLcTK7JVE+QineSyHp0kLkO1rttCHyCy0U74kDTj0dRz6raA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-ia32-msvc": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.3.tgz",
+ "integrity": "sha512-B8UtogMzErUPDWUoKONSVBdsgKYd58rRyv2sHJWKOIMCHfZ22FVXICR4O/VwIYtlnZ7ahERcjayBHDlBZpR0aw==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-x64-msvc": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.3.tgz",
+ "integrity": "sha512-SpZKMR9QBTecHeqpzJdYEfgw30Oo8b/Xl6rjSzBt1g0ZsXyy60KLXrp6IagQyfTYqNYE/caDvwtF2FPn7pomog==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/counter": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
+ "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/@swc/types": {
+ "version": "0.1.25",
+ "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz",
+ "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@swc/counter": "^0.1.3"
+ }
+ },
+ "node_modules/@tanstack/history": {
+ "version": "1.141.0",
+ "resolved": "https://registry.npmjs.org/@tanstack/history/-/history-1.141.0.tgz",
+ "integrity": "sha512-LS54XNyxyTs5m/pl1lkwlg7uZM3lvsv2FIIV1rsJgnfwVCnI+n4ZGZ2CcjNT13BPu/3hPP+iHmliBSscJxW5FQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "node_modules/@tanstack/query-core": {
+ "version": "5.90.12",
+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.12.tgz",
+ "integrity": "sha512-T1/8t5DhV/SisWjDnaiU2drl6ySvsHj1bHBCWNXd+/T+Hh1cf6JodyEYMd5sgwm+b/mETT4EV3H+zCVczCU5hg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "node_modules/@tanstack/react-query": {
+ "version": "5.90.12",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.90.12.tgz",
+ "integrity": "sha512-graRZspg7EoEaw0a8faiUASCyJrqjKPdqJ9EwuDRUF9mEYJ1YPczI9H+/agJ0mOJkPCJDk0lsz5QTrLZ/jQ2rg==",
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/query-core": "5.90.12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "react": "^18 || ^19"
+ }
+ },
+ "node_modules/@tanstack/react-router": {
+ "version": "1.141.1",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-router/-/react-router-1.141.1.tgz",
+ "integrity": "sha512-pLQ6ZFCh5s86ewZIAu2wQc2svf+DqttD7CFd1NPSxdEU20KvMMj9RPQdDHj/pbf2VvB3i1nEDxjli/Z0PBvnCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/history": "1.141.0",
+ "@tanstack/react-store": "^0.8.0",
+ "@tanstack/router-core": "1.141.1",
+ "isbot": "^5.1.22",
+ "tiny-invariant": "^1.3.3",
+ "tiny-warning": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "react": ">=18.0.0 || >=19.0.0",
+ "react-dom": ">=18.0.0 || >=19.0.0"
+ }
+ },
+ "node_modules/@tanstack/react-router-devtools": {
+ "version": "1.141.1",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-router-devtools/-/react-router-devtools-1.141.1.tgz",
+ "integrity": "sha512-+XCn9cXSe1fZAD9jRrezEYE0ojn9U+Y0lRTRFdR8n51wx0UzJ6xe/Pewtw0rp03h/zmBR0pX+HRNU9NJDneWGA==",
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/router-devtools-core": "1.141.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "@tanstack/react-router": "^1.141.1",
+ "@tanstack/router-core": "^1.141.1",
+ "react": ">=18.0.0 || >=19.0.0",
+ "react-dom": ">=18.0.0 || >=19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@tanstack/router-core": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@tanstack/react-store": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-store/-/react-store-0.8.0.tgz",
+ "integrity": "sha512-1vG9beLIuB7q69skxK9r5xiLN3ztzIPfSQSs0GfeqWGO2tGIyInZx0x1COhpx97RKaONSoAb8C3dxacWksm1ow==",
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/store": "0.8.0",
+ "use-sync-external-store": "^1.6.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/@tanstack/router-core": {
+ "version": "1.141.1",
+ "resolved": "https://registry.npmjs.org/@tanstack/router-core/-/router-core-1.141.1.tgz",
+ "integrity": "sha512-fR1GGpp6v3dVKu4KIAjEh+Sd0qGLQd/wvCOVHeopSY6aFidXKCzwrS5cBOBqoPPWTKmn6CdW1a0CzFr5Furdog==",
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/history": "1.141.0",
+ "@tanstack/store": "^0.8.0",
+ "cookie-es": "^2.0.0",
+ "seroval": "^1.4.0",
+ "seroval-plugins": "^1.4.0",
+ "tiny-invariant": "^1.3.3",
+ "tiny-warning": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "node_modules/@tanstack/router-devtools": {
+ "version": "1.141.1",
+ "resolved": "https://registry.npmjs.org/@tanstack/router-devtools/-/router-devtools-1.141.1.tgz",
+ "integrity": "sha512-Yetxpaog2LK4N9GjYTRiIF9ME4vkqLoNPQhvuuF+O5HHAeixOdqKL5fz8zU2eaM3gfw6d549+96vzCuNhBmScA==",
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/react-router-devtools": "1.141.1",
+ "clsx": "^2.1.1",
+ "goober": "^2.1.16"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "@tanstack/react-router": "^1.141.1",
+ "csstype": "^3.0.10",
+ "react": ">=18.0.0 || >=19.0.0",
+ "react-dom": ">=18.0.0 || >=19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "csstype": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@tanstack/router-devtools-core": {
+ "version": "1.141.1",
+ "resolved": "https://registry.npmjs.org/@tanstack/router-devtools-core/-/router-devtools-core-1.141.1.tgz",
+ "integrity": "sha512-wD9yRvOk6FI+thiNBplhkGutPIPBlXvWu9ttU/obdFY5oXQj9WYgNS+IO9BEe8Pz5rNEu8zE/oLn4RUGIVdtnw==",
+ "license": "MIT",
+ "dependencies": {
+ "clsx": "^2.1.1",
+ "goober": "^2.1.16",
+ "tiny-invariant": "^1.3.3"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "@tanstack/router-core": "^1.141.1",
+ "csstype": "^3.0.10",
+ "solid-js": ">=1.9.5"
+ },
+ "peerDependenciesMeta": {
+ "csstype": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@tanstack/store": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@tanstack/store/-/store-0.8.0.tgz",
+ "integrity": "sha512-Om+BO0YfMZe//X2z0uLF2j+75nQga6TpTJgLJQBiq85aOyZNIhkCgleNcud2KQg4k4v9Y9l+Uhru3qWMPGTOzQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "node_modules/@trpc/client": {
+ "version": "11.7.2",
+ "resolved": "https://registry.npmjs.org/@trpc/client/-/client-11.7.2.tgz",
+ "integrity": "sha512-OQxqUMfpDvjcszo9dbnqWQXnW2L5IbrKSz2H7l8s+mVM3EvYw7ztQ/gjFIN3iy0NcamiQfd4eE6qjcb9Lm+63A==",
+ "funding": [
+ "https://trpc.io/sponsor"
+ ],
+ "license": "MIT",
+ "peerDependencies": {
+ "@trpc/server": "11.7.2",
+ "typescript": ">=5.7.2"
+ }
+ },
+ "node_modules/@trpc/react-query": {
+ "version": "11.7.2",
+ "resolved": "https://registry.npmjs.org/@trpc/react-query/-/react-query-11.7.2.tgz",
+ "integrity": "sha512-IcLDMqx2mvlGRxkr0/m37TtPvRQ8nonITH3EwYv436x0Igx8eduR9z4tdgGBsjJY9e5W1G7cZ4zKCwrizSimFQ==",
+ "funding": [
+ "https://trpc.io/sponsor"
+ ],
+ "license": "MIT",
+ "peerDependencies": {
+ "@tanstack/react-query": "^5.80.3",
+ "@trpc/client": "11.7.2",
+ "@trpc/server": "11.7.2",
+ "react": ">=18.2.0",
+ "react-dom": ">=18.2.0",
+ "typescript": ">=5.7.2"
+ }
+ },
+ "node_modules/@trpc/server": {
+ "version": "11.7.2",
+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-11.7.2.tgz",
+ "integrity": "sha512-AgB26PXY69sckherIhCacKLY49rxE2XP5h38vr/KMZTbLCL1p8IuIoKPjALTcugC2kbyQ7Lbqo2JDVfRSmPmfQ==",
+ "funding": [
+ "https://trpc.io/sponsor"
+ ],
+ "license": "MIT",
+ "peerDependencies": {
+ "typescript": ">=5.7.2"
+ }
+ },
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.12",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz",
+ "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@tsconfig/node16": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
+ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@turf/along": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/along/-/along-7.3.1.tgz",
+ "integrity": "sha512-z84b9PKsUB69BhkeHA6oPqRO7VaJHwTid1SpuIbwWzDqHTpq8buJBKlrKgHIIthuVr5P/AZiEXmf3R4ifRhDmw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bearing": "7.3.1",
+ "@turf/destination": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/angle": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/angle/-/angle-7.3.1.tgz",
+ "integrity": "sha512-Pcb0Fg8WHsOMKFvIPaYfORrlLYdytWjVAkVTnAqJdmGI+2n+eLROPjJO2sJbpX9yU/dlBgujOB7a1d0PJjhHyQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bearing": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/rhumb-bearing": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/area": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/area/-/area-7.3.1.tgz",
+ "integrity": "sha512-9nSiwt4zB5QDMcSoTxF28WpK1f741MNKcpUJDiHVRX08CZ4qfGWGV9ZIPQ8TVEn5RE4LyYkFuQ47Z9pdEUZE9Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/bbox": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-7.3.1.tgz",
+ "integrity": "sha512-/IyMKoS7P9B0ch5PIlQ6gMfoE8gRr48+cSbzlyexvEjuDuaAV1VURjH1jAthS0ipFG8RrFxFJKnp7TLL1Skong==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/bbox-clip": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/bbox-clip/-/bbox-clip-7.3.1.tgz",
+ "integrity": "sha512-YUeITFtp5QLbpSS0XyQa0GlgMqK4PMgjOeOGOTlWsfDYaqc5SErf7o5UyCOsLAPQW16QZVxJ26uTAE20YkluAA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/bbox-polygon": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/bbox-polygon/-/bbox-polygon-7.3.1.tgz",
+ "integrity": "sha512-2NvwPfuRtwJk7w5HIC/Knei3mUXrVT+t/0FB1zStgDbakmXrqKISaftlIh4YTOVlUsVnvq0tggjFMLZ/Xxo+lQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/bearing": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-7.3.1.tgz",
+ "integrity": "sha512-ex78l/LiY6uO6jO8AJepyWE6/tiWEbXjKLOgqUfJSkW23UcMVlhbAKzXDjbsdz9T66sXFC/6QNAh8oaZzmoo6w==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/bezier-spline": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/bezier-spline/-/bezier-spline-7.3.1.tgz",
+ "integrity": "sha512-7Mal/d8ttTQ5eu/mwgC53iH9eYBRTBHXsIqEEiTVHChh1iajNuS4/bwYdaxsQsRXKVaFfx+4dCy0cRmqhjgTrw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-clockwise": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-7.3.1.tgz",
+ "integrity": "sha512-ik9j0CCrsp/JZ42tbCnyZg86YFoavEU/nyal3HsEgdY5WFYq43aMYqLPRi6yNqE48THEk3fl1BcfgJqAiUhDFA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-concave": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-concave/-/boolean-concave-7.3.1.tgz",
+ "integrity": "sha512-jAAt5MhqXSKmRmX7l09oeo9dObf7bMDuzfeUSSNAK+yAi9TE5QWlP4JtzOWC5+gKXsL8dvzE8mvsQj38FzQdEA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-contains": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-7.3.1.tgz",
+ "integrity": "sha512-VvytV9ZcUgnitzm5ILVWIoOhoZOh8VZ4dnweUJM3N+A77CzXXFk8e4NqPNZ6tZVPY3ehxzDXrq1+iN87pMcB7g==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/boolean-point-on-line": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-crosses": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-crosses/-/boolean-crosses-7.3.1.tgz",
+ "integrity": "sha512-Fn99AxTXQORiQjclUqUYQcA40oJJoJxMBFx/Vycd7v949Lnplt1qrUkBpbZNXQlvHF2gxrgirSfgBDaUnUJjzQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/line-intersect": "7.3.1",
+ "@turf/polygon-to-line": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-disjoint": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-disjoint/-/boolean-disjoint-7.3.1.tgz",
+ "integrity": "sha512-bqVo+eAYaCq0lcr09zsZdWIAdv22UzGc/h2CCfaBwP5r4o/rFudNFLU9gb9BcM6dBUzrtTgBguShAZr7k3cGbw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/line-intersect": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/polygon-to-line": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-equal": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-equal/-/boolean-equal-7.3.1.tgz",
+ "integrity": "sha512-nEsmmNdwD1nzYZLsO6hPC/X/Uag+eT0yuWamD0XxJAQhXBsnSATxKisCJXVJgXvO8M0qvEMW1zZrUGB6Fjfzzw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clean-coords": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "geojson-equality-ts": "^1.0.2",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-intersects": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-intersects/-/boolean-intersects-7.3.1.tgz",
+ "integrity": "sha512-nc6W8qFdzFkfsR6p506HINGu85nHk/Skm+cw3TRQZ5/A44hjf0kYnbhvS3qrCAws3bR+/FKK8O1bsO/Udk8kkg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-disjoint": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-overlap": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-7.3.1.tgz",
+ "integrity": "sha512-QhhsgCLzkwXIeZhaCmgE3H8yTANJGZatJ5IzQG3xnPTx7LiNAaa/ReN2/NroEv++8Yc0sr5Bkh6xWZOtew1dvQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/line-intersect": "7.3.1",
+ "@turf/line-overlap": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "geojson-equality-ts": "^1.0.2",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-parallel": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-parallel/-/boolean-parallel-7.3.1.tgz",
+ "integrity": "sha512-SXPyYiuaRB1ES/LtcUP11HWyloMJGzN1nYaCLG7H+6l2OKjVJl025qR6uxVElWCzAdElek9nGNeNya1hd9ZHaw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clean-coords": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/line-segment": "7.3.1",
+ "@turf/rhumb-bearing": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-point-in-polygon": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-7.3.1.tgz",
+ "integrity": "sha512-BUPW63vE43LctwkgannjmEFTX1KFR/18SS7WzFahJWK1ZoP0s1jrfxGX+pi0BH/3Dd9mA71hkGKDDnj1Ndcz0g==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "point-in-polygon-hao": "^1.1.0",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-point-on-line": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-point-on-line/-/boolean-point-on-line-7.3.1.tgz",
+ "integrity": "sha512-8Hywuv7XFpSc8nfH0BJBtt+XTcJ7OjfjpX2Sz+ty8gyiY/2nCLLqq6amu3ebr67ruqZTDpPNQoGGUbUePjF3rA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-touches": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-touches/-/boolean-touches-7.3.1.tgz",
+ "integrity": "sha512-XqrQzYGTakoTWeTWT274pfObpbIpAM7L8CzGUa04rJD0l3bv3VK4TUw0v6+bywi5ea6TnJzvOzgvzTb1DtvBKA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/boolean-point-on-line": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-valid": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-valid/-/boolean-valid-7.3.1.tgz",
+ "integrity": "sha512-lpw4J5HaV4Tv033s2j/i6QHt6Zx/8Lc90DTfOU0axgRSrs127kbKNJsmDEGvtmV7YjNp8aPbIG1wwAX9wg/dMA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/boolean-crosses": "7.3.1",
+ "@turf/boolean-disjoint": "7.3.1",
+ "@turf/boolean-overlap": "7.3.1",
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/boolean-point-on-line": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/line-intersect": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "geojson-polygon-self-intersections": "^1.2.1",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/boolean-within": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-within/-/boolean-within-7.3.1.tgz",
+ "integrity": "sha512-oxP4VU81RRCf59TXCBhVWEyJ5Lsr+wrqvqSAFxyBuur5oLmBqZdYyvL7FQJmYvG0uOxX7ohyHmSJMaTe4EhGDA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/boolean-point-on-line": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/buffer": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/buffer/-/buffer-7.3.1.tgz",
+ "integrity": "sha512-jtdI0Ir3GwPyY1V2dFX039HNhD8MIYLX39c7b9AZdLh7kBuD2VgXJmPvhtnivqMV2SmRlS4fd9cKzNj369/cGg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/center": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/jsts": "^2.7.1",
+ "@turf/meta": "7.3.1",
+ "@turf/projection": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "d3-geo": "1.7.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/center": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/center/-/center-7.3.1.tgz",
+ "integrity": "sha512-czqNKLGGdik3phYsWCK5SHKBRkDulUArMlG4v62IQcNcRFq9MbOGqyN21GSshSMO792ynDeWzdXdcKmycQ14Yg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/center-mean": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/center-mean/-/center-mean-7.3.1.tgz",
+ "integrity": "sha512-koVenhCl8JPEvtDwH6nhZpLAm9+7XOXosqKdkXyK1uDae3NRyoQQeIYD7nIJHJPCOyeacw6buWzAEoAleBj0XA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/center-median": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/center-median/-/center-median-7.3.1.tgz",
+ "integrity": "sha512-XIvxqnSdcUFOev4WO8AEQth4U3uzfQkxYVkKhZrxpVitqEeSDm5v3ANUeVGYqQ/QNTWvFAFn4zB5+XRRd8tayA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/center-mean": "7.3.1",
+ "@turf/centroid": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/center-of-mass": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/center-of-mass/-/center-of-mass-7.3.1.tgz",
+ "integrity": "sha512-w2O7RLc0tSs+eEsZCaWa1lYiACsaQTJtie/a4bj5ta1TDTAEjyxC6Rp6br4mN1XPzeSFbEuNw+q9/VdSXU/mGA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/centroid": "7.3.1",
+ "@turf/convex": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/centroid": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-7.3.1.tgz",
+ "integrity": "sha512-hRnsDdVBH4pX9mAjYympb2q5W8TCMUMNEjcRrAF7HTCyjIuRmjJf8vUtlzf7TTn9RXbsvPc1vtm3kLw20Jm8DQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/circle": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-7.3.1.tgz",
+ "integrity": "sha512-UY2OM1OK7IuyrtN3YE8026ZM3xM9VIkqZ0vRZln8g33D0AogrJVJ/I9T81/VpRPlxTnrbDpzQxJQBH+3vPG/Ow==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/destination": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/clean-coords": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/clean-coords/-/clean-coords-7.3.1.tgz",
+ "integrity": "sha512-uNo4lnTekvkw8dUCXIVCc38nZiHBrpy5jn0T8hlodZo/A4XAChFtLQi8NLcX8rtXcaNxeJo+yaPfpP3PSVI2jw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-on-line": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/clone": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-7.3.1.tgz",
+ "integrity": "sha512-r7xDOfw9ohA7PhZW+8X9RMsO4szB4YqkhEROaELJyLtQ1bo8VNFtndpZdE6YHQpD7Pjlvlb6i99q8w1QLisEPg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/clusters": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/clusters/-/clusters-7.3.1.tgz",
+ "integrity": "sha512-ZELehyYnsozw+AHOc426abmPaGJOt46BHnCN+hwtPOkqEbvdZYu+16Y+cjiFnY7FwbvzBjDMb9HRtKJFlAmupg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/clusters-dbscan": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/clusters-dbscan/-/clusters-dbscan-7.3.1.tgz",
+ "integrity": "sha512-rY1wbQlljRhX5e+XM/yw4dKs2HniN45v+Xf5Xde6nv23WyEf/LLjpyD5yrsLa1awfJjD/NmD6axGVebnBBn9YA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "rbush": "^3.0.1",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/clusters-kmeans": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/clusters-kmeans/-/clusters-kmeans-7.3.1.tgz",
+ "integrity": "sha512-HYvRninBY/b5ftkIkoVWjV/wHilNE56cdr6gTlrxuvm4EClilsLDSVYjeiMYU0pjI3xDTc7PlicQDGdnIavUqQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "skmeans": "0.9.7",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/collect": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/collect/-/collect-7.3.1.tgz",
+ "integrity": "sha512-yVDz5YLcRGFipttb60Y4IAd7zWfbQk6mNW5Kt6/wa8+YueHFzsKJdtbErWfozCVuiKplQZWT5r+9J9g6RnhpjQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "rbush": "^3.0.1",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/combine": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/combine/-/combine-7.3.1.tgz",
+ "integrity": "sha512-iZBe36sKRq08fY3Ars0JpfYJm8N3LtLLnNzdTxHp8Ry2ORJGHvZHpcv3lQXWL7gyJwDPAye7pyrX7S99IB/1VA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/concave": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/concave/-/concave-7.3.1.tgz",
+ "integrity": "sha512-vZWqyAYH4qzOuiqPb+bj2jvpIGzYAH8byUhfFJ2gRFRL3/RfV8jdXL2r0Y6VFScqE6OLVGvtM3ITzXX1/9wTaA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/tin": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "topojson-client": "3.x",
+ "topojson-server": "3.x",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/convex": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/convex/-/convex-7.3.1.tgz",
+ "integrity": "sha512-k2T8QVSie4w+KhwUxjzi/6S6VFr33H9gnUawOh4chCGAgje9PljUZLCGbktHgDfAjX1FVzyUyriH+dm86Z7njQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "concaveman": "^1.2.1",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/destination": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-7.3.1.tgz",
+ "integrity": "sha512-yyiJtbQJ4AB9Ny/FKDDNuWI9Sg4Jtd2PMpQPqOV3AFq8NNkg0xJSNmDHDxupb3oPqPWYPxyfVI3tBoF+Xhhoig==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/difference": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-7.3.1.tgz",
+ "integrity": "sha512-Ne2AR+1AdeH8aqY2VHcws+Z/1MHl8SlSbSWHBNVZUVEfvyzTrRg8/E+OC5vFaSUvNZXkB/OUufTCM9xsatLKXQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "polyclip-ts": "^0.16.8",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/dissolve": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/dissolve/-/dissolve-7.3.1.tgz",
+ "integrity": "sha512-Xmjl4E1aGRMdJjq+HfsiAXZtfMKruq7O+8xvsqnHM6E8iBWlJNSw8ucrNB5RZME8BUojx0q8bvXgS3k68koGyw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/flatten": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "polyclip-ts": "^0.16.8",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/distance": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-7.3.1.tgz",
+ "integrity": "sha512-DK//doTGgYYjBkcWUywAe7wbZYcdP97hdEJ6rXYVYRoULwGGR3lhY96GNjozg6gaW9q2eSNYnZLpcL5iFVHqgw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/distance-weight": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/distance-weight/-/distance-weight-7.3.1.tgz",
+ "integrity": "sha512-h82qLPeMxOfgN62ZysscQCu9IYB5AO+duw7peAQnMtFobpbcQK58158P0cNzxAoTVJXSO/mfR9dI9Zdz7NF75w==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/centroid": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/ellipse": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/ellipse/-/ellipse-7.3.1.tgz",
+ "integrity": "sha512-tcGbS+U7EktZg+UJad17LRU+8C067XDWdmURPCmycaib2zRxeNrImh2Y/589us6wsldlYYoBYRxDY/c1oxIUCA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/destination": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/transform-rotate": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/envelope": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/envelope/-/envelope-7.3.1.tgz",
+ "integrity": "sha512-Sp3ct/LpWyHN5tTfPOcKXFoVDI1QH9BXtQ+aQzABFp3U5nY2Sz8LFg8SeFQm3K7PpoCnUwSfwDFA4aa+z+4l1g==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/bbox-polygon": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/explode": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/explode/-/explode-7.3.1.tgz",
+ "integrity": "sha512-H0Q8NnmrPoWKhsYYmVmkuT5F4t50N53ByGBf6Ys1n5B9YrFyrT+/aLDXF2C05r+QnW8nFtkM4lFG3ZSBHiq4Xg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/flatten": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/flatten/-/flatten-7.3.1.tgz",
+ "integrity": "sha512-cM/uuQP8oZ4IDJG342uOlqQ8yD9RsAY9Gg9nsDOgJn6tN065aigRCNy2lfrNyLdK/CPTVEWQzx1EQa+zXGSgAg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/flip": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/flip/-/flip-7.3.1.tgz",
+ "integrity": "sha512-6sF41pWY8Tw7w72hYc87sR9zzDei7UZ4Db/z0mKuNKueyzl4iTQ/H2JVd/XLZ7Tasz7H8htmrbUO0GR8GY7qiQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/geojson-rbush": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/geojson-rbush/-/geojson-rbush-7.3.1.tgz",
+ "integrity": "sha512-EsrBBftZS5TvzRP2opLzwfnPXfmJi45KkGUcKSSFD0bxQe3BQUSmBrZbHMT8avB2s/XHrS/MniqsyeVOMwc35Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "rbush": "^3.0.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/great-circle": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-7.3.1.tgz",
+ "integrity": "sha512-pfs7PzBRgYEEyecM0ni6iEF19grn9FmbHyaLz7voYInmc2ZHfWQaxuY4dcf9cziWDaiPlbuyr/RyE6envg1xpw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/helpers": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.3.1.tgz",
+ "integrity": "sha512-zkL34JVhi5XhsuMEO0MUTIIFEJ8yiW1InMu4hu/oRqamlY4mMoZql0viEmH6Dafh/p+zOl8OYvMJ3Vm3rFshgg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/hex-grid": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/hex-grid/-/hex-grid-7.3.1.tgz",
+ "integrity": "sha512-cWAKxlU1aa06976C3RhpcilDzLnWwXkH/atNIWKGpLV/HubHrMXxhp9VMBKWaqsLbdn5x2uJjv4MxwWw9/373g==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/intersect": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/interpolate": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/interpolate/-/interpolate-7.3.1.tgz",
+ "integrity": "sha512-dquwDplzkSANMQdvxAu0dRF69EBIIlW/1zTPOB/BQfb/s7j6t8RskgbuV8ew1KpJPMmj7EbexejiMBtRWXTu4Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/centroid": "7.3.1",
+ "@turf/clone": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/hex-grid": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/point-grid": "7.3.1",
+ "@turf/square-grid": "7.3.1",
+ "@turf/triangle-grid": "7.3.1",
+ "@types/geojson": "^7946.0.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/intersect": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/intersect/-/intersect-7.3.1.tgz",
+ "integrity": "sha512-676688YnF9wpprMioQWvxPlUMhtTvYITzw4XoG3lQmLjd/yt2cByanQHWpzWauLfYUlfuL13AeRGdqXRhSkhTQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "polyclip-ts": "^0.16.8",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/invariant": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-7.3.1.tgz",
+ "integrity": "sha512-IdZJfDjIDCLH+Gu2yLFoSM7H23sdetIo5t4ET1/25X8gi3GE2XSqbZwaGjuZgNh02nisBewLqNiJs2bo+hrqZA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/isobands": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/isobands/-/isobands-7.3.1.tgz",
+ "integrity": "sha512-An6+yUSrOStQSpZwKW9XN891kCW6eagtuofyudZ2BkoxcYRJ0vcDXo7RoiXuf9nHaG4k/xwhAzTqe8hdO1ltWA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/area": "7.3.1",
+ "@turf/bbox": "7.3.1",
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/explode": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/isolines": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/isolines/-/isolines-7.3.1.tgz",
+ "integrity": "sha512-TcwbTd7Z4BffYe1PtpXUtZvWCwTffta8VxqryGU30CbqKjNJYqrFbEQXS0mo4l3BEPPmT1lfMskUQ2g97O2MWQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/jsts": {
+ "version": "2.7.2",
+ "resolved": "https://registry.npmjs.org/@turf/jsts/-/jsts-2.7.2.tgz",
+ "integrity": "sha512-zAezGlwWHPyU0zxwcX2wQY3RkRpwuoBmhhNE9HY9kWhFDkCxZ3aWK5URKwa/SWKJbj9aztO+8vtdiBA28KVJFg==",
+ "license": "(EDL-1.0 OR EPL-1.0)",
+ "dependencies": {
+ "jsts": "2.7.1"
+ }
+ },
+ "node_modules/@turf/kinks": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/kinks/-/kinks-7.3.1.tgz",
+ "integrity": "sha512-gGXNrhlF7zvLwRX672S0Be7bmYjbZEoZYnOGN6RvhyBFSSLFIbne+I74I+lWRzAzG/NhAMBXma5TpB09iTH06Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/length": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/length/-/length-7.3.1.tgz",
+ "integrity": "sha512-QOr4qS3yi6qWIfQ/KLcy4rDLdemGCYpqz2YDh29R46seE+arSvlBI0KXvI36rPzgEMcUbQuVQyO65sOSqPaEjQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-arc": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-arc/-/line-arc-7.3.1.tgz",
+ "integrity": "sha512-QSuVP0YWcfl76QjPb5Y2GJqXnziSJ2AuaJm5RKEFt5ELugXdEcHkRtydkGov+ZRPmI93jVmXoEE0UXwQx7aYHA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/circle": "7.3.1",
+ "@turf/destination": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-chunk": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-chunk/-/line-chunk-7.3.1.tgz",
+ "integrity": "sha512-fbJw/7Qlqz0XRMz0TgtFUivFHr51+++ZUBrARgs3w/pogeAdkrcWKBbuT2cowEsUkXDHaQ7MMpmuV8Uteru1qw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/length": "7.3.1",
+ "@turf/line-slice-along": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-intersect": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-7.3.1.tgz",
+ "integrity": "sha512-HFPH4Hi+rG7XZ5rijkYL5C9JGVKd6gz6TToShVfqOt/qgGY9/bLYQxymgum/MG7sRhIa8xcKff2d57JrIVuSWA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "sweepline-intersections": "^1.5.0",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-offset": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-offset/-/line-offset-7.3.1.tgz",
+ "integrity": "sha512-PyElfSyXETXcI8OKRsAJNdOcxlM718EG0d+b9zeO2uRztf2IlSb5w3lYiTIUSslEDA1gMQE31cJE8sAW40+nhg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-overlap": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-7.3.1.tgz",
+ "integrity": "sha512-xIhTfPhJMwz57DvM+/JuzG2BUL/gR/pJfH6w+vofI3akej33LTR8b296h2dhcJjDixxprVVH062AD1Q3AGKyfg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-on-line": "7.3.1",
+ "@turf/geojson-rbush": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/line-segment": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/nearest-point-on-line": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "fast-deep-equal": "^3.1.3",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-segment": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-7.3.1.tgz",
+ "integrity": "sha512-hHz1fM2LigNKmnhyHDXtbRrkBqltH/lYEvhgSmv3laZ9PsEYL8jvA3o7+IhLM9B4KPa8N6VGim6ZR5YA5bhLvQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-slice": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-slice/-/line-slice-7.3.1.tgz",
+ "integrity": "sha512-bp1L4sc7ZOYC4fwxpfWu+IR/COvLFGm5mjbLPK8VBJYa+kUNrzNcB3QE3A8yFRjwPtlUTCm5fDMLSoGtiJcy2g==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/nearest-point-on-line": "7.3.1",
+ "@types/geojson": "^7946.0.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-slice-along": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-slice-along/-/line-slice-along-7.3.1.tgz",
+ "integrity": "sha512-RizIhPytHxEewCyUCSMrZ5a58sQev0kZ0jzAV/9iTzvGfRD1VU/RG2ThLpSEqXYKBBSty98rTeSlnwsvZpAraA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bearing": "7.3.1",
+ "@turf/destination": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-split": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-split/-/line-split-7.3.1.tgz",
+ "integrity": "sha512-Ee4NRN+eYKYX8vJDNvMpyZFjOntKFokQ/E8yFtKMcN++vG7RbnPOo2/ag6TMZaIHsahj4UR2yhqJbHTaB6Dp+g==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/geojson-rbush": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/line-intersect": "7.3.1",
+ "@turf/line-segment": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/nearest-point-on-line": "7.3.1",
+ "@turf/truncate": "7.3.1",
+ "@types/geojson": "^7946.0.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/line-to-polygon": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/line-to-polygon/-/line-to-polygon-7.3.1.tgz",
+ "integrity": "sha512-GL4fjbdYYjfOmwTu4dtllNHm18E7+hoXqyca2Rqb2ZzXj++NHvifJ9iYHUSdpV4/mkvVD3U2rU6jzNkjQeXIaA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/mask": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/mask/-/mask-7.3.1.tgz",
+ "integrity": "sha512-rSNS6wNuBiaUR1aU7tobgkzHpot5v9GKCn+n5gQ3ad7KWqwwqLWfcCPeyHBWkWEoEwc2yfPqikMQugZbmxrorg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "polyclip-ts": "^0.16.8",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/meta": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.3.1.tgz",
+ "integrity": "sha512-NWsfOE5RVtWpLQNkfOF/RrYvLRPwwruxhZUV0UFIzHqfiRJ50aO9Y6uLY4bwCUe2TumLJQSR4yaoA72Rmr2mnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/midpoint": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/midpoint/-/midpoint-7.3.1.tgz",
+ "integrity": "sha512-hx3eT9ut0Qyl8fyitCREp9l+v5Q4uBILht5+VKQS3p5eK2ijLEsKw4VikNZhh2rZ7bHGrs6obG5/P5ZqDTObiA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bearing": "7.3.1",
+ "@turf/destination": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/moran-index": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/moran-index/-/moran-index-7.3.1.tgz",
+ "integrity": "sha512-9t70AjBB0bycJWLVprqS7mtRU+Ha+U4ji5lkKzyg31ZWAr0IwuawY2VQ/ydsodFMLCqmIf8QbWsltV/I/bRdjQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/distance-weight": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/nearest-neighbor-analysis": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/nearest-neighbor-analysis/-/nearest-neighbor-analysis-7.3.1.tgz",
+ "integrity": "sha512-qwZON/7v1NbD1H1v3kTHJfLLml2/TNj5QQFRFBJiXRSCydMJT1sKEs5BwJe/9cBbmd0ln3gBWXCkG7Sk3sPgOQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/area": "7.3.1",
+ "@turf/bbox": "7.3.1",
+ "@turf/bbox-polygon": "7.3.1",
+ "@turf/centroid": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/nearest-point": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/nearest-point": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/nearest-point/-/nearest-point-7.3.1.tgz",
+ "integrity": "sha512-hLKGFzwAEop5z04X5BeurJvz0oVPHQX0rjeL3v83kgIjR/eavQucXKO3XkJBoF1AaT9Dv0mgB8rmj/qrwroWgg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/nearest-point-on-line": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-7.3.1.tgz",
+ "integrity": "sha512-FialyHfXXZWLayKQcUtdOtKv3ulOQ9FSI45kSmkDl8b96+VFWHX983Pc94tTrSTSg89+XX7MDr6gRl0yowmF4Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/nearest-point-to-line": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/nearest-point-to-line/-/nearest-point-to-line-7.3.1.tgz",
+ "integrity": "sha512-7zvhE15vlKBW7F3gYmxZMrnsS2HhXIt0Mpdymy6Y1oMWAXrYIqSeHl1Y/h2CiDh0v91K1KJXf2WyRYacosWiNA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/point-to-line-distance": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/planepoint": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/planepoint/-/planepoint-7.3.1.tgz",
+ "integrity": "sha512-/DVTAZcOsSW54B9XDYUXyiL000vJ8WfONCF4FoM71VMeLS7PM3e+4W9gzN21q15XRn3nUftH12tJhqKEqDouvw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/point-grid": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/point-grid/-/point-grid-7.3.1.tgz",
+ "integrity": "sha512-KqBlGgBzI/M7/awK25o9p8Q+mRjQDRU4mpHtqNzqNxgidk4JxnUnGybYTnsjp3n1Zid3yASv5kARJ4i/Jc5F7w==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-within": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/point-on-feature": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/point-on-feature/-/point-on-feature-7.3.1.tgz",
+ "integrity": "sha512-uX15wjujBMeMKAN7OLK4RV6KCLxsoQiFRB9kMtbTeZj13mDo+Bz5SyNN+M2AXqrdsQI9+4h0UTwu3EjcXj/nEw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/center": "7.3.1",
+ "@turf/explode": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/nearest-point": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/point-to-line-distance": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/point-to-line-distance/-/point-to-line-distance-7.3.1.tgz",
+ "integrity": "sha512-vynnX3zIMmJY633fyAIKnzlsmL7OBhbk05YhWVSjCKvSQV8C2xMA9pWaLFacn1xu4nfMSVDUaNOrcAqwubN9pg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bearing": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/nearest-point-on-line": "7.3.1",
+ "@turf/projection": "7.3.1",
+ "@turf/rhumb-bearing": "7.3.1",
+ "@turf/rhumb-distance": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/point-to-polygon-distance": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/point-to-polygon-distance/-/point-to-polygon-distance-7.3.1.tgz",
+ "integrity": "sha512-A2hTQjMKO2VEMdgOariICLCjt0BDc1wAQ7Mzqc4vFuol1/GlAed4JqyLg1zXuOVlZcojvXDk/XRuZwXDlRJkBA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/point-to-line-distance": "7.3.1",
+ "@turf/polygon-to-line": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/points-within-polygon": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/points-within-polygon/-/points-within-polygon-7.3.1.tgz",
+ "integrity": "sha512-tVcQVykc1vvSqz+l/PA4EKVWfMrGtA3ZUxDYBoD2tSaM79EpdTcY1BzfxT5O2582SQ0AdNFXDXRTf7VI6u/+2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/polygon-smooth": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/polygon-smooth/-/polygon-smooth-7.3.1.tgz",
+ "integrity": "sha512-CNi4SdpOycZRSBr4o0MlrFdC6x5xcXP6jKx2yXZf9FPrOWamHsDXa+NrywCOAPhgZKnBodRF6usKWudVMyPIgg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/polygon-tangents": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/polygon-tangents/-/polygon-tangents-7.3.1.tgz",
+ "integrity": "sha512-XPLeCLQAcU2xco+3kS5Mp4AKmCKjOGzyZoC6oy8BuvHg1HaaEs0ZRzcmf0x17cq7bruhJ7n/QkcudnAueae5mg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/boolean-within": "7.3.1",
+ "@turf/explode": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/nearest-point": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/polygon-to-line": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/polygon-to-line/-/polygon-to-line-7.3.1.tgz",
+ "integrity": "sha512-qTOFzn7SLQ0TcKBsPFAFYz7iiq34ijqinpjyr9fHQlFHRHeWzUXiWyIn5a2uOHazkdhHCEXNX8JPkt6hjdZ/fQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/polygonize": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/polygonize/-/polygonize-7.3.1.tgz",
+ "integrity": "sha512-BSamH4eDSbREtye/RZiIyt488KI/hO3+2FiDB8JUoHNESe3VNWk4KEy+sL6oqfhOZcRWndHtJ6MOi3HFptyJrw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/envelope": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/projection": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-7.3.1.tgz",
+ "integrity": "sha512-nDM3LG2j37B1tCpF4xL4rUBrQJcG585IRyDIxL2QEvP1LLv6dcm4fodw70HcGAj05Ux8bJr7IOXQXnobOJrlRA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/quadrat-analysis": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/quadrat-analysis/-/quadrat-analysis-7.3.1.tgz",
+ "integrity": "sha512-Kwqtih5CnijULGoTobS0pXdzh/Yr3iGatJcKks4IaxA4+hlJ6Z+Mj47QfKvUtl/IP3lZpVzezewJ51Y989YtVg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/area": "7.3.1",
+ "@turf/bbox": "7.3.1",
+ "@turf/bbox-polygon": "7.3.1",
+ "@turf/centroid": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/point-grid": "7.3.1",
+ "@turf/random": "7.3.1",
+ "@turf/square-grid": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/random": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/random/-/random-7.3.1.tgz",
+ "integrity": "sha512-Iruica0gfdAuuqWG3SLe1MQOEP4IOGelPp81Cu552AamhHJmkEZCaiis2n28qdOlAbDs1NJZeJhRFNkiopiy+Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/rectangle-grid": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/rectangle-grid/-/rectangle-grid-7.3.1.tgz",
+ "integrity": "sha512-3/fwd1dzeGApxGXAzyVINFylmn8trYTPLG6jtqOgriAdiHPMTtPqSW58wpScC43oKbK3Bps9dSZ43jvcbrfGxw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-intersects": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/rewind": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-7.3.1.tgz",
+ "integrity": "sha512-gD2TGPNq3SE6IlpDwkVHQthZ2U2MElh6X4Vfld3K7VsBHJv4eBct6OOgSWZLkVVPHuWNlVFTNtcRh2LAznMtgw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-clockwise": "7.3.1",
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/rhumb-bearing": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-7.3.1.tgz",
+ "integrity": "sha512-GA/EUSOMapLp6qK5kOX+PkFg2MMUHzUSm/jVezv6Fted0dAlCgXHOrKgLm0tN8PqbH7Oj9xQhv9+3/1ze7W8YA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/rhumb-destination": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/rhumb-destination/-/rhumb-destination-7.3.1.tgz",
+ "integrity": "sha512-HjtAFr5DTISUn9b4oaZpX79tYl72r4EyAj40HKwjQeV6KkwIe5/h4zryOSEpnvAK2Gnkmu1GxYeTGfM5z3J9JA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/rhumb-distance": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-7.3.1.tgz",
+ "integrity": "sha512-9ZvXU0ii2aywdphLhiawl3uxMEHucMmXCBiRj3WhmssTY9CZkFii9iImbJEqz5glxh6/gzXDcz1CCFQUdNP2xA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/sample": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/sample/-/sample-7.3.1.tgz",
+ "integrity": "sha512-s9IkXrrtaHRllgk9X2tmg8+SJKLG6orQwf0p1wZX8WxnHXvmnHaju465A3nmtGGVDI/RSD8KwU9aqPcc4AinNw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/sector": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/sector/-/sector-7.3.1.tgz",
+ "integrity": "sha512-3BYJk7pQaqVr1Ji1ors6FUnhCJVHuobNf4bYW2yAUW1rxL+snuo6aTCsu39hpkwLj4BBknYt5w4MIOy5b8+QKg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/circle": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/line-arc": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/shortest-path": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/shortest-path/-/shortest-path-7.3.1.tgz",
+ "integrity": "sha512-B0j6MoTSeGw1inRJPfj+6lU4WVXBNFAafqs/BkccScnCHLLK+vMnsOkyQoDX2vdZnhPTEaGj7TEL1SIjV6IMgA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/bbox-polygon": "7.3.1",
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/clean-coords": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/transform-scale": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/simplify": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/simplify/-/simplify-7.3.1.tgz",
+ "integrity": "sha512-8LRITQAyNAdvVInjm8pal3J7ZAZZBYrYd5oApXqHlIFK7gEiE21Hx9CZyog6AHDjxZCinwnEoGkzDxORh/mNMg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clean-coords": "7.3.1",
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/square": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/square/-/square-7.3.1.tgz",
+ "integrity": "sha512-LvMkII6bbHaFHp67jI029xHjWFK3pnqwF8c2pUNU+0dL+45KgrO2jaFTnNQdsjexPymI+uaNLlG809Y0aGGQlw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/square-grid": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/square-grid/-/square-grid-7.3.1.tgz",
+ "integrity": "sha512-WYCX8+nrqHyAhKBSBHFp1eU1gWrcojz9uVvhCbDO8NO14SLHowzWOgB61Gv8KlLXCUBjDr+rYWCt3ymyPzU5TA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/rectangle-grid": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/standard-deviational-ellipse": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-7.3.1.tgz",
+ "integrity": "sha512-u9ojpWyv3rnFioYZyya6VXVDrRPYymNROVKwGqnQzffYE1MdxhJ6ik/CvdcChzCNvSNVBJQUvnjjPq2C2uOsLA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/center-mean": "7.3.1",
+ "@turf/ellipse": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/points-within-polygon": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/tag": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/tag/-/tag-7.3.1.tgz",
+ "integrity": "sha512-Y7G2EWm0/j78ss5wCnjGWKfmPbXw9yKJFg93EuMnwggIsDfKdQi/vdUInjQ0462RIQA87StlydPG09X/8bquwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/tesselate": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/tesselate/-/tesselate-7.3.1.tgz",
+ "integrity": "sha512-iJnatp9RcJvyffBjqJaw5GbKE/PQosT8DH2kgG7pv4Re0xl3h/QvCjvTlCTEmJ5cNY4geZVKUXDvkkCkgQQVuA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "earcut": "^2.2.4",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/tin": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/tin/-/tin-7.3.1.tgz",
+ "integrity": "sha512-pDtHE8rLXvV4zAC9mWmwToDDda2ZTty8IZqZIoUqTnlf6AJjzF7TJrhoE3a+zukRTUI1wowTFqe2NvwgNX0yew==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/transform-rotate": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/transform-rotate/-/transform-rotate-7.3.1.tgz",
+ "integrity": "sha512-KAYebOkk7IT2j7S8M+ZxDAmyqeni9ZZGU9ouD6mvd/hTpDOlGG+ORRmg312RxG0NiThzCHLyeG1Nea1nEud6bg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/centroid": "7.3.1",
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/rhumb-bearing": "7.3.1",
+ "@turf/rhumb-destination": "7.3.1",
+ "@turf/rhumb-distance": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/transform-scale": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/transform-scale/-/transform-scale-7.3.1.tgz",
+ "integrity": "sha512-e8jBSWEn0BMxG0HR8ZMvkHgBgdwNrFRzbhy8DqQwZDgUN59fMeWGbjX5QR5Exl2gZBPaBXkgbDgEhh/JD3kYhw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/bbox": "7.3.1",
+ "@turf/center": "7.3.1",
+ "@turf/centroid": "7.3.1",
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/rhumb-bearing": "7.3.1",
+ "@turf/rhumb-destination": "7.3.1",
+ "@turf/rhumb-distance": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/transform-translate": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/transform-translate/-/transform-translate-7.3.1.tgz",
+ "integrity": "sha512-yeaW1EqfuuY4l5VBWSsItglaZ9qdTFD0QEIUW1ooOYuQvtKQ2MTKrcQIKLXZckxQrrNq4TXsZDaBbFs+U1wtcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/rhumb-destination": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/triangle-grid": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/triangle-grid/-/triangle-grid-7.3.1.tgz",
+ "integrity": "sha512-lhZyqnQC/M8x8DgQURHNZP/HaJIqrL5We5ZvzJBX+lrH2u4DO831awJcuDniRuJ5e0QE5n4yMsBJO77KMNdKfw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/distance": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/intersect": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/truncate": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-7.3.1.tgz",
+ "integrity": "sha512-rcXHM2m17hyKoW1dJpOvTgUUWFOKluTKKsoLmhEE6aRAYwtuVetkcInt4qBtS1bv7MaL//glbvq0kdEGR0YaOA==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/turf": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/turf/-/turf-7.3.1.tgz",
+ "integrity": "sha512-0uKkNnM6Bo6cIzZcJ6wQ+FjFioTFXWS3woGDvQ5R7EPehNfdr4HTS39m1seE+HdI8lGItMZehb6fb0jtjP4Clg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/along": "7.3.1",
+ "@turf/angle": "7.3.1",
+ "@turf/area": "7.3.1",
+ "@turf/bbox": "7.3.1",
+ "@turf/bbox-clip": "7.3.1",
+ "@turf/bbox-polygon": "7.3.1",
+ "@turf/bearing": "7.3.1",
+ "@turf/bezier-spline": "7.3.1",
+ "@turf/boolean-clockwise": "7.3.1",
+ "@turf/boolean-concave": "7.3.1",
+ "@turf/boolean-contains": "7.3.1",
+ "@turf/boolean-crosses": "7.3.1",
+ "@turf/boolean-disjoint": "7.3.1",
+ "@turf/boolean-equal": "7.3.1",
+ "@turf/boolean-intersects": "7.3.1",
+ "@turf/boolean-overlap": "7.3.1",
+ "@turf/boolean-parallel": "7.3.1",
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/boolean-point-on-line": "7.3.1",
+ "@turf/boolean-touches": "7.3.1",
+ "@turf/boolean-valid": "7.3.1",
+ "@turf/boolean-within": "7.3.1",
+ "@turf/buffer": "7.3.1",
+ "@turf/center": "7.3.1",
+ "@turf/center-mean": "7.3.1",
+ "@turf/center-median": "7.3.1",
+ "@turf/center-of-mass": "7.3.1",
+ "@turf/centroid": "7.3.1",
+ "@turf/circle": "7.3.1",
+ "@turf/clean-coords": "7.3.1",
+ "@turf/clone": "7.3.1",
+ "@turf/clusters": "7.3.1",
+ "@turf/clusters-dbscan": "7.3.1",
+ "@turf/clusters-kmeans": "7.3.1",
+ "@turf/collect": "7.3.1",
+ "@turf/combine": "7.3.1",
+ "@turf/concave": "7.3.1",
+ "@turf/convex": "7.3.1",
+ "@turf/destination": "7.3.1",
+ "@turf/difference": "7.3.1",
+ "@turf/dissolve": "7.3.1",
+ "@turf/distance": "7.3.1",
+ "@turf/distance-weight": "7.3.1",
+ "@turf/ellipse": "7.3.1",
+ "@turf/envelope": "7.3.1",
+ "@turf/explode": "7.3.1",
+ "@turf/flatten": "7.3.1",
+ "@turf/flip": "7.3.1",
+ "@turf/geojson-rbush": "7.3.1",
+ "@turf/great-circle": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/hex-grid": "7.3.1",
+ "@turf/interpolate": "7.3.1",
+ "@turf/intersect": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@turf/isobands": "7.3.1",
+ "@turf/isolines": "7.3.1",
+ "@turf/kinks": "7.3.1",
+ "@turf/length": "7.3.1",
+ "@turf/line-arc": "7.3.1",
+ "@turf/line-chunk": "7.3.1",
+ "@turf/line-intersect": "7.3.1",
+ "@turf/line-offset": "7.3.1",
+ "@turf/line-overlap": "7.3.1",
+ "@turf/line-segment": "7.3.1",
+ "@turf/line-slice": "7.3.1",
+ "@turf/line-slice-along": "7.3.1",
+ "@turf/line-split": "7.3.1",
+ "@turf/line-to-polygon": "7.3.1",
+ "@turf/mask": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@turf/midpoint": "7.3.1",
+ "@turf/moran-index": "7.3.1",
+ "@turf/nearest-neighbor-analysis": "7.3.1",
+ "@turf/nearest-point": "7.3.1",
+ "@turf/nearest-point-on-line": "7.3.1",
+ "@turf/nearest-point-to-line": "7.3.1",
+ "@turf/planepoint": "7.3.1",
+ "@turf/point-grid": "7.3.1",
+ "@turf/point-on-feature": "7.3.1",
+ "@turf/point-to-line-distance": "7.3.1",
+ "@turf/point-to-polygon-distance": "7.3.1",
+ "@turf/points-within-polygon": "7.3.1",
+ "@turf/polygon-smooth": "7.3.1",
+ "@turf/polygon-tangents": "7.3.1",
+ "@turf/polygon-to-line": "7.3.1",
+ "@turf/polygonize": "7.3.1",
+ "@turf/projection": "7.3.1",
+ "@turf/quadrat-analysis": "7.3.1",
+ "@turf/random": "7.3.1",
+ "@turf/rectangle-grid": "7.3.1",
+ "@turf/rewind": "7.3.1",
+ "@turf/rhumb-bearing": "7.3.1",
+ "@turf/rhumb-destination": "7.3.1",
+ "@turf/rhumb-distance": "7.3.1",
+ "@turf/sample": "7.3.1",
+ "@turf/sector": "7.3.1",
+ "@turf/shortest-path": "7.3.1",
+ "@turf/simplify": "7.3.1",
+ "@turf/square": "7.3.1",
+ "@turf/square-grid": "7.3.1",
+ "@turf/standard-deviational-ellipse": "7.3.1",
+ "@turf/tag": "7.3.1",
+ "@turf/tesselate": "7.3.1",
+ "@turf/tin": "7.3.1",
+ "@turf/transform-rotate": "7.3.1",
+ "@turf/transform-scale": "7.3.1",
+ "@turf/transform-translate": "7.3.1",
+ "@turf/triangle-grid": "7.3.1",
+ "@turf/truncate": "7.3.1",
+ "@turf/union": "7.3.1",
+ "@turf/unkink-polygon": "7.3.1",
+ "@turf/voronoi": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/union": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/union/-/union-7.3.1.tgz",
+ "integrity": "sha512-Fk8HvP2gRrRJz8xefeoFJJUeLwhih3HoPPKlqaDf/6L43jwAzBD6BPu59+AwRXOlaZeOUMNMGzgSgx0KKrBwBg==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "polyclip-ts": "^0.16.8",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/unkink-polygon": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/unkink-polygon/-/unkink-polygon-7.3.1.tgz",
+ "integrity": "sha512-6NVFkCpJUT2P4Yf3z/FI2uGDXqVdEqZqKGl2hYitmH7mNiKhU4bAvvcw7nCSfNG3sUyNhibbtOEopYMRgwimPw==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/area": "7.3.1",
+ "@turf/boolean-point-in-polygon": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/meta": "7.3.1",
+ "@types/geojson": "^7946.0.10",
+ "rbush": "^3.0.1",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@turf/voronoi": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/@turf/voronoi/-/voronoi-7.3.1.tgz",
+ "integrity": "sha512-yS+0EDwSIOizEXI+05qixw/OGZalpfsz9xzBWbCBA3Gu2boLMXErFZ73qzfu39Vwk+ILbu5em0p+VhULBzvH9w==",
+ "license": "MIT",
+ "dependencies": {
+ "@turf/clone": "7.3.1",
+ "@turf/helpers": "7.3.1",
+ "@turf/invariant": "7.3.1",
+ "@types/d3-voronoi": "^1.1.12",
+ "@types/geojson": "^7946.0.10",
+ "d3-voronoi": "1.1.2",
+ "tslib": "^2.8.1"
+ },
+ "funding": {
+ "url": "https://opencollective.com/turf"
+ }
+ },
+ "node_modules/@tybys/wasm-util": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",
+ "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@types/babel__core": {
+ "version": "7.20.5",
+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
+ "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
+ "@types/babel__generator": "*",
+ "@types/babel__template": "*",
+ "@types/babel__traverse": "*"
+ }
+ },
+ "node_modules/@types/babel__generator": {
+ "version": "7.27.0",
+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz",
+ "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__template": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.1.0",
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__traverse": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",
+ "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.28.2"
+ }
+ },
+ "node_modules/@types/bcryptjs": {
+ "version": "2.4.6",
+ "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.6.tgz",
+ "integrity": "sha512-9xlo6R2qDs5uixm0bcIqCeMCE6HiQsIyel9KQySStiyqNl2tnj2mP3DX1Nf56MD6KMenNNlBBsy3LJ7gUEQPXQ==",
+ "license": "MIT"
+ },
+ "node_modules/@types/body-parser": {
+ "version": "1.19.6",
+ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz",
+ "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/connect": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/connect": {
+ "version": "3.4.38",
+ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz",
+ "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/cors": {
+ "version": "2.8.19",
+ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz",
+ "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/d3-voronoi": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/@types/d3-voronoi/-/d3-voronoi-1.1.12.tgz",
+ "integrity": "sha512-DauBl25PKZZ0WVJr42a6CNvI6efsdzofl9sajqZr2Gf5Gu733WkDdUGiPkUHXiUvYGzNNlFQde2wdZdfQPG+yw==",
+ "license": "MIT"
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/express": {
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.6.tgz",
+ "integrity": "sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/body-parser": "*",
+ "@types/express-serve-static-core": "^5.0.0",
+ "@types/serve-static": "^2"
+ }
+ },
+ "node_modules/@types/express-serve-static-core": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.1.0.tgz",
+ "integrity": "sha512-jnHMsrd0Mwa9Cf4IdOzbz543y4XJepXrbia2T4b6+spXC2We3t1y6K44D3mR8XMFSXMCf3/l7rCgddfx7UNVBA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*",
+ "@types/send": "*"
+ }
+ },
+ "node_modules/@types/geojson": {
+ "version": "7946.0.16",
+ "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
+ "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",
+ "license": "MIT"
+ },
+ "node_modules/@types/graceful-fs": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
+ "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/hammerjs": {
+ "version": "2.0.46",
+ "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.46.tgz",
+ "integrity": "sha512-ynRvcq6wvqexJ9brDMS4BnBLzmr0e14d6ZJTEShTBWKymQiHwlAyGu0ZPEFI2Fh1U53F7tN9ufClWM5KvqkKOw==",
+ "license": "MIT"
+ },
+ "node_modules/@types/hoist-non-react-statics": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.7.tgz",
+ "integrity": "sha512-PQTyIulDkIDro8P+IHbKCsw7U2xxBYflVzW/FgWdCAePD9xGSidgA76/GeJ6lBKoblyhf9pBY763gbrN+1dI8g==",
+ "license": "MIT",
+ "dependencies": {
+ "hoist-non-react-statics": "^3.3.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*"
+ }
+ },
+ "node_modules/@types/http-errors": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz",
+ "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==",
+ "license": "MIT"
+ },
+ "node_modules/@types/istanbul-lib-coverage": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
+ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",
+ "license": "MIT"
+ },
+ "node_modules/@types/istanbul-lib-report": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",
+ "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/istanbul-lib-coverage": "*"
+ }
+ },
+ "node_modules/@types/istanbul-reports": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",
+ "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/istanbul-lib-report": "*"
+ }
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/json5": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
+ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/jsonwebtoken": {
+ "version": "9.0.10",
+ "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.10.tgz",
+ "integrity": "sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/ms": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/ms": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
+ "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/multer": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@types/multer/-/multer-2.0.0.tgz",
+ "integrity": "sha512-C3Z9v9Evij2yST3RSBktxP9STm6OdMc5uR1xF1SGr98uv8dUlAL2hqwrZ3GVB3uyMyiegnscEK6PGtYvNrjTjw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/express": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "24.10.3",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.3.tgz",
+ "integrity": "sha512-gqkrWUsS8hcm0r44yn7/xZeV1ERva/nLgrLxFRUGb7aoNMIJfZJ3AC261zDQuOAKC7MiXai1WCpYc48jAHoShQ==",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~7.16.0"
+ }
+ },
+ "node_modules/@types/node/node_modules/undici-types": {
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
+ "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
+ "license": "MIT"
+ },
+ "node_modules/@types/pg": {
+ "version": "8.16.0",
+ "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.16.0.tgz",
+ "integrity": "sha512-RmhMd/wD+CF8Dfo+cVIy3RR5cl8CyfXQ0tGgW6XBL8L4LM/UTEbNXYRbLwU6w+CgrKBNbrQWt4FUtTfaU5jSYQ==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "pg-protocol": "*",
+ "pg-types": "^2.2.0"
+ }
+ },
+ "node_modules/@types/qs": {
+ "version": "6.14.0",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz",
+ "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==",
+ "license": "MIT"
+ },
+ "node_modules/@types/range-parser": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz",
+ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==",
+ "license": "MIT"
+ },
+ "node_modules/@types/react": {
+ "version": "19.0.14",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.14.tgz",
+ "integrity": "sha512-ixLZ7zG7j1fM0DijL9hDArwhwcCb4vqmePgwtV0GfnkHRSCUEv4LvzarcTdhoqgyMznUx/EhoTUv31CKZzkQlw==",
+ "license": "MIT",
+ "dependencies": {
+ "csstype": "^3.0.2"
+ }
+ },
+ "node_modules/@types/react-dom": {
+ "version": "19.0.6",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.0.6.tgz",
+ "integrity": "sha512-lo6MuY+rFr8kIiFnr+7TzO+Av0wUPcEcepiPV4epGP0eTQpkDfp9czudg73isV8UxKauCUNlL1N8fXhcnx4iBw==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "^19.0.0"
+ }
+ },
+ "node_modules/@types/react-native-razorpay": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/@types/react-native-razorpay/-/react-native-razorpay-2.2.6.tgz",
+ "integrity": "sha512-8CqZvL53bqs51aLaNXssEaBFN5a09WB5nWEOa1RtNXTnuh9zDyMZ9yKqjN+buVFFOAH4mE9IpB7J1V1I3REnMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/react": "*"
+ }
+ },
+ "node_modules/@types/send": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz",
+ "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/serve-static": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-2.2.0.tgz",
+ "integrity": "sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/http-errors": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/stack-utils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",
+ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
+ "license": "MIT"
+ },
+ "node_modules/@types/strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/strip-json-comments": {
+ "version": "0.0.30",
+ "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz",
+ "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/validator": {
+ "version": "13.15.10",
+ "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.15.10.tgz",
+ "integrity": "sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/yargs": {
+ "version": "17.0.35",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz",
+ "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/yargs-parser": "*"
+ }
+ },
+ "node_modules/@types/yargs-parser": {
+ "version": "21.0.3",
+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz",
+ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==",
+ "license": "MIT"
+ },
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.49.0.tgz",
+ "integrity": "sha512-JXij0vzIaTtCwu6SxTh8qBc66kmf1xs7pI4UOiMDFVct6q86G0Zs7KRcEoJgY3Cav3x5Tq0MF5jwgpgLqgKG3A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.10.0",
+ "@typescript-eslint/scope-manager": "8.49.0",
+ "@typescript-eslint/type-utils": "8.49.0",
+ "@typescript-eslint/utils": "8.49.0",
+ "@typescript-eslint/visitor-keys": "8.49.0",
+ "ignore": "^7.0.0",
+ "natural-compare": "^1.4.0",
+ "ts-api-utils": "^2.1.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^8.49.0",
+ "eslint": "^8.57.0 || ^9.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.49.0.tgz",
+ "integrity": "sha512-N9lBGA9o9aqb1hVMc9hzySbhKibHmB+N3IpoShyV6HyQYRGIhlrO5rQgttypi+yEeKsKI4idxC8Jw6gXKD4THA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "8.49.0",
+ "@typescript-eslint/types": "8.49.0",
+ "@typescript-eslint/typescript-estree": "8.49.0",
+ "@typescript-eslint/visitor-keys": "8.49.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/parser/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/parser/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.49.0.tgz",
+ "integrity": "sha512-/wJN0/DKkmRUMXjZUXYZpD1NEQzQAAn9QWfGwo+Ai8gnzqH7tvqS7oNVdTjKqOcPyVIdZdyCMoqN66Ia789e7g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/tsconfig-utils": "^8.49.0",
+ "@typescript-eslint/types": "^8.49.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/project-service/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/project-service/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.49.0.tgz",
+ "integrity": "sha512-npgS3zi+/30KSOkXNs0LQXtsg9ekZ8OISAOLGWA/ZOEn0ZH74Ginfl7foziV8DT+D98WfQ5Kopwqb/PZOaIJGg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.49.0",
+ "@typescript-eslint/visitor-keys": "8.49.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.49.0.tgz",
+ "integrity": "sha512-8prixNi1/6nawsRYxet4YOhnbW+W9FK/bQPxsGB1D3ZrDzbJ5FXw5XmzxZv82X3B+ZccuSxo/X8q9nQ+mFecWA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.49.0.tgz",
+ "integrity": "sha512-KTExJfQ+svY8I10P4HdxKzWsvtVnsuCifU5MvXrRwoP2KOlNZ9ADNEWWsQTJgMxLzS5VLQKDjkCT/YzgsnqmZg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.49.0",
+ "@typescript-eslint/typescript-estree": "8.49.0",
+ "@typescript-eslint/utils": "8.49.0",
+ "debug": "^4.3.4",
+ "ts-api-utils": "^2.1.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.49.0.tgz",
+ "integrity": "sha512-e9k/fneezorUo6WShlQpMxXh8/8wfyc+biu6tnAqA81oWrEic0k21RHzP9uqqpyBBeBKu4T+Bsjy9/b8u7obXQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.49.0.tgz",
+ "integrity": "sha512-jrLdRuAbPfPIdYNppHJ/D0wN+wwNfJ32YTAm10eJVsFmrVpXQnDWBn8niCSMlWjvml8jsce5E/O+86IQtTbJWA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/project-service": "8.49.0",
+ "@typescript-eslint/tsconfig-utils": "8.49.0",
+ "@typescript-eslint/types": "8.49.0",
+ "@typescript-eslint/visitor-keys": "8.49.0",
+ "debug": "^4.3.4",
+ "minimatch": "^9.0.4",
+ "semver": "^7.6.0",
+ "tinyglobby": "^0.2.15",
+ "ts-api-utils": "^2.1.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.49.0.tgz",
+ "integrity": "sha512-N3W7rJw7Rw+z1tRsHZbK395TWSYvufBXumYtEGzypgMUthlg0/hmCImeA8hgO2d2G4pd7ftpxxul2J8OdtdaFA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.7.0",
+ "@typescript-eslint/scope-manager": "8.49.0",
+ "@typescript-eslint/types": "8.49.0",
+ "@typescript-eslint/typescript-estree": "8.49.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.49.0.tgz",
+ "integrity": "sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.49.0",
+ "eslint-visitor-keys": "^4.2.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@unrs/resolver-binding-android-arm-eabi": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz",
+ "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-android-arm64": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz",
+ "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-darwin-arm64": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz",
+ "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-darwin-x64": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz",
+ "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-freebsd-x64": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz",
+ "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz",
+ "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz",
+ "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-arm64-gnu": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz",
+ "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-arm64-musl": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz",
+ "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz",
+ "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz",
+ "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-riscv64-musl": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz",
+ "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-s390x-gnu": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz",
+ "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-x64-gnu": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz",
+ "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-linux-x64-musl": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz",
+ "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-wasm32-wasi": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz",
+ "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==",
+ "cpu": [
+ "wasm32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@napi-rs/wasm-runtime": "^0.2.11"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@unrs/resolver-binding-win32-arm64-msvc": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz",
+ "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-win32-ia32-msvc": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz",
+ "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@unrs/resolver-binding-win32-x64-msvc": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz",
+ "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@urql/core": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@urql/core/-/core-5.2.0.tgz",
+ "integrity": "sha512-/n0ieD0mvvDnVAXEQgX/7qJiVcvYvNkOHeBvkwtylfjydar123caCXcl58PXFY11oU1oquJocVXHxLAbtv4x1A==",
+ "license": "MIT",
+ "dependencies": {
+ "@0no-co/graphql.web": "^1.0.13",
+ "wonka": "^6.3.2"
+ }
+ },
+ "node_modules/@urql/exchange-retry": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@urql/exchange-retry/-/exchange-retry-1.3.2.tgz",
+ "integrity": "sha512-TQMCz2pFJMfpNxmSfX1VSfTjwUIFx/mL+p1bnfM1xjjdla7Z+KnGMW/EhFbpckp3LyWAH4PgOsMwOMnIN+MBFg==",
+ "license": "MIT",
+ "dependencies": {
+ "@urql/core": "^5.1.2",
+ "wonka": "^6.3.2"
+ },
+ "peerDependencies": {
+ "@urql/core": "^5.0.0"
+ }
+ },
+ "node_modules/@vitejs/plugin-react-swc": {
+ "version": "3.11.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.11.0.tgz",
+ "integrity": "sha512-YTJCGFdNMHCMfjODYtxRNVAYmTWQ1Lb8PulP/2/f/oEEtglw8oKxKIZmmRkyXrVrHfsKOaVkAc3NT9/dMutO5w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rolldown/pluginutils": "1.0.0-beta.27",
+ "@swc/core": "^1.12.11"
+ },
+ "peerDependencies": {
+ "vite": "^4 || ^5 || ^6 || ^7"
+ }
+ },
+ "node_modules/@xmldom/xmldom": {
+ "version": "0.8.11",
+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
+ "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/abort-controller": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
+ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
+ "license": "MIT",
+ "dependencies": {
+ "event-target-shim": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=6.5"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.15.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
+ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.3.4",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
+ "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^8.11.0"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/admin-ui": {
+ "resolved": "apps/admin-ui",
+ "link": true
+ },
+ "node_modules/agent-base": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/anser": {
+ "version": "1.4.10",
+ "resolved": "https://registry.npmjs.org/anser/-/anser-1.4.10.tgz",
+ "integrity": "sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==",
+ "license": "MIT"
+ },
+ "node_modules/ansi-escapes": {
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
+ "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
+ "license": "MIT",
+ "dependencies": {
+ "type-fest": "^0.21.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ansi-escapes/node_modules/type-fest": {
+ "version": "0.21.3",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
+ "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/any-promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
+ "license": "MIT"
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "license": "ISC",
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/anymatch/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/append-field": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
+ "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==",
+ "license": "MIT"
+ },
+ "node_modules/arg": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
+ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
+ "license": "MIT"
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "license": "Python-2.0"
+ },
+ "node_modules/array-buffer-byte-length": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz",
+ "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "is-array-buffer": "^3.0.5"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "license": "MIT"
+ },
+ "node_modules/array-includes": {
+ "version": "3.1.9",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz",
+ "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.24.0",
+ "es-object-atoms": "^1.1.1",
+ "get-intrinsic": "^1.3.0",
+ "is-string": "^1.1.1",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.findlast": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",
+ "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.findlastindex": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz",
+ "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.9",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "es-shim-unscopables": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flat": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz",
+ "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.5",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flatmap": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz",
+ "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.5",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.tosorted": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz",
+ "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.3",
+ "es-errors": "^1.3.0",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/arraybuffer.prototype.slice": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",
+ "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.1",
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.5",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "is-array-buffer": "^3.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/asap": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
+ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==",
+ "license": "MIT"
+ },
+ "node_modules/assert": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz",
+ "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "is-nan": "^1.3.2",
+ "object-is": "^1.1.5",
+ "object.assign": "^4.1.4",
+ "util": "^0.12.5"
+ }
+ },
+ "node_modules/assert-never": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.4.0.tgz",
+ "integrity": "sha512-5oJg84os6NMQNl27T9LnZkvvqzvAnHu03ShCnoj6bsJwS7L8AO4lf+C/XjK/nvzEqQB744moC6V128RucQd1jA==",
+ "license": "MIT"
+ },
+ "node_modules/async-function": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz",
+ "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/async-limiter": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
+ "license": "MIT"
+ },
+ "node_modules/async-mutex": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.5.0.tgz",
+ "integrity": "sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "license": "MIT"
+ },
+ "node_modules/autoprefixer": {
+ "version": "10.4.22",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.22.tgz",
+ "integrity": "sha512-ARe0v/t9gO28Bznv6GgqARmVqcWOV3mfgUPn9becPHMiD3o9BwlRgaeccZnwTpZ7Zwqrm+c1sUSsMxIzQzc8Xg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/autoprefixer"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "browserslist": "^4.27.0",
+ "caniuse-lite": "^1.0.30001754",
+ "fraction.js": "^5.3.4",
+ "normalize-range": "^0.1.2",
+ "picocolors": "^1.1.1",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "bin": {
+ "autoprefixer": "bin/autoprefixer"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/available-typed-arrays": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
+ "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
+ "license": "MIT",
+ "dependencies": {
+ "possible-typed-array-names": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/axios": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz",
+ "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==",
+ "license": "MIT",
+ "dependencies": {
+ "follow-redirects": "^1.15.6",
+ "form-data": "^4.0.4",
+ "proxy-from-env": "^1.1.0"
+ }
+ },
+ "node_modules/axios-retry": {
+ "version": "3.9.1",
+ "resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-3.9.1.tgz",
+ "integrity": "sha512-8PJDLJv7qTTMMwdnbMvrLYuvB47M81wRtxQmEdV5w4rgbTXTt+vtPkXwajOfOdSyv/wZICJOC+/UhXH4aQ/R+w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@babel/runtime": "^7.15.4",
+ "is-retry-allowed": "^2.2.0"
+ }
+ },
+ "node_modules/babel-jest": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",
+ "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/transform": "^29.7.0",
+ "@types/babel__core": "^7.1.14",
+ "babel-plugin-istanbul": "^6.1.1",
+ "babel-preset-jest": "^29.6.3",
+ "chalk": "^4.0.0",
+ "graceful-fs": "^4.2.9",
+ "slash": "^3.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.8.0"
+ }
+ },
+ "node_modules/babel-plugin-istanbul": {
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz",
+ "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@istanbuljs/load-nyc-config": "^1.0.0",
+ "@istanbuljs/schema": "^0.1.2",
+ "istanbul-lib-instrument": "^5.0.4",
+ "test-exclude": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/babel-plugin-jest-hoist": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz",
+ "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.3.3",
+ "@babel/types": "^7.3.3",
+ "@types/babel__core": "^7.1.14",
+ "@types/babel__traverse": "^7.0.6"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-corejs2": {
+ "version": "0.4.14",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.14.tgz",
+ "integrity": "sha512-Co2Y9wX854ts6U8gAAPXfn0GmAyctHuK8n0Yhfjd6t30g7yvKjspvvOo9yG+z52PZRgFErt7Ka2pYnXCjLKEpg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.27.7",
+ "@babel/helper-define-polyfill-provider": "^0.6.5",
+ "semver": "^6.3.1"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-corejs3": {
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.13.0.tgz",
+ "integrity": "sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-define-polyfill-provider": "^0.6.5",
+ "core-js-compat": "^3.43.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-regenerator": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.5.tgz",
+ "integrity": "sha512-ISqQ2frbiNU9vIJkzg7dlPpznPZ4jOiUQ1uSmB0fEHeowtN3COYRsXr/xexn64NpU13P06jc/L5TgiJXOgrbEg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-define-polyfill-provider": "^0.6.5"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/babel-plugin-react-native-web": {
+ "version": "0.19.13",
+ "resolved": "https://registry.npmjs.org/babel-plugin-react-native-web/-/babel-plugin-react-native-web-0.19.13.tgz",
+ "integrity": "sha512-4hHoto6xaN23LCyZgL9LJZc3olmAxd7b6jDzlZnKXAh4rRAbZRKNBJoOOdp46OBqgy+K0t0guTj5/mhA8inymQ==",
+ "license": "MIT"
+ },
+ "node_modules/babel-plugin-syntax-hermes-parser": {
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.25.1.tgz",
+ "integrity": "sha512-IVNpGzboFLfXZUAwkLFcI/bnqVbwky0jP3eBno4HKtqvQJAHBLdgxiG6lQ4to0+Q/YCN3PO0od5NZwIKyY4REQ==",
+ "license": "MIT",
+ "dependencies": {
+ "hermes-parser": "0.25.1"
+ }
+ },
+ "node_modules/babel-plugin-transform-flow-enums": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-enums/-/babel-plugin-transform-flow-enums-0.0.2.tgz",
+ "integrity": "sha512-g4aaCrDDOsWjbm0PUUeVnkcVd6AKJsVc/MbnPhEotEpkeJQP6b8nzewohQi7+QS8UyPehOhGWn0nOwjvWpmMvQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/plugin-syntax-flow": "^7.12.1"
+ }
+ },
+ "node_modules/babel-preset-current-node-syntax": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz",
+ "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/plugin-syntax-async-generators": "^7.8.4",
+ "@babel/plugin-syntax-bigint": "^7.8.3",
+ "@babel/plugin-syntax-class-properties": "^7.12.13",
+ "@babel/plugin-syntax-class-static-block": "^7.14.5",
+ "@babel/plugin-syntax-import-attributes": "^7.24.7",
+ "@babel/plugin-syntax-import-meta": "^7.10.4",
+ "@babel/plugin-syntax-json-strings": "^7.8.3",
+ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.3",
+ "@babel/plugin-syntax-private-property-in-object": "^7.14.5",
+ "@babel/plugin-syntax-top-level-await": "^7.14.5"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0 || ^8.0.0-0"
+ }
+ },
+ "node_modules/babel-preset-expo": {
+ "version": "13.2.4",
+ "resolved": "https://registry.npmjs.org/babel-preset-expo/-/babel-preset-expo-13.2.4.tgz",
+ "integrity": "sha512-3IKORo3KR+4qtLdCkZNDj8KeA43oBn7RRQejFGWfiZgu/NeaRUSri8YwYjZqybm7hn3nmMv9OLahlvXBX23o5Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.25.9",
+ "@babel/plugin-proposal-decorators": "^7.12.9",
+ "@babel/plugin-proposal-export-default-from": "^7.24.7",
+ "@babel/plugin-syntax-export-default-from": "^7.24.7",
+ "@babel/plugin-transform-export-namespace-from": "^7.25.9",
+ "@babel/plugin-transform-flow-strip-types": "^7.25.2",
+ "@babel/plugin-transform-modules-commonjs": "^7.24.8",
+ "@babel/plugin-transform-object-rest-spread": "^7.24.7",
+ "@babel/plugin-transform-parameters": "^7.24.7",
+ "@babel/plugin-transform-private-methods": "^7.24.7",
+ "@babel/plugin-transform-private-property-in-object": "^7.24.7",
+ "@babel/plugin-transform-runtime": "^7.24.7",
+ "@babel/preset-react": "^7.22.15",
+ "@babel/preset-typescript": "^7.23.0",
+ "@react-native/babel-preset": "0.79.6",
+ "babel-plugin-react-native-web": "~0.19.13",
+ "babel-plugin-syntax-hermes-parser": "^0.25.1",
+ "babel-plugin-transform-flow-enums": "^0.0.2",
+ "debug": "^4.3.4",
+ "react-refresh": "^0.14.2",
+ "resolve-from": "^5.0.0"
+ },
+ "peerDependencies": {
+ "babel-plugin-react-compiler": "^19.0.0-beta-e993439-20250405"
+ },
+ "peerDependenciesMeta": {
+ "babel-plugin-react-compiler": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/babel-preset-expo/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/babel-preset-expo/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/babel-preset-jest": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz",
+ "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==",
+ "license": "MIT",
+ "dependencies": {
+ "babel-plugin-jest-hoist": "^29.6.3",
+ "babel-preset-current-node-syntax": "^1.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/babel-walk": {
+ "version": "3.0.0-canary-5",
+ "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz",
+ "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.9.6"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/backend": {
+ "resolved": "apps/backend",
+ "link": true
+ },
+ "node_modules/badgin": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/badgin/-/badgin-1.2.3.tgz",
+ "integrity": "sha512-NQGA7LcfCpSzIbGRbkgjgdWkjy7HI+Th5VLxTJfW5EeaAf3fnS+xWQaQOCYiny+q6QSvxqoSO04vCx+4u++EJw==",
+ "license": "MIT"
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "license": "MIT"
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.9.7",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.7.tgz",
+ "integrity": "sha512-k9xFKplee6KIio3IDbwj+uaCLpqzOwakOgmqzPezM0sFJlFKcg30vk2wOiAJtkTSfx0SSQDSe8q+mWA/fSH5Zg==",
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.js"
+ }
+ },
+ "node_modules/bcryptjs": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.3.tgz",
+ "integrity": "sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==",
+ "license": "BSD-3-Clause",
+ "bin": {
+ "bcrypt": "bin/bcrypt"
+ }
+ },
+ "node_modules/better-opn": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/better-opn/-/better-opn-3.0.2.tgz",
+ "integrity": "sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==",
+ "license": "MIT",
+ "dependencies": {
+ "open": "^8.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/better-opn/node_modules/open": {
+ "version": "8.4.2",
+ "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz",
+ "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==",
+ "license": "MIT",
+ "dependencies": {
+ "define-lazy-prop": "^2.0.0",
+ "is-docker": "^2.1.1",
+ "is-wsl": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/big-integer": {
+ "version": "1.6.52",
+ "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz",
+ "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==",
+ "license": "Unlicense",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/bignumber.js": {
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz",
+ "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==",
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.4",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz",
+ "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "content-type": "~1.0.5",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "~1.2.0",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.4.24",
+ "on-finished": "~2.4.1",
+ "qs": "~6.14.0",
+ "raw-body": "~2.5.3",
+ "type-is": "~1.6.18",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
+ "license": "ISC"
+ },
+ "node_modules/bowser": {
+ "version": "2.13.1",
+ "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.13.1.tgz",
+ "integrity": "sha512-OHawaAbjwx6rqICCKgSG0SAnT05bzd7ppyKLVUITZpANBaaMFBAsaNkto3LoQ31tyFP5kNujE8Cdx85G9VzOkw==",
+ "license": "MIT"
+ },
+ "node_modules/bplist-creator": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz",
+ "integrity": "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==",
+ "license": "MIT",
+ "dependencies": {
+ "stream-buffers": "2.2.x"
+ }
+ },
+ "node_modules/bplist-parser": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.2.tgz",
+ "integrity": "sha512-apC2+fspHGI3mMKj+dGevkGo/tCqVB8jMb6i+OX+E29p0Iposz07fABkRIfVUPNd5A5VbuOz1bZbnmkKLYF+wQ==",
+ "license": "MIT",
+ "dependencies": {
+ "big-integer": "1.6.x"
+ },
+ "engines": {
+ "node": ">= 5.10.0"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "license": "MIT",
+ "dependencies": {
+ "fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.28.1",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",
+ "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "baseline-browser-mapping": "^2.9.0",
+ "caniuse-lite": "^1.0.30001759",
+ "electron-to-chromium": "^1.5.263",
+ "node-releases": "^2.0.27",
+ "update-browserslist-db": "^1.2.0"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/bser": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
+ "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "node-int64": "^0.4.0"
+ }
+ },
+ "node_modules/buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
+ "node_modules/buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "license": "MIT"
+ },
+ "node_modules/bullmq": {
+ "version": "5.66.0",
+ "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-5.66.0.tgz",
+ "integrity": "sha512-LSe8yEiVTllOOq97Q0C/EhczKS5Yd0AUJleGJCIh0cyJE5nWUqEpGC/uZQuuAYniBSoMT8LqwrxE7N5MZVrLoQ==",
+ "license": "MIT",
+ "dependencies": {
+ "cron-parser": "^4.9.0",
+ "ioredis": "^5.8.2",
+ "msgpackr": "^1.11.2",
+ "node-abort-controller": "^3.1.1",
+ "semver": "^7.5.4",
+ "tslib": "^2.0.0",
+ "uuid": "^11.1.0"
+ }
+ },
+ "node_modules/bullmq/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/busboy": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
+ "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+ "dependencies": {
+ "streamsearch": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=10.16.0"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
+ "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.0",
+ "es-define-property": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
+ "set-function-length": "^1.2.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/caller-callsite": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
+ "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==",
+ "license": "MIT",
+ "dependencies": {
+ "callsites": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/caller-callsite/node_modules/callsites": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
+ "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/caller-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz",
+ "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==",
+ "license": "MIT",
+ "dependencies": {
+ "caller-callsite": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/camelcase": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/camelcase-css": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
+ "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001760",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001760.tgz",
+ "integrity": "sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "CC-BY-4.0"
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/character-parser": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz",
+ "integrity": "sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==",
+ "license": "MIT",
+ "dependencies": {
+ "is-regex": "^1.0.3"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
+ "license": "MIT",
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chokidar/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/chownr": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
+ "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/chrome-launcher": {
+ "version": "0.15.2",
+ "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz",
+ "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/node": "*",
+ "escape-string-regexp": "^4.0.0",
+ "is-wsl": "^2.2.0",
+ "lighthouse-logger": "^1.0.0"
+ },
+ "bin": {
+ "print-chrome-path": "bin/print-chrome-path.js"
+ },
+ "engines": {
+ "node": ">=12.13.0"
+ }
+ },
+ "node_modules/chromium-edge-launcher": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/chromium-edge-launcher/-/chromium-edge-launcher-0.2.0.tgz",
+ "integrity": "sha512-JfJjUnq25y9yg4FABRRVPmBGWPZZi+AQXT4mxupb67766/0UlhG8PAZCz6xzEMXTbW3CsSoE8PcCWA49n35mKg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/node": "*",
+ "escape-string-regexp": "^4.0.0",
+ "is-wsl": "^2.2.0",
+ "lighthouse-logger": "^1.0.0",
+ "mkdirp": "^1.0.4",
+ "rimraf": "^3.0.2"
+ }
+ },
+ "node_modules/chromium-edge-launcher/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/chromium-edge-launcher/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Glob versions prior to v9 are no longer supported",
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/chromium-edge-launcher/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/chromium-edge-launcher/node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "deprecated": "Rimraf versions prior to v4 are no longer supported",
+ "license": "ISC",
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/ci-info": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
+ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/class-transformer": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.4.0.tgz",
+ "integrity": "sha512-ETWD/H2TbWbKEi7m9N4Km5+cw1hNcqJSxlSYhsLsNjQzWWiZIYA1zafxpK9PwVfaZ6AqR5rrjPVUBGESm5tQUA==",
+ "license": "MIT"
+ },
+ "node_modules/class-transformer-validator": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/class-transformer-validator/-/class-transformer-validator-0.9.1.tgz",
+ "integrity": "sha512-83/KFCyd6UiiwH6PlQS5y17O5TTx58CawvNI+XdrMs0Ig9QI5kiuzRqGcC/WrEpd1F7i4KIxCwdn6m4B6fl0jw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "class-transformer": ">=0.2.3",
+ "class-validator": ">=0.12.0"
+ }
+ },
+ "node_modules/class-validator": {
+ "version": "0.14.3",
+ "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.3.tgz",
+ "integrity": "sha512-rXXekcjofVN1LTOSw+u4u9WXVEUvNBVjORW154q/IdmYWy1nMbOU9aNtZB0t8m+FJQ9q91jlr2f9CwwUFdFMRA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/validator": "^13.15.3",
+ "libphonenumber-js": "^1.11.1",
+ "validator": "^13.15.20"
+ }
+ },
+ "node_modules/class-variance-authority": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz",
+ "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "clsx": "^2.1.1"
+ },
+ "funding": {
+ "url": "https://polar.sh/cva"
+ }
+ },
+ "node_modules/cli-cursor": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
+ "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==",
+ "license": "MIT",
+ "dependencies": {
+ "restore-cursor": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/cli-spinners": {
+ "version": "2.9.2",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",
+ "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/client-only": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
+ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",
+ "license": "MIT"
+ },
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/cliui/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/cliui/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/cluster-key-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz",
+ "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/color": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
+ "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1",
+ "color-string": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=12.5.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "license": "MIT"
+ },
+ "node_modules/color-string": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
+ "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "^1.0.0",
+ "simple-swizzle": "^0.2.2"
+ }
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "license": "MIT",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/common-ui": {
+ "resolved": "packages/ui",
+ "link": true
+ },
+ "node_modules/compressible": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
+ "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": ">= 1.43.0 < 2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/compression": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz",
+ "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "compressible": "~2.0.18",
+ "debug": "2.6.9",
+ "negotiator": "~0.6.4",
+ "on-headers": "~1.1.0",
+ "safe-buffer": "5.2.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/compression/node_modules/negotiator": {
+ "version": "0.6.4",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
+ "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "license": "MIT"
+ },
+ "node_modules/concat-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
+ "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
+ "engines": [
+ "node >= 6.0"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.0.2",
+ "typedarray": "^0.0.6"
+ }
+ },
+ "node_modules/concaveman": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/concaveman/-/concaveman-1.2.1.tgz",
+ "integrity": "sha512-PwZYKaM/ckQSa8peP5JpVr7IMJ4Nn/MHIaWUjP4be+KoZ7Botgs8seAZGpmaOM+UZXawcdYRao/px9ycrCihHw==",
+ "license": "ISC",
+ "dependencies": {
+ "point-in-polygon": "^1.1.0",
+ "rbush": "^3.0.1",
+ "robust-predicates": "^2.0.4",
+ "tinyqueue": "^2.0.3"
+ }
+ },
+ "node_modules/connect": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz",
+ "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "finalhandler": "1.1.2",
+ "parseurl": "~1.3.3",
+ "utils-merge": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/connect/node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/connect/node_modules/finalhandler": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
+ "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.3",
+ "statuses": "~1.5.0",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/connect/node_modules/on-finished": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/connect/node_modules/statuses": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+ "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/constantinople": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz",
+ "integrity": "sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.6.0",
+ "@babel/types": "^7.6.1"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "license": "MIT"
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-es": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-2.0.0.tgz",
+ "integrity": "sha512-RAj4E421UYRgqokKUmotqAwuplYw15qtdXfY+hGzgCJ/MBjCVZcSoHK/kH9kocfjRjcDME7IiDWR/1WX1TM2Pg==",
+ "license": "MIT"
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
+ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
+ "license": "MIT"
+ },
+ "node_modules/copy-anything": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.0.5.tgz",
+ "integrity": "sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA==",
+ "license": "MIT",
+ "dependencies": {
+ "is-what": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/mesqueeb"
+ }
+ },
+ "node_modules/core-js-compat": {
+ "version": "3.47.0",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.47.0.tgz",
+ "integrity": "sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==",
+ "license": "MIT",
+ "dependencies": {
+ "browserslist": "^4.28.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
+ "node_modules/cors": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/cosmiconfig": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
+ "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
+ "license": "MIT",
+ "dependencies": {
+ "import-fresh": "^2.0.0",
+ "is-directory": "^0.3.1",
+ "js-yaml": "^3.13.1",
+ "parse-json": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/cosmiconfig/node_modules/argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "license": "MIT",
+ "dependencies": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "node_modules/cosmiconfig/node_modules/import-fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
+ "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==",
+ "license": "MIT",
+ "dependencies": {
+ "caller-path": "^2.0.0",
+ "resolve-from": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/cosmiconfig/node_modules/js-yaml": {
+ "version": "3.14.2",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz",
+ "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==",
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/cosmiconfig/node_modules/resolve-from": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+ "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/cron-parser": {
+ "version": "4.9.0",
+ "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz",
+ "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==",
+ "license": "MIT",
+ "dependencies": {
+ "luxon": "^3.2.1"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/cross-fetch": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz",
+ "integrity": "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==",
+ "license": "MIT",
+ "dependencies": {
+ "node-fetch": "^2.7.0"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/crypto-random-string": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
+ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/css-in-js-utils": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-3.1.0.tgz",
+ "integrity": "sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A==",
+ "license": "MIT",
+ "dependencies": {
+ "hyphenate-style-name": "^1.0.3"
+ }
+ },
+ "node_modules/css-select": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz",
+ "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "boolbase": "^1.0.0",
+ "css-what": "^6.1.0",
+ "domhandler": "^5.0.2",
+ "domutils": "^3.0.1",
+ "nth-check": "^2.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
+ "node_modules/css-tree": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
+ "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
+ "license": "MIT",
+ "dependencies": {
+ "mdn-data": "2.0.14",
+ "source-map": "^0.6.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/css-tree/node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/css-what": {
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz",
+ "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">= 6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
+ "node_modules/cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "license": "MIT",
+ "bin": {
+ "cssesc": "bin/cssesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/csstype": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
+ "license": "MIT"
+ },
+ "node_modules/d3-array": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz",
+ "integrity": "sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/d3-geo": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.7.1.tgz",
+ "integrity": "sha512-O4AempWAr+P5qbk2bC2FuN/sDW4z+dN2wDf9QV3bxQt4M5HfOEeXLgJ/UKQW0+o1Dj8BE+L5kiDbdWUMjsmQpw==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "d3-array": "1"
+ }
+ },
+ "node_modules/d3-voronoi": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.2.tgz",
+ "integrity": "sha512-RhGS1u2vavcO7ay7ZNAPo4xeDh/VYeGof3x5ZLJBQgYhLegxr3s5IykvWmJ94FTU6mcbtp4sloqZ54mP6R4Utw==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/data-view-buffer": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
+ "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/data-view-byte-length": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz",
+ "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/inspect-js"
+ }
+ },
+ "node_modules/data-view-byte-offset": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz",
+ "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/dayjs": {
+ "version": "1.11.19",
+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
+ "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
+ "license": "MIT"
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/decode-uri-component": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/deep-extend": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/deepmerge": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/defaults": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
+ "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
+ "license": "MIT",
+ "dependencies": {
+ "clone": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/define-data-property": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
+ "license": "MIT",
+ "dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/define-lazy-prop": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
+ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.0.1",
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/denque": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
+ "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/detect-libc": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+ "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
+ "license": "Apache-2.0",
+ "bin": {
+ "detect-libc": "bin/detect-libc.js"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/didyoumean": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
+ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/dlv": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
+ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
+ "license": "MIT"
+ },
+ "node_modules/doctrine": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/doctypes": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz",
+ "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==",
+ "license": "MIT"
+ },
+ "node_modules/dom-serializer": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
+ "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
+ "license": "MIT",
+ "dependencies": {
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.2",
+ "entities": "^4.2.0"
+ },
+ "funding": {
+ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
+ }
+ },
+ "node_modules/domelementtype": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+ "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fb55"
+ }
+ ],
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/domhandler": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
+ "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "domelementtype": "^2.3.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
+ "node_modules/domutils": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",
+ "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "dom-serializer": "^2.0.0",
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domutils?sponsor=1"
+ }
+ },
+ "node_modules/dotenv": {
+ "version": "17.2.3",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
+ "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dotenv-expand": {
+ "version": "11.0.7",
+ "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz",
+ "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "dotenv": "^16.4.5"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dotenv-expand/node_modules/dotenv": {
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/drizzle-kit": {
+ "version": "0.31.8",
+ "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.31.8.tgz",
+ "integrity": "sha512-O9EC/miwdnRDY10qRxM8P3Pg8hXe3LyU4ZipReKOgTwn4OqANmftj8XJz1UPUAS6NMHf0E2htjsbQujUTkncCg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@drizzle-team/brocli": "^0.10.2",
+ "@esbuild-kit/esm-loader": "^2.5.5",
+ "esbuild": "^0.25.4",
+ "esbuild-register": "^3.5.0"
+ },
+ "bin": {
+ "drizzle-kit": "bin.cjs"
+ }
+ },
+ "node_modules/drizzle-orm": {
+ "version": "0.44.7",
+ "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.44.7.tgz",
+ "integrity": "sha512-quIpnYznjU9lHshEOAYLoZ9s3jweleHlZIAWR/jX9gAWNg/JhQ1wj0KGRf7/Zm+obRrYd9GjPVJg790QY9N5AQ==",
+ "license": "Apache-2.0",
+ "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"
+ },
+ "peerDependenciesMeta": {
+ "@aws-sdk/client-rds-data": {
+ "optional": true
+ },
+ "@cloudflare/workers-types": {
+ "optional": true
+ },
+ "@electric-sql/pglite": {
+ "optional": true
+ },
+ "@libsql/client": {
+ "optional": true
+ },
+ "@libsql/client-wasm": {
+ "optional": true
+ },
+ "@neondatabase/serverless": {
+ "optional": true
+ },
+ "@op-engineering/op-sqlite": {
+ "optional": true
+ },
+ "@opentelemetry/api": {
+ "optional": true
+ },
+ "@planetscale/database": {
+ "optional": true
+ },
+ "@prisma/client": {
+ "optional": true
+ },
+ "@tidbcloud/serverless": {
+ "optional": true
+ },
+ "@types/better-sqlite3": {
+ "optional": true
+ },
+ "@types/pg": {
+ "optional": true
+ },
+ "@types/sql.js": {
+ "optional": true
+ },
+ "@upstash/redis": {
+ "optional": true
+ },
+ "@vercel/postgres": {
+ "optional": true
+ },
+ "@xata.io/client": {
+ "optional": true
+ },
+ "better-sqlite3": {
+ "optional": true
+ },
+ "bun-types": {
+ "optional": true
+ },
+ "expo-sqlite": {
+ "optional": true
+ },
+ "gel": {
+ "optional": true
+ },
+ "knex": {
+ "optional": true
+ },
+ "kysely": {
+ "optional": true
+ },
+ "mysql2": {
+ "optional": true
+ },
+ "pg": {
+ "optional": true
+ },
+ "postgres": {
+ "optional": true
+ },
+ "prisma": {
+ "optional": true
+ },
+ "sql.js": {
+ "optional": true
+ },
+ "sqlite3": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/dynamic-dedupe": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz",
+ "integrity": "sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "xtend": "^4.0.0"
+ }
+ },
+ "node_modules/earcut": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz",
+ "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==",
+ "license": "ISC"
+ },
+ "node_modules/eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
+ "license": "MIT"
+ },
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.267",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz",
+ "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==",
+ "license": "ISC"
+ },
+ "node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "license": "MIT"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/entities": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
+ "node_modules/env-editor": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/env-editor/-/env-editor-0.4.2.tgz",
+ "integrity": "sha512-ObFo8v4rQJAE59M69QzwloxPZtd33TpYEIjtKD1rrFDcM1Gd7IkDxEBU+HriziN6HSHQnBJi8Dmy+JWkav5HKA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/err-code": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
+ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",
+ "license": "MIT"
+ },
+ "node_modules/error-ex": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz",
+ "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "node_modules/error-stack-parser": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz",
+ "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==",
+ "license": "MIT",
+ "dependencies": {
+ "stackframe": "^1.3.4"
+ }
+ },
+ "node_modules/es-abstract": {
+ "version": "1.24.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz",
+ "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.2",
+ "arraybuffer.prototype.slice": "^1.0.4",
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "data-view-buffer": "^1.0.2",
+ "data-view-byte-length": "^1.0.2",
+ "data-view-byte-offset": "^1.0.1",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "es-set-tostringtag": "^2.1.0",
+ "es-to-primitive": "^1.3.0",
+ "function.prototype.name": "^1.1.8",
+ "get-intrinsic": "^1.3.0",
+ "get-proto": "^1.0.1",
+ "get-symbol-description": "^1.1.0",
+ "globalthis": "^1.0.4",
+ "gopd": "^1.2.0",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "internal-slot": "^1.1.0",
+ "is-array-buffer": "^3.0.5",
+ "is-callable": "^1.2.7",
+ "is-data-view": "^1.0.2",
+ "is-negative-zero": "^2.0.3",
+ "is-regex": "^1.2.1",
+ "is-set": "^2.0.3",
+ "is-shared-array-buffer": "^1.0.4",
+ "is-string": "^1.1.1",
+ "is-typed-array": "^1.1.15",
+ "is-weakref": "^1.1.1",
+ "math-intrinsics": "^1.1.0",
+ "object-inspect": "^1.13.4",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.7",
+ "own-keys": "^1.0.1",
+ "regexp.prototype.flags": "^1.5.4",
+ "safe-array-concat": "^1.1.3",
+ "safe-push-apply": "^1.0.0",
+ "safe-regex-test": "^1.1.0",
+ "set-proto": "^1.0.0",
+ "stop-iteration-iterator": "^1.1.0",
+ "string.prototype.trim": "^1.2.10",
+ "string.prototype.trimend": "^1.0.9",
+ "string.prototype.trimstart": "^1.0.8",
+ "typed-array-buffer": "^1.0.3",
+ "typed-array-byte-length": "^1.0.3",
+ "typed-array-byte-offset": "^1.0.4",
+ "typed-array-length": "^1.0.7",
+ "unbox-primitive": "^1.1.0",
+ "which-typed-array": "^1.1.19"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-iterator-helpers": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz",
+ "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.6",
+ "es-errors": "^1.3.0",
+ "es-set-tostringtag": "^2.0.3",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.6",
+ "globalthis": "^1.0.4",
+ "gopd": "^1.2.0",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "internal-slot": "^1.1.0",
+ "iterator.prototype": "^1.1.4",
+ "safe-array-concat": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-shim-unscopables": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz",
+ "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-to-primitive": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz",
+ "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-callable": "^1.2.7",
+ "is-date-object": "^1.0.5",
+ "is-symbol": "^1.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/esbuild": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
+ "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.25.12",
+ "@esbuild/android-arm": "0.25.12",
+ "@esbuild/android-arm64": "0.25.12",
+ "@esbuild/android-x64": "0.25.12",
+ "@esbuild/darwin-arm64": "0.25.12",
+ "@esbuild/darwin-x64": "0.25.12",
+ "@esbuild/freebsd-arm64": "0.25.12",
+ "@esbuild/freebsd-x64": "0.25.12",
+ "@esbuild/linux-arm": "0.25.12",
+ "@esbuild/linux-arm64": "0.25.12",
+ "@esbuild/linux-ia32": "0.25.12",
+ "@esbuild/linux-loong64": "0.25.12",
+ "@esbuild/linux-mips64el": "0.25.12",
+ "@esbuild/linux-ppc64": "0.25.12",
+ "@esbuild/linux-riscv64": "0.25.12",
+ "@esbuild/linux-s390x": "0.25.12",
+ "@esbuild/linux-x64": "0.25.12",
+ "@esbuild/netbsd-arm64": "0.25.12",
+ "@esbuild/netbsd-x64": "0.25.12",
+ "@esbuild/openbsd-arm64": "0.25.12",
+ "@esbuild/openbsd-x64": "0.25.12",
+ "@esbuild/openharmony-arm64": "0.25.12",
+ "@esbuild/sunos-x64": "0.25.12",
+ "@esbuild/win32-arm64": "0.25.12",
+ "@esbuild/win32-ia32": "0.25.12",
+ "@esbuild/win32-x64": "0.25.12"
+ }
+ },
+ "node_modules/esbuild-register": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.6.0.tgz",
+ "integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.4"
+ },
+ "peerDependencies": {
+ "esbuild": ">=0.12 <1"
+ }
+ },
+ "node_modules/esbuild-register/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/esbuild-register/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint": {
+ "version": "9.39.1",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz",
+ "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.8.0",
+ "@eslint-community/regexpp": "^4.12.1",
+ "@eslint/config-array": "^0.21.1",
+ "@eslint/config-helpers": "^0.4.2",
+ "@eslint/core": "^0.17.0",
+ "@eslint/eslintrc": "^3.3.1",
+ "@eslint/js": "9.39.1",
+ "@eslint/plugin-kit": "^0.4.1",
+ "@humanfs/node": "^0.16.6",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@humanwhocodes/retry": "^0.4.2",
+ "@types/estree": "^1.0.6",
+ "ajv": "^6.12.4",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.6",
+ "debug": "^4.3.2",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^8.4.0",
+ "eslint-visitor-keys": "^4.2.1",
+ "espree": "^10.4.0",
+ "esquery": "^1.5.0",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^8.0.0",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.2",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3"
+ },
+ "bin": {
+ "eslint": "bin/eslint.js"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "jiti": "*"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-config-expo": {
+ "version": "9.2.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-expo/-/eslint-config-expo-9.2.0.tgz",
+ "integrity": "sha512-TQgmSx+2mRM7qUS0hB5kTDrHcSC35rA1UzOSgK5YRLmSkSMlKLmXkUrhwOpnyo9D/nHdf4ERRAySRYxgA6dlrw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/eslint-plugin": "^8.18.2",
+ "@typescript-eslint/parser": "^8.18.2",
+ "eslint-import-resolver-typescript": "^3.6.3",
+ "eslint-plugin-expo": "^0.1.4",
+ "eslint-plugin-import": "^2.30.0",
+ "eslint-plugin-react": "^7.37.3",
+ "eslint-plugin-react-hooks": "^5.1.0",
+ "globals": "^16.0.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=8.10"
+ }
+ },
+ "node_modules/eslint-config-expo/node_modules/globals": {
+ "version": "16.5.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz",
+ "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint-import-resolver-node": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
+ "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^3.2.7",
+ "is-core-module": "^2.13.0",
+ "resolve": "^1.22.4"
+ }
+ },
+ "node_modules/eslint-import-resolver-node/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-import-resolver-node/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/eslint-import-resolver-typescript": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz",
+ "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "@nolyfill/is-core-module": "1.0.39",
+ "debug": "^4.4.0",
+ "get-tsconfig": "^4.10.0",
+ "is-bun-module": "^2.0.0",
+ "stable-hash": "^0.0.5",
+ "tinyglobby": "^0.2.13",
+ "unrs-resolver": "^1.6.2"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint-import-resolver-typescript"
+ },
+ "peerDependencies": {
+ "eslint": "*",
+ "eslint-plugin-import": "*",
+ "eslint-plugin-import-x": "*"
+ },
+ "peerDependenciesMeta": {
+ "eslint-plugin-import": {
+ "optional": true
+ },
+ "eslint-plugin-import-x": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-import-resolver-typescript/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-import-resolver-typescript/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/eslint-module-utils": {
+ "version": "2.12.1",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz",
+ "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^3.2.7"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-module-utils/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-module-utils/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/eslint-plugin-expo": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-expo/-/eslint-plugin-expo-0.1.4.tgz",
+ "integrity": "sha512-YA7yiMacQbLJySuyJA0Eb5V65obqp6fVOWtw1JdYDRWC5MeToPrnNvhGDpk01Bv3Vm4ownuzUfvi89MXi1d6cg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "^8.29.1",
+ "@typescript-eslint/utils": "^8.29.1",
+ "eslint": "^9.24.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=8.10"
+ }
+ },
+ "node_modules/eslint-plugin-import": {
+ "version": "2.32.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz",
+ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rtsao/scc": "^1.1.0",
+ "array-includes": "^3.1.9",
+ "array.prototype.findlastindex": "^1.2.6",
+ "array.prototype.flat": "^1.3.3",
+ "array.prototype.flatmap": "^1.3.3",
+ "debug": "^3.2.7",
+ "doctrine": "^2.1.0",
+ "eslint-import-resolver-node": "^0.3.9",
+ "eslint-module-utils": "^2.12.1",
+ "hasown": "^2.0.2",
+ "is-core-module": "^2.16.1",
+ "is-glob": "^4.0.3",
+ "minimatch": "^3.1.2",
+ "object.fromentries": "^2.0.8",
+ "object.groupby": "^1.0.3",
+ "object.values": "^1.2.1",
+ "semver": "^6.3.1",
+ "string.prototype.trimend": "^1.0.9",
+ "tsconfig-paths": "^3.15.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependencies": {
+ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/eslint-plugin-react": {
+ "version": "7.37.5",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz",
+ "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-includes": "^3.1.8",
+ "array.prototype.findlast": "^1.2.5",
+ "array.prototype.flatmap": "^1.3.3",
+ "array.prototype.tosorted": "^1.1.4",
+ "doctrine": "^2.1.0",
+ "es-iterator-helpers": "^1.2.1",
+ "estraverse": "^5.3.0",
+ "hasown": "^2.0.2",
+ "jsx-ast-utils": "^2.4.1 || ^3.0.0",
+ "minimatch": "^3.1.2",
+ "object.entries": "^1.1.9",
+ "object.fromentries": "^2.0.8",
+ "object.values": "^1.2.1",
+ "prop-types": "^15.8.1",
+ "resolve": "^2.0.0-next.5",
+ "semver": "^6.3.1",
+ "string.prototype.matchall": "^4.0.12",
+ "string.prototype.repeat": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependencies": {
+ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"
+ }
+ },
+ "node_modules/eslint-plugin-react-hooks": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz",
+ "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-react-refresh": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.24.tgz",
+ "integrity": "sha512-nLHIW7TEq3aLrEYWpVaJ1dRgFR+wLDPN8e8FpYAql/bMV2oBEfC37K0gLEGgv9fy66juNShSMV8OkTqzltcG/w==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "eslint": ">=8.40"
+ }
+ },
+ "node_modules/eslint-plugin-react/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/eslint-plugin-react/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/eslint-plugin-react/node_modules/resolve": {
+ "version": "2.0.0-next.5",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",
+ "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz",
+ "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/eslint/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint/node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint/node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/eslint/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/eslint/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/espree": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
+ "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^4.2.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/espree/node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "license": "BSD-2-Clause",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/esquery": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
+ "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "estraverse": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/event-target-shim": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/exec-async": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/exec-async/-/exec-async-2.2.0.tgz",
+ "integrity": "sha512-87OpwcEiMia/DeiKFzaQNBNFeN3XkkpYIh9FyOqq5mS2oKv3CBE67PXoEKcr6nodWdXNogTiQ0jE2NGuoffXPw==",
+ "license": "MIT"
+ },
+ "node_modules/expo": {
+ "version": "53.0.25",
+ "resolved": "https://registry.npmjs.org/expo/-/expo-53.0.25.tgz",
+ "integrity": "sha512-KMaIMAd0vKl2ooiDB9XMKTuRAhSmrLdPOEON8Ck9mPmSrJB1FHBs6gb63d5IJTQAE1jBZLZj0JBg6rqRBOrTjg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.20.0",
+ "@expo/cli": "0.24.23",
+ "@expo/config": "~11.0.13",
+ "@expo/config-plugins": "~10.1.2",
+ "@expo/fingerprint": "0.13.4",
+ "@expo/metro-config": "0.20.18",
+ "@expo/vector-icons": "^14.0.0",
+ "babel-preset-expo": "~13.2.4",
+ "expo-asset": "~11.1.7",
+ "expo-constants": "~17.1.8",
+ "expo-file-system": "~18.1.11",
+ "expo-font": "~13.3.2",
+ "expo-keep-awake": "~14.1.4",
+ "expo-modules-autolinking": "2.1.14",
+ "expo-modules-core": "2.5.0",
+ "react-native-edge-to-edge": "1.6.0",
+ "whatwg-url-without-unicode": "8.0.0-3"
+ },
+ "bin": {
+ "expo": "bin/cli",
+ "expo-modules-autolinking": "bin/autolinking",
+ "fingerprint": "bin/fingerprint"
+ },
+ "peerDependencies": {
+ "@expo/dom-webview": "*",
+ "@expo/metro-runtime": "*",
+ "react": "*",
+ "react-native": "*",
+ "react-native-webview": "*"
+ },
+ "peerDependenciesMeta": {
+ "@expo/dom-webview": {
+ "optional": true
+ },
+ "@expo/metro-runtime": {
+ "optional": true
+ },
+ "react-native-webview": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/expo-application": {
+ "version": "6.1.5",
+ "resolved": "https://registry.npmjs.org/expo-application/-/expo-application-6.1.5.tgz",
+ "integrity": "sha512-ToImFmzw8luY043pWFJhh2ZMm4IwxXoHXxNoGdlhD4Ym6+CCmkAvCglg0FK8dMLzAb+/XabmOE7Rbm8KZb6NZg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-asset": {
+ "version": "11.1.7",
+ "resolved": "https://registry.npmjs.org/expo-asset/-/expo-asset-11.1.7.tgz",
+ "integrity": "sha512-b5P8GpjUh08fRCf6m5XPVAh7ra42cQrHBIMgH2UXP+xsj4Wufl6pLy6jRF5w6U7DranUMbsXm8TOyq4EHy7ADg==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/image-utils": "^0.7.6",
+ "expo-constants": "~17.1.7"
+ },
+ "peerDependencies": {
+ "expo": "*",
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-auth-session": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/expo-auth-session/-/expo-auth-session-6.2.1.tgz",
+ "integrity": "sha512-9KgqrGpW7PoNOhxJ7toofi/Dz5BU2TE4Q+ktJZsmDXLoFcNOcvBokh2+mkhG58Qvd/xJ9Z5sAt/5QoOFaPb9wA==",
+ "license": "MIT",
+ "dependencies": {
+ "expo-application": "~6.1.5",
+ "expo-constants": "~17.1.7",
+ "expo-crypto": "~14.1.5",
+ "expo-linking": "~7.1.7",
+ "expo-web-browser": "~14.2.0",
+ "invariant": "^2.2.4"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-blur": {
+ "version": "14.1.5",
+ "resolved": "https://registry.npmjs.org/expo-blur/-/expo-blur-14.1.5.tgz",
+ "integrity": "sha512-CCLJHxN4eoAl06ESKT3CbMasJ98WsjF9ZQEJnuxtDb9ffrYbZ+g9ru84fukjNUOTtc8A8yXE5z8NgY1l0OMrmQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*",
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-constants": {
+ "version": "17.1.8",
+ "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-17.1.8.tgz",
+ "integrity": "sha512-sOCeMN/BWLA7hBP6lMwoEQzFNgTopk6YY03sBAmwT216IHyL54TjNseg8CRU1IQQ/+qinJ2fYWCl7blx2TiNcA==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/config": "~11.0.13",
+ "@expo/env": "~1.0.7"
+ },
+ "peerDependencies": {
+ "expo": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-crypto": {
+ "version": "14.1.5",
+ "resolved": "https://registry.npmjs.org/expo-crypto/-/expo-crypto-14.1.5.tgz",
+ "integrity": "sha512-ZXJoUMoUeiMNEoSD4itItFFz3cKrit6YJ/BR0hjuwNC+NczbV9rorvhvmeJmrU9O2cFQHhJQQR1fjQnt45Vu4Q==",
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.0"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-dev-client": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/expo-dev-client/-/expo-dev-client-5.2.4.tgz",
+ "integrity": "sha512-s/N/nK5LPo0QZJpV4aPijxyrzV4O49S3dN8D2fljqrX2WwFZzWwFO6dX1elPbTmddxumdcpczsdUPY+Ms8g43g==",
+ "license": "MIT",
+ "dependencies": {
+ "expo-dev-launcher": "5.1.16",
+ "expo-dev-menu": "6.1.14",
+ "expo-dev-menu-interface": "1.10.0",
+ "expo-manifests": "~0.16.6",
+ "expo-updates-interface": "~1.1.0"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-dev-launcher": {
+ "version": "5.1.16",
+ "resolved": "https://registry.npmjs.org/expo-dev-launcher/-/expo-dev-launcher-5.1.16.tgz",
+ "integrity": "sha512-tbCske9pvbozaEblyxoyo/97D6od9Ma4yAuyUnXtRET1CKAPKYS+c4fiZ+I3B4qtpZwN3JNFUjG3oateN0y6Hg==",
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "8.11.0",
+ "expo-dev-menu": "6.1.14",
+ "expo-manifests": "~0.16.6",
+ "resolve-from": "^5.0.0"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-dev-launcher/node_modules/ajv": {
+ "version": "8.11.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
+ "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/expo-dev-launcher/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "license": "MIT"
+ },
+ "node_modules/expo-dev-menu": {
+ "version": "6.1.14",
+ "resolved": "https://registry.npmjs.org/expo-dev-menu/-/expo-dev-menu-6.1.14.tgz",
+ "integrity": "sha512-yonNMg2GHJZtuisVowdl1iQjZfYP85r1D1IO+ar9D9zlrBPBJhq2XEju52jd1rDmDkmDuEhBSbPNhzIcsBNiPg==",
+ "license": "MIT",
+ "dependencies": {
+ "expo-dev-menu-interface": "1.10.0"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-dev-menu-interface": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/expo-dev-menu-interface/-/expo-dev-menu-interface-1.10.0.tgz",
+ "integrity": "sha512-NxtM/qot5Rh2cY333iOE87dDg1S8CibW+Wu4WdLua3UMjy81pXYzAGCZGNOeY7k9GpNFqDPNDXWyBSlk9r2pBg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-device": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/expo-device/-/expo-device-7.1.4.tgz",
+ "integrity": "sha512-HS04IiE1Fy0FRjBLurr9e5A6yj3kbmQB+2jCZvbSGpsjBnCLdSk/LCii4f5VFhPIBWJLyYuN5QqJyEAw6BcS4Q==",
+ "license": "MIT",
+ "dependencies": {
+ "ua-parser-js": "^0.7.33"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-document-picker": {
+ "version": "13.1.6",
+ "resolved": "https://registry.npmjs.org/expo-document-picker/-/expo-document-picker-13.1.6.tgz",
+ "integrity": "sha512-8FTQPDOkyCvFN/i4xyqzH7ELW4AsB6B3XBZQjn1FEdqpozo6rpNJRr7sWFU/93WrLgA9FJEKpKbyr6XxczK6BA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-eas-client": {
+ "version": "0.14.4",
+ "resolved": "https://registry.npmjs.org/expo-eas-client/-/expo-eas-client-0.14.4.tgz",
+ "integrity": "sha512-TSL1BbBFIuXchJmPgbPnB7cGpOOuSGJcQ/L7gij/+zPjExwvKm5ckA5dlSulwoFhH8zQt4vb7bfISPSAWQVWBw==",
+ "license": "MIT"
+ },
+ "node_modules/expo-file-system": {
+ "version": "18.1.11",
+ "resolved": "https://registry.npmjs.org/expo-file-system/-/expo-file-system-18.1.11.tgz",
+ "integrity": "sha512-HJw/m0nVOKeqeRjPjGdvm+zBi5/NxcdPf8M8P3G2JFvH5Z8vBWqVDic2O58jnT1OFEy0XXzoH9UqFu7cHg9DTQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-font": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/expo-font/-/expo-font-13.3.2.tgz",
+ "integrity": "sha512-wUlMdpqURmQ/CNKK/+BIHkDA5nGjMqNlYmW0pJFXY/KE/OG80Qcavdu2sHsL4efAIiNGvYdBS10WztuQYU4X0A==",
+ "license": "MIT",
+ "dependencies": {
+ "fontfaceobserver": "^2.1.0"
+ },
+ "peerDependencies": {
+ "expo": "*",
+ "react": "*"
+ }
+ },
+ "node_modules/expo-haptics": {
+ "version": "14.1.4",
+ "resolved": "https://registry.npmjs.org/expo-haptics/-/expo-haptics-14.1.4.tgz",
+ "integrity": "sha512-QZdE3NMX74rTuIl82I+n12XGwpDWKb8zfs5EpwsnGi/D/n7O2Jd4tO5ivH+muEG/OCJOMq5aeaVDqqaQOhTkcA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-image": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/expo-image/-/expo-image-2.4.1.tgz",
+ "integrity": "sha512-yHp0Cy4ylOYyLR21CcH6i70DeRyLRPc0yAIPFPn4BT/BpkJNaX5QMXDppcHa58t4WI3Bb8QRJRLuAQaeCtDF8A==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*",
+ "react": "*",
+ "react-native": "*",
+ "react-native-web": "*"
+ },
+ "peerDependenciesMeta": {
+ "react-native-web": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/expo-image-loader": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/expo-image-loader/-/expo-image-loader-5.1.0.tgz",
+ "integrity": "sha512-sEBx3zDQIODWbB5JwzE7ZL5FJD+DK3LVLWBVJy6VzsqIA6nDEnSFnsnWyCfCTSvbGigMATs1lgkC2nz3Jpve1Q==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-image-picker": {
+ "version": "16.1.4",
+ "resolved": "https://registry.npmjs.org/expo-image-picker/-/expo-image-picker-16.1.4.tgz",
+ "integrity": "sha512-bTmmxtw1AohUT+HxEBn2vYwdeOrj1CLpMXKjvi9FKSoSbpcarT4xxI0z7YyGwDGHbrJqyyic3I9TTdP2J2b4YA==",
+ "license": "MIT",
+ "dependencies": {
+ "expo-image-loader": "~5.1.0"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-json-utils": {
+ "version": "0.15.0",
+ "resolved": "https://registry.npmjs.org/expo-json-utils/-/expo-json-utils-0.15.0.tgz",
+ "integrity": "sha512-duRT6oGl80IDzH2LD2yEFWNwGIC2WkozsB6HF3cDYNoNNdUvFk6uN3YiwsTsqVM/D0z6LEAQ01/SlYvN+Fw0JQ==",
+ "license": "MIT"
+ },
+ "node_modules/expo-keep-awake": {
+ "version": "14.1.4",
+ "resolved": "https://registry.npmjs.org/expo-keep-awake/-/expo-keep-awake-14.1.4.tgz",
+ "integrity": "sha512-wU9qOnosy4+U4z/o4h8W9PjPvcFMfZXrlUoKTMBW7F4pLqhkkP/5G4EviPZixv4XWFMjn1ExQ5rV6BX8GwJsWA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*",
+ "react": "*"
+ }
+ },
+ "node_modules/expo-linear-gradient": {
+ "version": "14.1.5",
+ "resolved": "https://registry.npmjs.org/expo-linear-gradient/-/expo-linear-gradient-14.1.5.tgz",
+ "integrity": "sha512-BSN3MkSGLZoHMduEnAgfhoj3xqcDWaoICgIr4cIYEx1GcHfKMhzA/O4mpZJ/WC27BP1rnAqoKfbclk1eA70ndQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*",
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-linking": {
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/expo-linking/-/expo-linking-7.1.7.tgz",
+ "integrity": "sha512-ZJaH1RIch2G/M3hx2QJdlrKbYFUTOjVVW4g39hfxrE5bPX9xhZUYXqxqQtzMNl1ylAevw9JkgEfWbBWddbZ3UA==",
+ "license": "MIT",
+ "dependencies": {
+ "expo-constants": "~17.1.7",
+ "invariant": "^2.2.4"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-location": {
+ "version": "18.1.6",
+ "resolved": "https://registry.npmjs.org/expo-location/-/expo-location-18.1.6.tgz",
+ "integrity": "sha512-l5dQQ2FYkrBgNzaZN1BvSmdhhcztFOUucu2kEfDBMV4wSIuTIt/CKsho+F3RnAiWgvui1wb1WTTf80E8zq48hA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-manifests": {
+ "version": "0.16.6",
+ "resolved": "https://registry.npmjs.org/expo-manifests/-/expo-manifests-0.16.6.tgz",
+ "integrity": "sha512-1A+do6/mLUWF9xd3uCrlXr9QFDbjbfqAYmUy8UDLOjof1lMrOhyeC4Yi6WexA/A8dhZEpIxSMCKfn7G4aHAh4w==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/config": "~11.0.12",
+ "expo-json-utils": "~0.15.0"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-modules-autolinking": {
+ "version": "2.1.14",
+ "resolved": "https://registry.npmjs.org/expo-modules-autolinking/-/expo-modules-autolinking-2.1.14.tgz",
+ "integrity": "sha512-nT5ERXwc+0ZT/pozDoJjYZyUQu5RnXMk9jDGm5lg+PiKvsrCTSA/2/eftJGMxLkTjVI2MXp5WjSz3JRjbA7UXA==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/spawn-async": "^1.7.2",
+ "chalk": "^4.1.0",
+ "commander": "^7.2.0",
+ "find-up": "^5.0.0",
+ "glob": "^10.4.2",
+ "require-from-string": "^2.0.2",
+ "resolve-from": "^5.0.0"
+ },
+ "bin": {
+ "expo-modules-autolinking": "bin/expo-modules-autolinking.js"
+ }
+ },
+ "node_modules/expo-modules-core": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/expo-modules-core/-/expo-modules-core-2.5.0.tgz",
+ "integrity": "sha512-aIbQxZE2vdCKsolQUl6Q9Farlf8tjh/ROR4hfN1qT7QBGPl1XrJGnaOKkcgYaGrlzCPg/7IBe0Np67GzKMZKKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "invariant": "^2.2.4"
+ }
+ },
+ "node_modules/expo-notifications": {
+ "version": "0.31.4",
+ "resolved": "https://registry.npmjs.org/expo-notifications/-/expo-notifications-0.31.4.tgz",
+ "integrity": "sha512-NnGKIFGpgZU66qfiFUyjEBYsS77VahURpSSeWEOLt+P1zOaUFlgx2XqS+dxH3/Bn1Vm7TMj04qKsK5KvzR/8Lw==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/image-utils": "^0.7.6",
+ "@ide/backoff": "^1.0.0",
+ "abort-controller": "^3.0.0",
+ "assert": "^2.0.0",
+ "badgin": "^1.1.5",
+ "expo-application": "~6.1.5",
+ "expo-constants": "~17.1.7"
+ },
+ "peerDependencies": {
+ "expo": "*",
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-router": {
+ "version": "5.1.10",
+ "resolved": "https://registry.npmjs.org/expo-router/-/expo-router-5.1.10.tgz",
+ "integrity": "sha512-Txi2KX5iF5D+60n8vhgWFlmbxHOjaAO7y/VuQa+WdCh0nuyEJkJEmza2kt+nvH/JCi8sYIGU2ZDNNejObN6sDg==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/metro-runtime": "5.0.5",
+ "@expo/schema-utils": "^0.1.0",
+ "@expo/server": "^0.6.3",
+ "@radix-ui/react-slot": "1.2.0",
+ "@react-navigation/bottom-tabs": "^7.3.10",
+ "@react-navigation/native": "^7.1.6",
+ "@react-navigation/native-stack": "^7.3.10",
+ "client-only": "^0.0.1",
+ "invariant": "^2.2.4",
+ "react-fast-compare": "^3.2.2",
+ "react-native-is-edge-to-edge": "^1.1.6",
+ "semver": "~7.6.3",
+ "server-only": "^0.0.1",
+ "shallowequal": "^1.1.0"
+ },
+ "peerDependencies": {
+ "@react-navigation/drawer": "^7.3.9",
+ "expo": "*",
+ "expo-constants": "*",
+ "expo-linking": "*",
+ "react-native-reanimated": "*",
+ "react-native-safe-area-context": "*",
+ "react-native-screens": "*",
+ "react-server-dom-webpack": "~19.0.3 || ~19.1.4 || ~19.2.3"
+ },
+ "peerDependenciesMeta": {
+ "@react-navigation/drawer": {
+ "optional": true
+ },
+ "@testing-library/jest-native": {
+ "optional": true
+ },
+ "react-native-reanimated": {
+ "optional": true
+ },
+ "react-server-dom-webpack": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/expo-router/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.0.tgz",
+ "integrity": "sha512-ujc+V6r0HNDviYqIK3rW4ffgYiZ8g5DEHrGJVk4x7kTlLXRDILnKX9vAUYeIsLOoDpDJ0ujpqMkjH4w2ofuo6w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/expo-router/node_modules/semver": {
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/expo-secure-store": {
+ "version": "14.2.4",
+ "resolved": "https://registry.npmjs.org/expo-secure-store/-/expo-secure-store-14.2.4.tgz",
+ "integrity": "sha512-ePaz4fnTitJJZjAiybaVYGfLWWyaEtepZC+vs9ZBMhQMfG5HUotIcVsDaSo3FnwpHmgwsLVPY2qFeryI6AtULw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-server-sdk": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/expo-server-sdk/-/expo-server-sdk-4.0.0.tgz",
+ "integrity": "sha512-zi83XtG2pqyP3gyn1JIRYkydo2i6HU3CYaWo/VvhZG/F29U+QIDv6LBEUsWf4ddZlVE7c9WN1N8Be49rHgO8OQ==",
+ "license": "MIT",
+ "dependencies": {
+ "node-fetch": "^2.6.0",
+ "promise-limit": "^2.7.0",
+ "promise-retry": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/expo-splash-screen": {
+ "version": "0.30.10",
+ "resolved": "https://registry.npmjs.org/expo-splash-screen/-/expo-splash-screen-0.30.10.tgz",
+ "integrity": "sha512-Tt9va/sLENQDQYeOQ6cdLdGvTZ644KR3YG9aRlnpcs2/beYjOX1LHT510EGzVN9ljUTg+1ebEo5GGt2arYtPjw==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/prebuild-config": "^9.0.10"
+ },
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-status-bar": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/expo-status-bar/-/expo-status-bar-2.2.3.tgz",
+ "integrity": "sha512-+c8R3AESBoduunxTJ8353SqKAKpxL6DvcD8VKBuh81zzJyUUbfB4CVjr1GufSJEKsMzNPXZU+HJwXx7Xh7lx8Q==",
+ "license": "MIT",
+ "dependencies": {
+ "react-native-edge-to-edge": "1.6.0",
+ "react-native-is-edge-to-edge": "^1.1.6"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-structured-headers": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/expo-structured-headers/-/expo-structured-headers-4.1.0.tgz",
+ "integrity": "sha512-2X+aUNzC/qaw7/WyUhrVHNDB0uQ5rE12XA2H/rJXaAiYQSuOeU90ladaN0IJYV9I2XlhYrjXLktLXWbO7zgbag==",
+ "license": "MIT"
+ },
+ "node_modules/expo-symbols": {
+ "version": "0.4.5",
+ "resolved": "https://registry.npmjs.org/expo-symbols/-/expo-symbols-0.4.5.tgz",
+ "integrity": "sha512-ZbgvJfACPfWaJxJrUd0YzDmH9X0Ci7vb5m0/ZpDz/tnF1vQJlkovvpFEHLUmCDSLIN7/fNK8t696KSpzfm8/kg==",
+ "license": "MIT",
+ "dependencies": {
+ "sf-symbols-typescript": "^2.0.0"
+ },
+ "peerDependencies": {
+ "expo": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/expo-system-ui": {
+ "version": "5.0.11",
+ "resolved": "https://registry.npmjs.org/expo-system-ui/-/expo-system-ui-5.0.11.tgz",
+ "integrity": "sha512-PG5VdaG5cwBe1Rj02mJdnsihKl9Iw/w/a6+qh2mH3f2K/IvQ+Hf7aG2kavSADtkGNCNj7CEIg7Rn4DQz/SE5rQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@react-native/normalize-colors": "0.79.6",
+ "debug": "^4.3.2"
+ },
+ "peerDependencies": {
+ "expo": "*",
+ "react-native": "*",
+ "react-native-web": "*"
+ },
+ "peerDependenciesMeta": {
+ "react-native-web": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/expo-system-ui/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/expo-system-ui/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/expo-updates": {
+ "version": "0.28.17",
+ "resolved": "https://registry.npmjs.org/expo-updates/-/expo-updates-0.28.17.tgz",
+ "integrity": "sha512-OiKDrKk6EoBRP9AoK7/4tyj9lVtHw2IfaETIFeUCHMgx5xjgKGX/jjSwqhk8N9BJgLDIy0oD0Sb0MaEbSBb3lg==",
+ "license": "MIT",
+ "dependencies": {
+ "@expo/code-signing-certificates": "0.0.5",
+ "@expo/config": "~11.0.13",
+ "@expo/config-plugins": "~10.1.2",
+ "@expo/spawn-async": "^1.7.2",
+ "arg": "4.1.0",
+ "chalk": "^4.1.2",
+ "expo-eas-client": "~0.14.4",
+ "expo-manifests": "~0.16.6",
+ "expo-structured-headers": "~4.1.0",
+ "expo-updates-interface": "~1.1.0",
+ "glob": "^10.4.2",
+ "ignore": "^5.3.1",
+ "resolve-from": "^5.0.0"
+ },
+ "bin": {
+ "expo-updates": "bin/cli.js"
+ },
+ "peerDependencies": {
+ "expo": "*",
+ "react": "*"
+ }
+ },
+ "node_modules/expo-updates-interface": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/expo-updates-interface/-/expo-updates-interface-1.1.0.tgz",
+ "integrity": "sha512-DeB+fRe0hUDPZhpJ4X4bFMAItatFBUPjw/TVSbJsaf3Exeami+2qbbJhWkcTMoYHOB73nOIcaYcWXYJnCJXO0w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*"
+ }
+ },
+ "node_modules/expo-updates/node_modules/arg": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
+ "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
+ "license": "MIT"
+ },
+ "node_modules/expo-updates/node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/expo-web-browser": {
+ "version": "14.2.0",
+ "resolved": "https://registry.npmjs.org/expo-web-browser/-/expo-web-browser-14.2.0.tgz",
+ "integrity": "sha512-6S51d8pVlDRDsgGAp8BPpwnxtyKiMWEFdezNz+5jVIyT+ctReW42uxnjRgtsdn5sXaqzhaX+Tzk/CWaKCyC0hw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "expo": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/exponential-backoff": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz",
+ "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/express": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "^2.0.0",
+ "body-parser": "^2.2.1",
+ "content-disposition": "^1.0.0",
+ "content-type": "^1.0.5",
+ "cookie": "^0.7.1",
+ "cookie-signature": "^1.2.1",
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "finalhandler": "^2.1.0",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "merge-descriptors": "^2.0.0",
+ "mime-types": "^3.0.0",
+ "on-finished": "^2.4.1",
+ "once": "^1.4.0",
+ "parseurl": "^1.3.3",
+ "proxy-addr": "^2.0.7",
+ "qs": "^6.14.0",
+ "range-parser": "^1.2.1",
+ "router": "^2.2.0",
+ "send": "^1.1.0",
+ "serve-static": "^2.2.0",
+ "statuses": "^2.0.1",
+ "type-is": "^2.0.1",
+ "vary": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express/node_modules/accepts": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "^3.0.0",
+ "negotiator": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/express/node_modules/body-parser": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",
+ "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "^3.1.2",
+ "content-type": "^1.0.5",
+ "debug": "^4.4.3",
+ "http-errors": "^2.0.0",
+ "iconv-lite": "^0.7.0",
+ "on-finished": "^2.4.1",
+ "qs": "^6.14.0",
+ "raw-body": "^3.0.1",
+ "type-is": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express/node_modules/content-disposition": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
+ "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express/node_modules/cookie-signature": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.6.0"
+ }
+ },
+ "node_modules/express/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/express/node_modules/finalhandler": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "on-finished": "^2.4.1",
+ "parseurl": "^1.3.3",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express/node_modules/fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/express/node_modules/iconv-lite": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz",
+ "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express/node_modules/media-typer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/express/node_modules/merge-descriptors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/express/node_modules/mime-types": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "^1.54.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/express/node_modules/negotiator": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/express/node_modules/raw-body": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.7.0",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/express/node_modules/send": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz",
+ "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "mime-types": "^3.0.1",
+ "ms": "^2.1.3",
+ "on-finished": "^2.4.1",
+ "range-parser": "^1.2.1",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/express/node_modules/serve-static": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz",
+ "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "parseurl": "^1.3.3",
+ "send": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/express/node_modules/type-is": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
+ "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
+ "license": "MIT",
+ "dependencies": {
+ "content-type": "^1.0.5",
+ "media-typer": "^1.1.0",
+ "mime-types": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fallback-ui": {
+ "resolved": "apps/fallback-ui",
+ "link": true
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "license": "MIT"
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-glob/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "license": "MIT"
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-xml-parser": {
+ "version": "5.2.5",
+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.5.tgz",
+ "integrity": "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/NaturalIntelligence"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "strnum": "^2.1.0"
+ },
+ "bin": {
+ "fxparser": "src/cli/cli.js"
+ }
+ },
+ "node_modules/fastq": {
+ "version": "1.19.1",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
+ "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/fb-watchman": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz",
+ "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "bser": "2.1.1"
+ }
+ },
+ "node_modules/fbjs": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.5.tgz",
+ "integrity": "sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-fetch": "^3.1.5",
+ "fbjs-css-vars": "^1.0.0",
+ "loose-envify": "^1.0.0",
+ "object-assign": "^4.1.0",
+ "promise": "^7.1.1",
+ "setimmediate": "^1.0.5",
+ "ua-parser-js": "^1.0.35"
+ }
+ },
+ "node_modules/fbjs-css-vars": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz",
+ "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==",
+ "license": "MIT"
+ },
+ "node_modules/fbjs/node_modules/ua-parser-js": {
+ "version": "1.0.41",
+ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.41.tgz",
+ "integrity": "sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/ua-parser-js"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/faisalman"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/faisalman"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "ua-parser-js": "script/cli.js"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/file-entry-cache": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "flat-cache": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+ "license": "MIT",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/filter-obj": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
+ "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",
+ "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "~2.0.2",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat-cache": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "flatted": "^3.2.9",
+ "keyv": "^4.5.4"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/flatted": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz",
+ "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/flow-enums-runtime": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz",
+ "integrity": "sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw==",
+ "license": "MIT"
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.11",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
+ "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fontfaceobserver": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/fontfaceobserver/-/fontfaceobserver-2.3.0.tgz",
+ "integrity": "sha512-6FPvD/IVyT4ZlNe7Wcn5Fb/4ChigpucKYSvD6a+0iMoLn2inpo711eyIcKjmDtE5XNcgAkSH9uN/nfAeZzHEfg==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/for-each": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
+ "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
+ "license": "MIT",
+ "dependencies": {
+ "is-callable": "^1.2.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/foreground-child": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
+ "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
+ "license": "ISC",
+ "dependencies": {
+ "cross-spawn": "^7.0.6",
+ "signal-exit": "^4.0.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
+ "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
+ "license": "MIT",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "es-set-tostringtag": "^2.1.0",
+ "hasown": "^2.0.2",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/formik": {
+ "version": "2.4.9",
+ "resolved": "https://registry.npmjs.org/formik/-/formik-2.4.9.tgz",
+ "integrity": "sha512-5nI94BMnlFDdQRBY4Sz39WkhxajZJ57Fzs8wVbtsQlm5ScKIR1QLYqv/ultBnobObtlUyxpxoLodpixrsf36Og==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://opencollective.com/formik"
+ }
+ ],
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/hoist-non-react-statics": "^3.3.1",
+ "deepmerge": "^2.1.1",
+ "hoist-non-react-statics": "^3.3.0",
+ "lodash": "^4.17.21",
+ "lodash-es": "^4.17.21",
+ "react-fast-compare": "^2.0.1",
+ "tiny-warning": "^1.0.2",
+ "tslib": "^2.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.8.0"
+ }
+ },
+ "node_modules/formik/node_modules/deepmerge": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
+ "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/formik/node_modules/react-fast-compare": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz",
+ "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==",
+ "license": "MIT"
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fraction.js": {
+ "version": "5.3.4",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
+ "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/rawify"
+ }
+ },
+ "node_modules/freeport-async": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/freeport-async/-/freeport-async-2.0.0.tgz",
+ "integrity": "sha512-K7od3Uw45AJg00XUmy15+Hae2hOcgKcmN3/EF6Y7i01O0gaqiRx8sUSpsb9+BRNL8RPBrhzPsVfy8q9ADlJuWQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "license": "ISC"
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/function.prototype.name": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz",
+ "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "functions-have-names": "^1.2.3",
+ "hasown": "^2.0.2",
+ "is-callable": "^1.2.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/functions-have-names": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
+ "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/generator-function": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz",
+ "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/geojson-equality-ts": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/geojson-equality-ts/-/geojson-equality-ts-1.0.2.tgz",
+ "integrity": "sha512-h3Ryq+0mCSN/7yLs0eDgrZhvc9af23o/QuC4aTiuuzP/MRCtd6mf5rLsLRY44jX0RPUfM8c4GqERQmlUxPGPoQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/geojson": "^7946.0.14"
+ }
+ },
+ "node_modules/geojson-polygon-self-intersections": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/geojson-polygon-self-intersections/-/geojson-polygon-self-intersections-1.2.1.tgz",
+ "integrity": "sha512-/QM1b5u2d172qQVO//9CGRa49jEmclKEsYOQmWP9ooEjj63tBM51m2805xsbxkzlEELQ2REgTf700gUhhlegxA==",
+ "license": "MIT",
+ "dependencies": {
+ "rbush": "^2.0.1"
+ }
+ },
+ "node_modules/geojson-polygon-self-intersections/node_modules/quickselect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz",
+ "integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==",
+ "license": "ISC"
+ },
+ "node_modules/geojson-polygon-self-intersections/node_modules/rbush": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz",
+ "integrity": "sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==",
+ "license": "MIT",
+ "dependencies": {
+ "quickselect": "^1.0.1"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "license": "ISC",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-package-type": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
+ "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/get-symbol-description": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",
+ "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-tsconfig": {
+ "version": "4.13.0",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.0.tgz",
+ "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
+ "node_modules/getenv": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/getenv/-/getenv-2.0.0.tgz",
+ "integrity": "sha512-VilgtJj/ALgGY77fiLam5iD336eSWi96Q15JSAG1zi8NRBysm3LXKdGnHb4m5cuyxvOLQQKWpBZAT6ni4FI2iQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/glob": {
+ "version": "10.5.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
+ "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
+ "license": "ISC",
+ "dependencies": {
+ "foreground-child": "^3.1.0",
+ "jackspeak": "^3.1.2",
+ "minimatch": "^9.0.4",
+ "minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
+ "path-scurry": "^1.11.1"
+ },
+ "bin": {
+ "glob": "dist/esm/bin.mjs"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/globals": {
+ "version": "14.0.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
+ "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/globalthis": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
+ "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-properties": "^1.2.1",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/goober": {
+ "version": "2.1.18",
+ "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.18.tgz",
+ "integrity": "sha512-2vFqsaDVIT9Gz7N6kAL++pLpp41l3PfDuusHcjnGLfR6+huZkl6ziX+zgVC3ZxpqWhzH6pyDdGrCeDhMIvwaxw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "csstype": "^3.0.10"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "license": "ISC"
+ },
+ "node_modules/has-bigints": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz",
+ "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
+ "license": "MIT",
+ "dependencies": {
+ "es-define-property": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-proto": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz",
+ "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+ "license": "MIT",
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/hermes-estree": {
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz",
+ "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==",
+ "license": "MIT"
+ },
+ "node_modules/hermes-parser": {
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz",
+ "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==",
+ "license": "MIT",
+ "dependencies": {
+ "hermes-estree": "0.25.1"
+ }
+ },
+ "node_modules/hoist-non-react-statics": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
+ "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "react-is": "^16.7.0"
+ }
+ },
+ "node_modules/hoist-non-react-statics/node_modules/react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "license": "MIT"
+ },
+ "node_modules/hosted-git-info": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz",
+ "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==",
+ "license": "ISC",
+ "dependencies": {
+ "lru-cache": "^10.0.1"
+ },
+ "engines": {
+ "node": "^16.14.0 || >=18.0.0"
+ }
+ },
+ "node_modules/hosted-git-info/node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "license": "ISC"
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "inherits": "~2.0.4",
+ "setprototypeof": "~1.2.0",
+ "statuses": "~2.0.2",
+ "toidentifier": "~1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/https-proxy-agent/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/https-proxy-agent/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/hyphenate-style-name": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz",
+ "integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/ignore": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
+ "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/image-size": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.2.1.tgz",
+ "integrity": "sha512-rH+46sQJ2dlwfjfhCyNx5thzrv+dtmBIhPHk0zgRUukHzZ/kRueTJXoYYsclBaKcSMBWuGbOFXtioLpzTb5euw==",
+ "license": "MIT",
+ "dependencies": {
+ "queue": "6.0.2"
+ },
+ "bin": {
+ "image-size": "bin/image-size.js"
+ },
+ "engines": {
+ "node": ">=16.x"
+ }
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
+ "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/import-fresh/node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
+ "license": "ISC",
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+ "license": "ISC"
+ },
+ "node_modules/inline-style-prefixer": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-7.0.1.tgz",
+ "integrity": "sha512-lhYo5qNTQp3EvSSp3sRvXMbVQTLrvGV6DycRMJ5dm2BLMiJ30wpXKdDdgX+GmJZ5uQMucwRKHamXSst3Sj/Giw==",
+ "license": "MIT",
+ "dependencies": {
+ "css-in-js-utils": "^3.1.0"
+ }
+ },
+ "node_modules/internal-slot": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",
+ "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "hasown": "^2.0.2",
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/invariant": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
+ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.0.0"
+ }
+ },
+ "node_modules/ioredis": {
+ "version": "5.8.2",
+ "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.8.2.tgz",
+ "integrity": "sha512-C6uC+kleiIMmjViJINWk80sOQw5lEzse1ZmvD+S/s8p8CWapftSaC+kocGTx6xrbrJ4WmYQGC08ffHLr6ToR6Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@ioredis/commands": "1.4.0",
+ "cluster-key-slot": "^1.1.0",
+ "debug": "^4.3.4",
+ "denque": "^2.1.0",
+ "lodash.defaults": "^4.2.0",
+ "lodash.isarguments": "^3.1.0",
+ "redis-errors": "^1.2.0",
+ "redis-parser": "^3.0.0",
+ "standard-as-callback": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=12.22.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/ioredis"
+ }
+ },
+ "node_modules/ioredis/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ioredis/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-arguments": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz",
+ "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-array-buffer": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
+ "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "get-intrinsic": "^1.2.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+ "license": "MIT"
+ },
+ "node_modules/is-async-function": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz",
+ "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "async-function": "^1.0.0",
+ "call-bound": "^1.0.3",
+ "get-proto": "^1.0.1",
+ "has-tostringtag": "^1.0.2",
+ "safe-regex-test": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-bigint": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz",
+ "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-bigints": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "license": "MIT",
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-boolean-object": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz",
+ "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-bun-module": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz",
+ "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.7.1"
+ }
+ },
+ "node_modules/is-bun-module/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/is-callable": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.16.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-data-view": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz",
+ "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "get-intrinsic": "^1.2.6",
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-date-object": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz",
+ "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-directory": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
+ "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "license": "MIT",
+ "bin": {
+ "is-docker": "cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-expression": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-4.0.0.tgz",
+ "integrity": "sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==",
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^7.1.1",
+ "object-assign": "^4.1.1"
+ }
+ },
+ "node_modules/is-expression/node_modules/acorn": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
+ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-finalizationregistry": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz",
+ "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-generator-function": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz",
+ "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.4",
+ "generator-function": "^2.0.0",
+ "get-proto": "^1.0.1",
+ "has-tostringtag": "^1.0.2",
+ "safe-regex-test": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "license": "MIT",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-map": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
+ "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-nan": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz",
+ "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-negative-zero": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
+ "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-number-object": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz",
+ "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-promise": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
+ "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==",
+ "license": "MIT"
+ },
+ "node_modules/is-regex": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
+ "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "gopd": "^1.2.0",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-retry-allowed": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz",
+ "integrity": "sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-set": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
+ "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-shared-array-buffer": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz",
+ "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-string": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",
+ "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-symbol": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz",
+ "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "has-symbols": "^1.1.0",
+ "safe-regex-test": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-typed-array": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
+ "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "which-typed-array": "^1.1.16"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakmap": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
+ "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakref": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz",
+ "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakset": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz",
+ "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "get-intrinsic": "^1.2.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-what": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/is-what/-/is-what-5.5.0.tgz",
+ "integrity": "sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/mesqueeb"
+ }
+ },
+ "node_modules/is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "license": "MIT",
+ "dependencies": {
+ "is-docker": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/isbot": {
+ "version": "5.1.32",
+ "resolved": "https://registry.npmjs.org/isbot/-/isbot-5.1.32.tgz",
+ "integrity": "sha512-VNfjM73zz2IBZmdShMfAUg10prm6t7HFUQmNAEOAVS4YH92ZrZcvkMcGX6cIgBJAzWDzPent/EeAtYEHNPNPBQ==",
+ "license": "Unlicense",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "license": "ISC"
+ },
+ "node_modules/istanbul-lib-coverage": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",
+ "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-instrument": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz",
+ "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@babel/core": "^7.12.3",
+ "@babel/parser": "^7.14.7",
+ "@istanbuljs/schema": "^0.1.2",
+ "istanbul-lib-coverage": "^3.2.0",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/iterator.prototype": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz",
+ "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.6",
+ "get-proto": "^1.0.0",
+ "has-symbols": "^1.1.0",
+ "set-function-name": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/jackspeak": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "@isaacs/cliui": "^8.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ },
+ "optionalDependencies": {
+ "@pkgjs/parseargs": "^0.11.0"
+ }
+ },
+ "node_modules/jest-environment-node": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
+ "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/environment": "^29.7.0",
+ "@jest/fake-timers": "^29.7.0",
+ "@jest/types": "^29.6.3",
+ "@types/node": "*",
+ "jest-mock": "^29.7.0",
+ "jest-util": "^29.7.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-get-type": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz",
+ "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==",
+ "license": "MIT",
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-haste-map": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz",
+ "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "^29.6.3",
+ "@types/graceful-fs": "^4.1.3",
+ "@types/node": "*",
+ "anymatch": "^3.0.3",
+ "fb-watchman": "^2.0.0",
+ "graceful-fs": "^4.2.9",
+ "jest-regex-util": "^29.6.3",
+ "jest-util": "^29.7.0",
+ "jest-worker": "^29.7.0",
+ "micromatch": "^4.0.4",
+ "walker": "^1.0.8"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "^2.3.2"
+ }
+ },
+ "node_modules/jest-message-util": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz",
+ "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.12.13",
+ "@jest/types": "^29.6.3",
+ "@types/stack-utils": "^2.0.0",
+ "chalk": "^4.0.0",
+ "graceful-fs": "^4.2.9",
+ "micromatch": "^4.0.4",
+ "pretty-format": "^29.7.0",
+ "slash": "^3.0.0",
+ "stack-utils": "^2.0.3"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-mock": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz",
+ "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "^29.6.3",
+ "@types/node": "*",
+ "jest-util": "^29.7.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-regex-util": {
+ "version": "29.6.3",
+ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz",
+ "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==",
+ "license": "MIT",
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-util": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz",
+ "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "^29.6.3",
+ "@types/node": "*",
+ "chalk": "^4.0.0",
+ "ci-info": "^3.2.0",
+ "graceful-fs": "^4.2.9",
+ "picomatch": "^2.2.3"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-util/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/jest-validate": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz",
+ "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "^29.6.3",
+ "camelcase": "^6.2.0",
+ "chalk": "^4.0.0",
+ "jest-get-type": "^29.6.3",
+ "leven": "^3.1.0",
+ "pretty-format": "^29.7.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-validate/node_modules/camelcase": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/jest-worker": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz",
+ "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "jest-util": "^29.7.0",
+ "merge-stream": "^2.0.0",
+ "supports-color": "^8.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-worker/node_modules/supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/jimp-compact": {
+ "version": "0.16.1",
+ "resolved": "https://registry.npmjs.org/jimp-compact/-/jimp-compact-0.16.1.tgz",
+ "integrity": "sha512-dZ6Ra7u1G8c4Letq/B5EzAxj4tLFHL+cGtdpR+PVm4yzPDj+lCk+AbivWt1eOM+ikzkowtyV7qSqX6qr3t71Ww==",
+ "license": "MIT"
+ },
+ "node_modules/jiti": {
+ "version": "1.21.7",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
+ "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
+ "license": "MIT",
+ "bin": {
+ "jiti": "bin/jiti.js"
+ }
+ },
+ "node_modules/js-stringify": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz",
+ "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==",
+ "license": "MIT"
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "license": "MIT"
+ },
+ "node_modules/js-yaml": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/jsc-safe-url": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz",
+ "integrity": "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==",
+ "license": "0BSD"
+ },
+ "node_modules/jsesc": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
+ "license": "MIT",
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-parse-better-errors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+ "license": "MIT"
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jsonwebtoken": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz",
+ "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==",
+ "license": "MIT",
+ "dependencies": {
+ "jws": "^4.0.1",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/jsonwebtoken/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/jsonwebtoken/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/jstransformer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz",
+ "integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==",
+ "license": "MIT",
+ "dependencies": {
+ "is-promise": "^2.0.0",
+ "promise": "^7.0.1"
+ }
+ },
+ "node_modules/jsts": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.7.1.tgz",
+ "integrity": "sha512-x2wSZHEBK20CY+Wy+BPE7MrFQHW6sIsdaGUMEqmGAio+3gFzQaBYPwLRonUfQf9Ak8pBieqj9tUofX1+WtAEIg==",
+ "license": "(EDL-1.0 OR EPL-1.0)",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/jsx-ast-utils": {
+ "version": "3.3.5",
+ "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
+ "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-includes": "^3.1.6",
+ "array.prototype.flat": "^1.3.1",
+ "object.assign": "^4.1.4",
+ "object.values": "^1.1.6"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/jwa": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz",
+ "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer-equal-constant-time": "^1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz",
+ "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==",
+ "license": "MIT",
+ "dependencies": {
+ "jwa": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jwt-decode": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
+ "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/kleur": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/lan-network": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/lan-network/-/lan-network-0.1.7.tgz",
+ "integrity": "sha512-mnIlAEMu4OyEvUNdzco9xpuB9YVcPkQec+QsgycBCtPZvEqWPCDPfbAE4OJMdBBWpZWtpCn1xw9jJYlwjWI5zQ==",
+ "license": "MIT",
+ "bin": {
+ "lan-network": "dist/lan-network-cli.js"
+ }
+ },
+ "node_modules/leven": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
+ "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/libphonenumber-js": {
+ "version": "1.12.31",
+ "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.12.31.tgz",
+ "integrity": "sha512-Z3IhgVgrqO1S5xPYM3K5XwbkDasU67/Vys4heW+lfSBALcUZjeIIzI8zCLifY+OCzSq+fpDdywMDa7z+4srJPQ==",
+ "license": "MIT"
+ },
+ "node_modules/lighthouse-logger": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz",
+ "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "debug": "^2.6.9",
+ "marky": "^1.2.2"
+ }
+ },
+ "node_modules/lightningcss": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.27.0.tgz",
+ "integrity": "sha512-8f7aNmS1+etYSLHht0fQApPc2kNO8qGRutifN5rVIc6Xo6ABsEbqOr758UwI7ALVbTt4x1fllKt0PYgzD9S3yQ==",
+ "license": "MPL-2.0",
+ "dependencies": {
+ "detect-libc": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "lightningcss-darwin-arm64": "1.27.0",
+ "lightningcss-darwin-x64": "1.27.0",
+ "lightningcss-freebsd-x64": "1.27.0",
+ "lightningcss-linux-arm-gnueabihf": "1.27.0",
+ "lightningcss-linux-arm64-gnu": "1.27.0",
+ "lightningcss-linux-arm64-musl": "1.27.0",
+ "lightningcss-linux-x64-gnu": "1.27.0",
+ "lightningcss-linux-x64-musl": "1.27.0",
+ "lightningcss-win32-arm64-msvc": "1.27.0",
+ "lightningcss-win32-x64-msvc": "1.27.0"
+ }
+ },
+ "node_modules/lightningcss-darwin-arm64": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.27.0.tgz",
+ "integrity": "sha512-Gl/lqIXY+d+ySmMbgDf0pgaWSqrWYxVHoc88q+Vhf2YNzZ8DwoRzGt5NZDVqqIW5ScpSnmmjcgXP87Dn2ylSSQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-x64": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.27.0.tgz",
+ "integrity": "sha512-0+mZa54IlcNAoQS9E0+niovhyjjQWEMrwW0p2sSdLRhLDc8LMQ/b67z7+B5q4VmjYCMSfnFi3djAAQFIDuj/Tg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-freebsd-x64": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.27.0.tgz",
+ "integrity": "sha512-n1sEf85fePoU2aDN2PzYjoI8gbBqnmLGEhKq7q0DKLj0UTVmOTwDC7PtLcy/zFxzASTSBlVQYJUhwIStQMIpRA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm-gnueabihf": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.27.0.tgz",
+ "integrity": "sha512-MUMRmtdRkOkd5z3h986HOuNBD1c2lq2BSQA1Jg88d9I7bmPGx08bwGcnB75dvr17CwxjxD6XPi3Qh8ArmKFqCA==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-gnu": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.27.0.tgz",
+ "integrity": "sha512-cPsxo1QEWq2sfKkSq2Bq5feQDHdUEwgtA9KaB27J5AX22+l4l0ptgjMZZtYtUnteBofjee+0oW1wQ1guv04a7A==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-musl": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.27.0.tgz",
+ "integrity": "sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-gnu": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.27.0.tgz",
+ "integrity": "sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-musl": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.27.0.tgz",
+ "integrity": "sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-arm64-msvc": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.27.0.tgz",
+ "integrity": "sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-x64-msvc": {
+ "version": "1.27.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.27.0.tgz",
+ "integrity": "sha512-/OJLj94Zm/waZShL8nB5jsNj3CfNATLCTyFxZyouilfTmSoLDX7VlVAmhPHoZWVFp4vdmoiEbPEYC8HID3m6yw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lilconfig": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
+ "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antonk52"
+ }
+ },
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
+ "license": "MIT"
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "license": "MIT"
+ },
+ "node_modules/lodash-es": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
+ "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.debounce": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
+ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.defaults": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
+ "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isarguments": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
+ "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.throttle": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
+ "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==",
+ "license": "MIT"
+ },
+ "node_modules/log-symbols": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
+ "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/log-symbols/node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/log-symbols/node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/log-symbols/node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/log-symbols/node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "license": "MIT"
+ },
+ "node_modules/log-symbols/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/log-symbols/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/log-symbols/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ },
+ "bin": {
+ "loose-envify": "cli.js"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/luxon": {
+ "version": "3.7.2",
+ "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz",
+ "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/makeerror": {
+ "version": "1.0.12",
+ "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
+ "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "tmpl": "1.0.5"
+ }
+ },
+ "node_modules/marky": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/marky/-/marky-1.3.0.tgz",
+ "integrity": "sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/mdn-data": {
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
+ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
+ "license": "CC0-1.0"
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/memoize-one": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz",
+ "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==",
+ "license": "MIT"
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "license": "MIT"
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/metro": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro/-/metro-0.82.5.tgz",
+ "integrity": "sha512-8oAXxL7do8QckID/WZEKaIFuQJFUTLzfVcC48ghkHhNK2RGuQq8Xvf4AVd+TUA0SZtX0q8TGNXZ/eba1ckeGCg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.24.7",
+ "@babel/core": "^7.25.2",
+ "@babel/generator": "^7.25.0",
+ "@babel/parser": "^7.25.3",
+ "@babel/template": "^7.25.0",
+ "@babel/traverse": "^7.25.3",
+ "@babel/types": "^7.25.2",
+ "accepts": "^1.3.7",
+ "chalk": "^4.0.0",
+ "ci-info": "^2.0.0",
+ "connect": "^3.6.5",
+ "debug": "^4.4.0",
+ "error-stack-parser": "^2.0.6",
+ "flow-enums-runtime": "^0.0.6",
+ "graceful-fs": "^4.2.4",
+ "hermes-parser": "0.29.1",
+ "image-size": "^1.0.2",
+ "invariant": "^2.2.4",
+ "jest-worker": "^29.7.0",
+ "jsc-safe-url": "^0.2.2",
+ "lodash.throttle": "^4.1.1",
+ "metro-babel-transformer": "0.82.5",
+ "metro-cache": "0.82.5",
+ "metro-cache-key": "0.82.5",
+ "metro-config": "0.82.5",
+ "metro-core": "0.82.5",
+ "metro-file-map": "0.82.5",
+ "metro-resolver": "0.82.5",
+ "metro-runtime": "0.82.5",
+ "metro-source-map": "0.82.5",
+ "metro-symbolicate": "0.82.5",
+ "metro-transform-plugins": "0.82.5",
+ "metro-transform-worker": "0.82.5",
+ "mime-types": "^2.1.27",
+ "nullthrows": "^1.1.1",
+ "serialize-error": "^2.1.0",
+ "source-map": "^0.5.6",
+ "throat": "^5.0.0",
+ "ws": "^7.5.10",
+ "yargs": "^17.6.2"
+ },
+ "bin": {
+ "metro": "src/cli.js"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-babel-transformer": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.82.5.tgz",
+ "integrity": "sha512-W/scFDnwJXSccJYnOFdGiYr9srhbHPdxX9TvvACOFsIXdLilh3XuxQl/wXW6jEJfgIb0jTvoTlwwrqvuwymr6Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.25.2",
+ "flow-enums-runtime": "^0.0.6",
+ "hermes-parser": "0.29.1",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-babel-transformer/node_modules/hermes-estree": {
+ "version": "0.29.1",
+ "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.29.1.tgz",
+ "integrity": "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ==",
+ "license": "MIT"
+ },
+ "node_modules/metro-babel-transformer/node_modules/hermes-parser": {
+ "version": "0.29.1",
+ "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.29.1.tgz",
+ "integrity": "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA==",
+ "license": "MIT",
+ "dependencies": {
+ "hermes-estree": "0.29.1"
+ }
+ },
+ "node_modules/metro-cache": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.82.5.tgz",
+ "integrity": "sha512-AwHV9607xZpedu1NQcjUkua8v7HfOTKfftl6Vc9OGr/jbpiJX6Gpy8E/V9jo/U9UuVYX2PqSUcVNZmu+LTm71Q==",
+ "license": "MIT",
+ "dependencies": {
+ "exponential-backoff": "^3.1.1",
+ "flow-enums-runtime": "^0.0.6",
+ "https-proxy-agent": "^7.0.5",
+ "metro-core": "0.82.5"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-cache-key": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.82.5.tgz",
+ "integrity": "sha512-qpVmPbDJuRLrT4kcGlUouyqLGssJnbTllVtvIgXfR7ZuzMKf0mGS+8WzcqzNK8+kCyakombQWR0uDd8qhWGJcA==",
+ "license": "MIT",
+ "dependencies": {
+ "flow-enums-runtime": "^0.0.6"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-config": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.82.5.tgz",
+ "integrity": "sha512-/r83VqE55l0WsBf8IhNmc/3z71y2zIPe5kRSuqA5tY/SL/ULzlHUJEMd1szztd0G45JozLwjvrhAzhDPJ/Qo/g==",
+ "license": "MIT",
+ "dependencies": {
+ "connect": "^3.6.5",
+ "cosmiconfig": "^5.0.5",
+ "flow-enums-runtime": "^0.0.6",
+ "jest-validate": "^29.7.0",
+ "metro": "0.82.5",
+ "metro-cache": "0.82.5",
+ "metro-core": "0.82.5",
+ "metro-runtime": "0.82.5"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-core": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.82.5.tgz",
+ "integrity": "sha512-OJL18VbSw2RgtBm1f2P3J5kb892LCVJqMvslXxuxjAPex8OH7Eb8RBfgEo7VZSjgb/LOf4jhC4UFk5l5tAOHHA==",
+ "license": "MIT",
+ "dependencies": {
+ "flow-enums-runtime": "^0.0.6",
+ "lodash.throttle": "^4.1.1",
+ "metro-resolver": "0.82.5"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-file-map": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-file-map/-/metro-file-map-0.82.5.tgz",
+ "integrity": "sha512-vpMDxkGIB+MTN8Af5hvSAanc6zXQipsAUO+XUx3PCQieKUfLwdoa8qaZ1WAQYRpaU+CJ8vhBcxtzzo3d9IsCIQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "fb-watchman": "^2.0.0",
+ "flow-enums-runtime": "^0.0.6",
+ "graceful-fs": "^4.2.4",
+ "invariant": "^2.2.4",
+ "jest-worker": "^29.7.0",
+ "micromatch": "^4.0.4",
+ "nullthrows": "^1.1.1",
+ "walker": "^1.0.7"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-file-map/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/metro-file-map/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/metro-minify-terser": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-minify-terser/-/metro-minify-terser-0.82.5.tgz",
+ "integrity": "sha512-v6Nx7A4We6PqPu/ta1oGTqJ4Usz0P7c+3XNeBxW9kp8zayS3lHUKR0sY0wsCHInxZlNAEICx791x+uXytFUuwg==",
+ "license": "MIT",
+ "dependencies": {
+ "flow-enums-runtime": "^0.0.6",
+ "terser": "^5.15.0"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-resolver": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.82.5.tgz",
+ "integrity": "sha512-kFowLnWACt3bEsuVsaRNgwplT8U7kETnaFHaZePlARz4Fg8tZtmRDUmjaD68CGAwc0rwdwNCkWizLYpnyVcs2g==",
+ "license": "MIT",
+ "dependencies": {
+ "flow-enums-runtime": "^0.0.6"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-runtime": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.82.5.tgz",
+ "integrity": "sha512-rQZDoCUf7k4Broyw3Ixxlq5ieIPiR1ULONdpcYpbJQ6yQ5GGEyYjtkztGD+OhHlw81LCR2SUAoPvtTus2WDK5g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.25.0",
+ "flow-enums-runtime": "^0.0.6"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-source-map": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.82.5.tgz",
+ "integrity": "sha512-wH+awTOQJVkbhn2SKyaw+0cd+RVSCZ3sHVgyqJFQXIee/yLs3dZqKjjeKKhhVeudgjXo7aE/vSu/zVfcQEcUfw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.25.3",
+ "@babel/traverse--for-generate-function-map": "npm:@babel/traverse@^7.25.3",
+ "@babel/types": "^7.25.2",
+ "flow-enums-runtime": "^0.0.6",
+ "invariant": "^2.2.4",
+ "metro-symbolicate": "0.82.5",
+ "nullthrows": "^1.1.1",
+ "ob1": "0.82.5",
+ "source-map": "^0.5.6",
+ "vlq": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-symbolicate": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.82.5.tgz",
+ "integrity": "sha512-1u+07gzrvYDJ/oNXuOG1EXSvXZka/0JSW1q2EYBWerVKMOhvv9JzDGyzmuV7hHbF2Hg3T3S2uiM36sLz1qKsiw==",
+ "license": "MIT",
+ "dependencies": {
+ "flow-enums-runtime": "^0.0.6",
+ "invariant": "^2.2.4",
+ "metro-source-map": "0.82.5",
+ "nullthrows": "^1.1.1",
+ "source-map": "^0.5.6",
+ "vlq": "^1.0.0"
+ },
+ "bin": {
+ "metro-symbolicate": "src/index.js"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-transform-plugins": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.82.5.tgz",
+ "integrity": "sha512-57Bqf3rgq9nPqLrT2d9kf/2WVieTFqsQ6qWHpEng5naIUtc/Iiw9+0bfLLWSAw0GH40iJ4yMjFcFJDtNSYynMA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.25.2",
+ "@babel/generator": "^7.25.0",
+ "@babel/template": "^7.25.0",
+ "@babel/traverse": "^7.25.3",
+ "flow-enums-runtime": "^0.0.6",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro-transform-worker": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.82.5.tgz",
+ "integrity": "sha512-mx0grhAX7xe+XUQH6qoHHlWedI8fhSpDGsfga7CpkO9Lk9W+aPitNtJWNGrW8PfjKEWbT9Uz9O50dkI8bJqigw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.25.2",
+ "@babel/generator": "^7.25.0",
+ "@babel/parser": "^7.25.3",
+ "@babel/types": "^7.25.2",
+ "flow-enums-runtime": "^0.0.6",
+ "metro": "0.82.5",
+ "metro-babel-transformer": "0.82.5",
+ "metro-cache": "0.82.5",
+ "metro-cache-key": "0.82.5",
+ "metro-minify-terser": "0.82.5",
+ "metro-source-map": "0.82.5",
+ "metro-transform-plugins": "0.82.5",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/metro/node_modules/ci-info": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
+ "license": "MIT"
+ },
+ "node_modules/metro/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/metro/node_modules/hermes-estree": {
+ "version": "0.29.1",
+ "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.29.1.tgz",
+ "integrity": "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ==",
+ "license": "MIT"
+ },
+ "node_modules/metro/node_modules/hermes-parser": {
+ "version": "0.29.1",
+ "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.29.1.tgz",
+ "integrity": "sha512-xBHWmUtRC5e/UL0tI7Ivt2riA/YBq9+SiYFU7C1oBa/j2jYGlIF9043oak1F47ihuDIxQ5nbsKueYJDRY02UgA==",
+ "license": "MIT",
+ "dependencies": {
+ "hermes-estree": "0.29.1"
+ }
+ },
+ "node_modules/metro/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/metro/node_modules/ws": {
+ "version": "7.5.10",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
+ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
+ "license": "MIT",
+ "dependencies": {
+ "braces": "^3.0.3",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/micromatch/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "license": "MIT",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types/node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/minipass": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
+ "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/minizlib": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",
+ "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",
+ "license": "MIT",
+ "dependencies": {
+ "minipass": "^7.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "license": "MIT",
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/msgpackr": {
+ "version": "1.11.5",
+ "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.5.tgz",
+ "integrity": "sha512-UjkUHN0yqp9RWKy0Lplhh+wlpdt9oQBYgULZOiFhV3VclSF1JnSQWZ5r9gORQlNYaUKQoR8itv7g7z1xDDuACA==",
+ "license": "MIT",
+ "optionalDependencies": {
+ "msgpackr-extract": "^3.0.2"
+ }
+ },
+ "node_modules/msgpackr-extract": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz",
+ "integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "node-gyp-build-optional-packages": "5.2.2"
+ },
+ "bin": {
+ "download-msgpackr-prebuilds": "bin/download-prebuilds.js"
+ },
+ "optionalDependencies": {
+ "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3",
+ "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3",
+ "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3",
+ "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3",
+ "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3",
+ "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3"
+ }
+ },
+ "node_modules/multer": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz",
+ "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==",
+ "license": "MIT",
+ "dependencies": {
+ "append-field": "^1.0.0",
+ "busboy": "^1.6.0",
+ "concat-stream": "^2.0.0",
+ "mkdirp": "^0.5.6",
+ "object-assign": "^4.1.1",
+ "type-is": "^1.6.18",
+ "xtend": "^4.0.2"
+ },
+ "engines": {
+ "node": ">= 10.16.0"
+ }
+ },
+ "node_modules/multer/node_modules/mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "license": "MIT",
+ "dependencies": {
+ "minimist": "^1.2.6"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ }
+ },
+ "node_modules/mz": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
+ "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
+ "license": "MIT",
+ "dependencies": {
+ "any-promise": "^1.0.0",
+ "object-assign": "^4.0.1",
+ "thenify-all": "^1.0.0"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.11",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/napi-postinstall": {
+ "version": "0.3.4",
+ "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz",
+ "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "napi-postinstall": "lib/cli.js"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/napi-postinstall"
+ }
+ },
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/nested-error-stacks": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.0.1.tgz",
+ "integrity": "sha512-SrQrok4CATudVzBS7coSz26QRSmlK9TzzoFbeKfcPBUFPjcQM9Rqvr/DlJkOrwI/0KcgvMub1n1g5Jt9EgRn4A==",
+ "license": "MIT"
+ },
+ "node_modules/node-abort-controller": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz",
+ "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==",
+ "license": "MIT"
+ },
+ "node_modules/node-cron": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-4.2.1.tgz",
+ "integrity": "sha512-lgimEHPE/QDgFlywTd8yTR61ptugX3Qer29efeyWw2rv259HtGBNn1vZVmp8lB9uo9wC0t/AT4iGqXxia+CJFg==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/node-fetch": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/node-forge": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.3.tgz",
+ "integrity": "sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==",
+ "license": "(BSD-3-Clause OR GPL-2.0)",
+ "engines": {
+ "node": ">= 6.13.0"
+ }
+ },
+ "node_modules/node-gyp-build-optional-packages": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz",
+ "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "detect-libc": "^2.0.1"
+ },
+ "bin": {
+ "node-gyp-build-optional-packages": "bin.js",
+ "node-gyp-build-optional-packages-optional": "optional.js",
+ "node-gyp-build-optional-packages-test": "build-test.js"
+ }
+ },
+ "node_modules/node-gyp-build-optional-packages/node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "license": "Apache-2.0",
+ "optional": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/node-int64": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
+ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==",
+ "license": "MIT"
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.27",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
+ "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
+ "license": "MIT"
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/normalize-range": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/npm-package-arg": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.3.tgz",
+ "integrity": "sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw==",
+ "license": "ISC",
+ "dependencies": {
+ "hosted-git-info": "^7.0.0",
+ "proc-log": "^4.0.0",
+ "semver": "^7.3.5",
+ "validate-npm-package-name": "^5.0.0"
+ },
+ "engines": {
+ "node": "^16.14.0 || >=18.0.0"
+ }
+ },
+ "node_modules/npm-package-arg/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/nth-check": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
+ "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "boolbase": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/nth-check?sponsor=1"
+ }
+ },
+ "node_modules/nullthrows": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz",
+ "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==",
+ "license": "MIT"
+ },
+ "node_modules/ob1": {
+ "version": "0.82.5",
+ "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.82.5.tgz",
+ "integrity": "sha512-QyQQ6e66f+Ut/qUVjEce0E/wux5nAGLXYZDn1jr15JWstHsCH3l6VVrg8NKDptW9NEiBXKOJeGF/ydxeSDF3IQ==",
+ "license": "MIT",
+ "dependencies": {
+ "flow-enums-runtime": "^0.0.6"
+ },
+ "engines": {
+ "node": ">=18.18"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-hash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object-is": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz",
+ "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.assign": {
+ "version": "4.1.7",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz",
+ "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0",
+ "has-symbols": "^1.1.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.entries": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz",
+ "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.fromentries": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
+ "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.groupby": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
+ "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.values": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz",
+ "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/on-headers": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
+ "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/onetime": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
+ "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/open": {
+ "version": "7.4.2",
+ "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
+ "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
+ "license": "MIT",
+ "dependencies": {
+ "is-docker": "^2.0.0",
+ "is-wsl": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/optionator": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.5"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/ora": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz",
+ "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^2.4.2",
+ "cli-cursor": "^2.1.0",
+ "cli-spinners": "^2.0.0",
+ "log-symbols": "^2.2.0",
+ "strip-ansi": "^5.2.0",
+ "wcwidth": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/ora/node_modules/ansi-regex": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
+ "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/ora/node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/ora/node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/ora/node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/ora/node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "license": "MIT"
+ },
+ "node_modules/ora/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/ora/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/ora/node_modules/strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/ora/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/own-keys": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz",
+ "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "get-intrinsic": "^1.2.6",
+ "object-keys": "^1.1.1",
+ "safe-push-apply": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "license": "MIT",
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/package-json-from-dist": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
+ "license": "BlueOak-1.0.0"
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==",
+ "license": "MIT",
+ "dependencies": {
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/parse-png": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/parse-png/-/parse-png-2.1.0.tgz",
+ "integrity": "sha512-Nt/a5SfCLiTnQAjx3fHlqp8hRgTL3z7kTQZzvIMS9uCAepnCyjpdEc6M/sz69WqMBdaDBw9sF1F1UaHROYzGkQ==",
+ "license": "MIT",
+ "dependencies": {
+ "pngjs": "^3.3.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "license": "MIT"
+ },
+ "node_modules/path-scurry": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "lru-cache": "^10.2.0",
+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/path-scurry/node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "license": "ISC"
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.12",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
+ "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
+ "license": "MIT"
+ },
+ "node_modules/pg": {
+ "version": "8.16.3",
+ "resolved": "https://registry.npmjs.org/pg/-/pg-8.16.3.tgz",
+ "integrity": "sha512-enxc1h0jA/aq5oSDMvqyW3q89ra6XIIDZgCX9vkMrnz5DFTw/Ny3Li2lFQ+pt3L6MCgm/5o2o8HW9hiJji+xvw==",
+ "license": "MIT",
+ "dependencies": {
+ "pg-connection-string": "^2.9.1",
+ "pg-pool": "^3.10.1",
+ "pg-protocol": "^1.10.3",
+ "pg-types": "2.2.0",
+ "pgpass": "1.0.5"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "optionalDependencies": {
+ "pg-cloudflare": "^1.2.7"
+ },
+ "peerDependencies": {
+ "pg-native": ">=3.0.1"
+ },
+ "peerDependenciesMeta": {
+ "pg-native": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pg-cloudflare": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.2.7.tgz",
+ "integrity": "sha512-YgCtzMH0ptvZJslLM1ffsY4EuGaU0cx4XSdXLRFae8bPP4dS5xL1tNB3k2o/N64cHJpwU7dxKli/nZ2lUa5fLg==",
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/pg-connection-string": {
+ "version": "2.9.1",
+ "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.9.1.tgz",
+ "integrity": "sha512-nkc6NpDcvPVpZXxrreI/FOtX3XemeLl8E0qFr6F2Lrm/I8WOnaWNhIPK2Z7OHpw7gh5XJThi6j6ppgNoaT1w4w==",
+ "license": "MIT"
+ },
+ "node_modules/pg-int8": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",
+ "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/pg-pool": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.10.1.tgz",
+ "integrity": "sha512-Tu8jMlcX+9d8+QVzKIvM/uJtp07PKr82IUOYEphaWcoBhIYkoHpLXN3qO59nAI11ripznDsEzEv8nUxBVWajGg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "pg": ">=8.0"
+ }
+ },
+ "node_modules/pg-protocol": {
+ "version": "1.10.3",
+ "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.10.3.tgz",
+ "integrity": "sha512-6DIBgBQaTKDJyxnXaLiLR8wBpQQcGWuAESkRBX/t6OwA8YsqP+iVSiond2EDy6Y/dsGk8rh/jtax3js5NeV7JQ==",
+ "license": "MIT"
+ },
+ "node_modules/pg-sdk-node": {
+ "version": "2.0.3",
+ "resolved": "https://phonepe.mycloudrepo.io/public/repositories/phonepe-pg-sdk-node/releases/v2/phonepe-pg-sdk-node.tgz",
+ "integrity": "sha512-LrSmv/sNidJa99RmPqfDgGg8X7RUkawhgzkJhZ8dd8rk4zqa5p1oFjp52jDehbfp1KwU+TxPqWQq5AvJAqMskw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "async-mutex": "^0.5.0",
+ "axios": "^1.2.1",
+ "axios-retry": "^3.2.0",
+ "class-transformer": "^0.4.0",
+ "class-transformer-validator": "^0.9.1",
+ "class-validator": "^0.14.1"
+ }
+ },
+ "node_modules/pg-types": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz",
+ "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",
+ "license": "MIT",
+ "dependencies": {
+ "pg-int8": "1.0.1",
+ "postgres-array": "~2.0.0",
+ "postgres-bytea": "~1.0.0",
+ "postgres-date": "~1.0.4",
+ "postgres-interval": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/pgpass": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz",
+ "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",
+ "license": "MIT",
+ "dependencies": {
+ "split2": "^4.1.0"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz",
+ "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pirates": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
+ "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/plist": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",
+ "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@xmldom/xmldom": "^0.8.8",
+ "base64-js": "^1.5.1",
+ "xmlbuilder": "^15.1.1"
+ },
+ "engines": {
+ "node": ">=10.4.0"
+ }
+ },
+ "node_modules/pngjs": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
+ "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/point-in-polygon": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/point-in-polygon/-/point-in-polygon-1.1.0.tgz",
+ "integrity": "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw==",
+ "license": "MIT"
+ },
+ "node_modules/point-in-polygon-hao": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.2.4.tgz",
+ "integrity": "sha512-x2pcvXeqhRHlNRdhLs/tgFapAbSSe86wa/eqmj1G6pWftbEs5aVRJhRGM6FYSUERKu0PjekJzMq0gsI2XyiclQ==",
+ "license": "MIT",
+ "dependencies": {
+ "robust-predicates": "^3.0.2"
+ }
+ },
+ "node_modules/point-in-polygon-hao/node_modules/robust-predicates": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz",
+ "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==",
+ "license": "Unlicense"
+ },
+ "node_modules/polyclip-ts": {
+ "version": "0.16.8",
+ "resolved": "https://registry.npmjs.org/polyclip-ts/-/polyclip-ts-0.16.8.tgz",
+ "integrity": "sha512-JPtKbDRuPEuAjuTdhR62Gph7Is2BS1Szx69CFOO3g71lpJDFo78k4tFyi+qFOMVPePEzdSKkpGU3NBXPHHjvKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "bignumber.js": "^9.1.0",
+ "splaytree-ts": "^1.0.2"
+ }
+ },
+ "node_modules/possible-typed-array-names": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
+ "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.6",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
+ "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.11",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/postcss-import": {
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz",
+ "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
+ "license": "MIT",
+ "dependencies": {
+ "postcss-value-parser": "^4.0.0",
+ "read-cache": "^1.0.0",
+ "resolve": "^1.1.7"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.0.0"
+ }
+ },
+ "node_modules/postcss-js": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz",
+ "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "camelcase-css": "^2.0.1"
+ },
+ "engines": {
+ "node": "^12 || ^14 || >= 16"
+ },
+ "peerDependencies": {
+ "postcss": "^8.4.21"
+ }
+ },
+ "node_modules/postcss-load-config": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz",
+ "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "lilconfig": "^3.1.1"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "jiti": ">=1.21.0",
+ "postcss": ">=8.0.9",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ },
+ "postcss": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/postcss-nested": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz",
+ "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "postcss-selector-parser": "^6.1.1"
+ },
+ "engines": {
+ "node": ">=12.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.14"
+ }
+ },
+ "node_modules/postcss-selector-parser": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
+ "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
+ "license": "MIT",
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "license": "MIT"
+ },
+ "node_modules/postgres-array": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz",
+ "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/postgres-bytea": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz",
+ "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/postgres-date": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz",
+ "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/postgres-interval": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz",
+ "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",
+ "license": "MIT",
+ "dependencies": {
+ "xtend": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/pretty-bytes": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
+ "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/pretty-format": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
+ "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/schemas": "^29.6.3",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^18.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/pretty-format/node_modules/ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/proc-log": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz",
+ "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==",
+ "license": "ISC",
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
+ "node_modules/progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/promise": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
+ "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
+ "license": "MIT",
+ "dependencies": {
+ "asap": "~2.0.3"
+ }
+ },
+ "node_modules/promise-limit": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/promise-limit/-/promise-limit-2.7.0.tgz",
+ "integrity": "sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw==",
+ "license": "ISC"
+ },
+ "node_modules/promise-retry": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",
+ "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",
+ "license": "MIT",
+ "dependencies": {
+ "err-code": "^2.0.2",
+ "retry": "^0.12.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/prompts": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
+ "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "kleur": "^3.0.3",
+ "sisteransi": "^1.0.5"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/prop-types": {
+ "version": "15.8.1",
+ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
+ "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.4.0",
+ "object-assign": "^4.1.1",
+ "react-is": "^16.13.1"
+ }
+ },
+ "node_modules/prop-types/node_modules/react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "license": "MIT"
+ },
+ "node_modules/property-expr": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz",
+ "integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==",
+ "license": "MIT"
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+ "license": "MIT"
+ },
+ "node_modules/pug": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.3.tgz",
+ "integrity": "sha512-uBi6kmc9f3SZ3PXxqcHiUZLmIXgfgWooKWXcwSGwQd2Zi5Rb0bT14+8CJjJgI8AB+nndLaNgHGrcc6bPIB665g==",
+ "license": "MIT",
+ "dependencies": {
+ "pug-code-gen": "^3.0.3",
+ "pug-filters": "^4.0.0",
+ "pug-lexer": "^5.0.1",
+ "pug-linker": "^4.0.0",
+ "pug-load": "^3.0.0",
+ "pug-parser": "^6.0.0",
+ "pug-runtime": "^3.0.1",
+ "pug-strip-comments": "^2.0.0"
+ }
+ },
+ "node_modules/pug-attrs": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz",
+ "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==",
+ "license": "MIT",
+ "dependencies": {
+ "constantinople": "^4.0.1",
+ "js-stringify": "^1.0.2",
+ "pug-runtime": "^3.0.0"
+ }
+ },
+ "node_modules/pug-code-gen": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.3.tgz",
+ "integrity": "sha512-cYQg0JW0w32Ux+XTeZnBEeuWrAY7/HNE6TWnhiHGnnRYlCgyAUPoyh9KzCMa9WhcJlJ1AtQqpEYHc+vbCzA+Aw==",
+ "license": "MIT",
+ "dependencies": {
+ "constantinople": "^4.0.1",
+ "doctypes": "^1.1.0",
+ "js-stringify": "^1.0.2",
+ "pug-attrs": "^3.0.0",
+ "pug-error": "^2.1.0",
+ "pug-runtime": "^3.0.1",
+ "void-elements": "^3.1.0",
+ "with": "^7.0.0"
+ }
+ },
+ "node_modules/pug-error": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.1.0.tgz",
+ "integrity": "sha512-lv7sU9e5Jk8IeUheHata6/UThZ7RK2jnaaNztxfPYUY+VxZyk/ePVaNZ/vwmH8WqGvDz3LrNYt/+gA55NDg6Pg==",
+ "license": "MIT"
+ },
+ "node_modules/pug-filters": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-4.0.0.tgz",
+ "integrity": "sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==",
+ "license": "MIT",
+ "dependencies": {
+ "constantinople": "^4.0.1",
+ "jstransformer": "1.0.0",
+ "pug-error": "^2.0.0",
+ "pug-walk": "^2.0.0",
+ "resolve": "^1.15.1"
+ }
+ },
+ "node_modules/pug-lexer": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-5.0.1.tgz",
+ "integrity": "sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==",
+ "license": "MIT",
+ "dependencies": {
+ "character-parser": "^2.2.0",
+ "is-expression": "^4.0.0",
+ "pug-error": "^2.0.0"
+ }
+ },
+ "node_modules/pug-linker": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-4.0.0.tgz",
+ "integrity": "sha512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw==",
+ "license": "MIT",
+ "dependencies": {
+ "pug-error": "^2.0.0",
+ "pug-walk": "^2.0.0"
+ }
+ },
+ "node_modules/pug-load": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-3.0.0.tgz",
+ "integrity": "sha512-OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4.1.1",
+ "pug-walk": "^2.0.0"
+ }
+ },
+ "node_modules/pug-parser": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-6.0.0.tgz",
+ "integrity": "sha512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw==",
+ "license": "MIT",
+ "dependencies": {
+ "pug-error": "^2.0.0",
+ "token-stream": "1.0.0"
+ }
+ },
+ "node_modules/pug-runtime": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz",
+ "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==",
+ "license": "MIT"
+ },
+ "node_modules/pug-strip-comments": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-2.0.0.tgz",
+ "integrity": "sha512-zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ==",
+ "license": "MIT",
+ "dependencies": {
+ "pug-error": "^2.0.0"
+ }
+ },
+ "node_modules/pug-walk": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-2.0.0.tgz",
+ "integrity": "sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ==",
+ "license": "MIT"
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/qrcode-terminal": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.11.0.tgz",
+ "integrity": "sha512-Uu7ii+FQy4Qf82G4xu7ShHhjhGahEpCWc3x8UavY3CTcWV+ufmmCtwkr7ZKsX42jdL0kr1B5FKUeqJvAn51jzQ==",
+ "bin": {
+ "qrcode-terminal": "bin/qrcode-terminal.js"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.14.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
+ "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/query-string": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz",
+ "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==",
+ "license": "MIT",
+ "dependencies": {
+ "decode-uri-component": "^0.2.2",
+ "filter-obj": "^1.1.0",
+ "split-on-first": "^1.0.0",
+ "strict-uri-encode": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/queue": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz",
+ "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "~2.0.3"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/quickselect": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz",
+ "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==",
+ "license": "ISC"
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.3",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
+ "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.4.24",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/razorpay": {
+ "version": "2.9.6",
+ "resolved": "https://registry.npmjs.org/razorpay/-/razorpay-2.9.6.tgz",
+ "integrity": "sha512-zsHAQzd6e1Cc6BNoCNZQaf65ElL6O6yw0wulxmoG5VQDr363fZC90Mp1V5EktVzG45yPyNomNXWlf4cQ3622gQ==",
+ "license": "MIT",
+ "dependencies": {
+ "axios": "^1.6.8"
+ }
+ },
+ "node_modules/rbush": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz",
+ "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==",
+ "license": "MIT",
+ "dependencies": {
+ "quickselect": "^2.0.0"
+ }
+ },
+ "node_modules/rc": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+ "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
+ "dependencies": {
+ "deep-extend": "^0.6.0",
+ "ini": "~1.3.0",
+ "minimist": "^1.2.0",
+ "strip-json-comments": "~2.0.1"
+ },
+ "bin": {
+ "rc": "cli.js"
+ }
+ },
+ "node_modules/rc/node_modules/strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react": {
+ "version": "19.0.0",
+ "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz",
+ "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-devtools-core": {
+ "version": "6.1.5",
+ "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-6.1.5.tgz",
+ "integrity": "sha512-ePrwPfxAnB+7hgnEr8vpKxL9cmnp7F322t8oqcPshbIQQhDKgFDW4tjhF2wjVbdXF9O/nyuy3sQWd9JGpiLPvA==",
+ "license": "MIT",
+ "dependencies": {
+ "shell-quote": "^1.6.1",
+ "ws": "^7"
+ }
+ },
+ "node_modules/react-devtools-core/node_modules/ws": {
+ "version": "7.5.10",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
+ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-dom": {
+ "version": "19.0.0",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz",
+ "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==",
+ "license": "MIT",
+ "dependencies": {
+ "scheduler": "^0.25.0"
+ },
+ "peerDependencies": {
+ "react": "^19.0.0"
+ }
+ },
+ "node_modules/react-fast-compare": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz",
+ "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==",
+ "license": "MIT"
+ },
+ "node_modules/react-freeze": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.4.tgz",
+ "integrity": "sha512-r4F0Sec0BLxWicc7HEyo2x3/2icUTrRmDjaaRyzzn+7aDyFZliszMDOgLVwSnQnYENOlL1o569Ze2HZefk8clA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.0"
+ }
+ },
+ "node_modules/react-hook-form": {
+ "version": "7.68.0",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.68.0.tgz",
+ "integrity": "sha512-oNN3fjrZ/Xo40SWlHf1yCjlMK417JxoSJVUXQjGdvdRCU07NTFei1i1f8ApUAts+IVh14e4EdakeLEA+BEAs/Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/react-hook-form"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17 || ^18 || ^19"
+ }
+ },
+ "node_modules/react-is": {
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
+ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
+ "license": "MIT"
+ },
+ "node_modules/react-native": {
+ "version": "0.79.6",
+ "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.79.6.tgz",
+ "integrity": "sha512-kvIWSmf4QPfY41HC25TR285N7Fv0Pyn3DAEK8qRL9dA35usSaxsJkHfw+VqnonqJjXOaoKCEanwudRAJ60TBGA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jest/create-cache-key-function": "^29.7.0",
+ "@react-native/assets-registry": "0.79.6",
+ "@react-native/codegen": "0.79.6",
+ "@react-native/community-cli-plugin": "0.79.6",
+ "@react-native/gradle-plugin": "0.79.6",
+ "@react-native/js-polyfills": "0.79.6",
+ "@react-native/normalize-colors": "0.79.6",
+ "@react-native/virtualized-lists": "0.79.6",
+ "abort-controller": "^3.0.0",
+ "anser": "^1.4.9",
+ "ansi-regex": "^5.0.0",
+ "babel-jest": "^29.7.0",
+ "babel-plugin-syntax-hermes-parser": "0.25.1",
+ "base64-js": "^1.5.1",
+ "chalk": "^4.0.0",
+ "commander": "^12.0.0",
+ "event-target-shim": "^5.0.1",
+ "flow-enums-runtime": "^0.0.6",
+ "glob": "^7.1.1",
+ "invariant": "^2.2.4",
+ "jest-environment-node": "^29.7.0",
+ "memoize-one": "^5.0.0",
+ "metro-runtime": "^0.82.0",
+ "metro-source-map": "^0.82.0",
+ "nullthrows": "^1.1.1",
+ "pretty-format": "^29.7.0",
+ "promise": "^8.3.0",
+ "react-devtools-core": "^6.1.1",
+ "react-refresh": "^0.14.0",
+ "regenerator-runtime": "^0.13.2",
+ "scheduler": "0.25.0",
+ "semver": "^7.1.3",
+ "stacktrace-parser": "^0.1.10",
+ "whatwg-fetch": "^3.0.0",
+ "ws": "^6.2.3",
+ "yargs": "^17.6.2"
+ },
+ "bin": {
+ "react-native": "cli.js"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@types/react": "^19.0.0",
+ "react": "^19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-native-draggable-flatlist": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/react-native-draggable-flatlist/-/react-native-draggable-flatlist-4.0.3.tgz",
+ "integrity": "sha512-2F4x5BFieWdGq9SetD2nSAR7s7oQCSgNllYgERRXXtNfSOuAGAVbDb/3H3lP0y5f7rEyNwabKorZAD/SyyNbDw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/preset-typescript": "^7.17.12"
+ },
+ "peerDependencies": {
+ "react-native": ">=0.64.0",
+ "react-native-gesture-handler": ">=2.0.0",
+ "react-native-reanimated": ">=2.8.0"
+ }
+ },
+ "node_modules/react-native-drawer-layout": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/react-native-drawer-layout/-/react-native-drawer-layout-4.2.0.tgz",
+ "integrity": "sha512-XFGK5RMcVhEqr2F4iH/cTXrcTm1uK3gIBNFPqHNO7rCXuXZTPBbQYA5yc9/Lqgw2KNQ3sAeHKvW6/WoTURo/eA==",
+ "license": "MIT",
+ "dependencies": {
+ "color": "^4.2.3",
+ "use-latest-callback": "^0.2.4"
+ },
+ "peerDependencies": {
+ "react": ">= 18.2.0",
+ "react-native": "*",
+ "react-native-gesture-handler": ">= 2.0.0",
+ "react-native-reanimated": ">= 2.0.0"
+ }
+ },
+ "node_modules/react-native-edge-to-edge": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/react-native-edge-to-edge/-/react-native-edge-to-edge-1.6.0.tgz",
+ "integrity": "sha512-2WCNdE3Qd6Fwg9+4BpbATUxCLcouF6YRY7K+J36KJ4l3y+tWN6XCqAC4DuoGblAAbb2sLkhEDp4FOlbOIot2Og==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-element-dropdown": {
+ "version": "2.12.4",
+ "resolved": "https://registry.npmjs.org/react-native-element-dropdown/-/react-native-element-dropdown-2.12.4.tgz",
+ "integrity": "sha512-abZc5SVji9FIt7fjojRYrbuvp03CoeZJrgvezQoDoSOrpiTqkX69ix5m+j06W2AVncA0VWvbT+vCMam8SoVadw==",
+ "license": "MIT",
+ "dependencies": {
+ "lodash": "^4.17.21"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-gesture-handler": {
+ "version": "2.24.0",
+ "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.24.0.tgz",
+ "integrity": "sha512-ZdWyOd1C8axKJHIfYxjJKCcxjWEpUtUWgTOVY2wynbiveSQDm8X/PDyAKXSer/GOtIpjudUbACOndZXCN3vHsw==",
+ "license": "MIT",
+ "dependencies": {
+ "@egjs/hammerjs": "^2.0.17",
+ "hoist-non-react-statics": "^3.3.0",
+ "invariant": "^2.2.4"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-iphone-x-helper": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz",
+ "integrity": "sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react-native": ">=0.42.0"
+ }
+ },
+ "node_modules/react-native-is-edge-to-edge": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.2.1.tgz",
+ "integrity": "sha512-FLbPWl/MyYQWz+KwqOZsSyj2JmLKglHatd3xLZWskXOpRaio4LfEDEz8E/A6uD8QoTHW6Aobw1jbEwK7KMgR7Q==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-keyboard-aware-scroll-view": {
+ "version": "0.9.5",
+ "resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.9.5.tgz",
+ "integrity": "sha512-XwfRn+T/qBH9WjTWIBiJD2hPWg0yJvtaEw6RtPCa5/PYHabzBaWxYBOl0usXN/368BL1XktnZPh8C2lmTpOREA==",
+ "license": "MIT",
+ "dependencies": {
+ "prop-types": "^15.6.2",
+ "react-native-iphone-x-helper": "^1.0.3"
+ },
+ "peerDependencies": {
+ "react-native": ">=0.48.4"
+ }
+ },
+ "node_modules/react-native-pager-view": {
+ "version": "6.9.1",
+ "resolved": "https://registry.npmjs.org/react-native-pager-view/-/react-native-pager-view-6.9.1.tgz",
+ "integrity": "sha512-uUT0MMMbNtoSbxe9pRvdJJKEi9snjuJ3fXlZhG8F2vVMOBJVt/AFtqMPUHu9yMflmqOr08PewKzj9EPl/Yj+Gw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-paper": {
+ "version": "5.14.5",
+ "resolved": "https://registry.npmjs.org/react-native-paper/-/react-native-paper-5.14.5.tgz",
+ "integrity": "sha512-eaIH5bUQjJ/mYm4AkI6caaiyc7BcHDwX6CqNDi6RIxfxfWxROsHpll1oBuwn/cFvknvA8uEAkqLk/vzVihI3AQ==",
+ "license": "MIT",
+ "workspaces": [
+ "example",
+ "docs"
+ ],
+ "dependencies": {
+ "@callstack/react-theme-provider": "^3.0.9",
+ "color": "^3.1.2",
+ "use-latest-callback": "^0.2.3"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*",
+ "react-native-safe-area-context": "*"
+ }
+ },
+ "node_modules/react-native-paper/node_modules/color": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
+ "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^1.9.3",
+ "color-string": "^1.6.0"
+ }
+ },
+ "node_modules/react-native-paper/node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/react-native-paper/node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "license": "MIT"
+ },
+ "node_modules/react-native-phonepe-pg": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/react-native-phonepe-pg/-/react-native-phonepe-pg-3.1.1.tgz",
+ "integrity": "sha512-Qd2IS9cPQzYoB1D1YGEKMChMX87+nBL1Nv7eOXpQorv/UZmL+Mypv1N87jro1uiHUbz4ZsDNWyJih2TjNNMUmQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-razorpay": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/react-native-razorpay/-/react-native-razorpay-2.3.1.tgz",
+ "integrity": "sha512-aEod2YigiWx9Vik+2YRpTh9kNKK9KZbfhrRpk5tU8z8ZPDdLt57rRsqd7lVuDybqqO6nLY6ughPjMN+FPyX8Ag==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": ">=16.8.0",
+ "react-native": ">=0.66.0"
+ }
+ },
+ "node_modules/react-native-reanimated": {
+ "version": "3.17.5",
+ "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-3.17.5.tgz",
+ "integrity": "sha512-SxBK7wQfJ4UoWoJqQnmIC7ZjuNgVb9rcY5Xc67upXAFKftWg0rnkknTw6vgwnjRcvYThrjzUVti66XoZdDJGtw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/plugin-transform-arrow-functions": "^7.0.0-0",
+ "@babel/plugin-transform-class-properties": "^7.0.0-0",
+ "@babel/plugin-transform-classes": "^7.0.0-0",
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.0.0-0",
+ "@babel/plugin-transform-optional-chaining": "^7.0.0-0",
+ "@babel/plugin-transform-shorthand-properties": "^7.0.0-0",
+ "@babel/plugin-transform-template-literals": "^7.0.0-0",
+ "@babel/plugin-transform-unicode-regex": "^7.0.0-0",
+ "@babel/preset-typescript": "^7.16.7",
+ "convert-source-map": "^2.0.0",
+ "invariant": "^2.2.4",
+ "react-native-is-edge-to-edge": "1.1.7"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0",
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-reanimated/node_modules/react-native-is-edge-to-edge": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.1.7.tgz",
+ "integrity": "sha512-EH6i7E8epJGIcu7KpfXYXiV2JFIYITtq+rVS8uEb+92naMRBdxhTuS8Wn2Q7j9sqyO0B+Xbaaf9VdipIAmGW4w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-safe-area-context": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-5.4.0.tgz",
+ "integrity": "sha512-JaEThVyJcLhA+vU0NU8bZ0a1ih6GiF4faZ+ArZLqpYbL6j7R3caRqj+mE3lEtKCuHgwjLg3bCxLL1GPUJZVqUA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-screens": {
+ "version": "4.11.1",
+ "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-4.11.1.tgz",
+ "integrity": "sha512-F0zOzRVa3ptZfLpD0J8ROdo+y1fEPw+VBFq1MTY/iyDu08al7qFUO5hLMd+EYMda5VXGaTFCa8q7bOppUszhJw==",
+ "license": "MIT",
+ "dependencies": {
+ "react-freeze": "^1.0.0",
+ "react-native-is-edge-to-edge": "^1.1.7",
+ "warn-once": "^0.1.0"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-svg": {
+ "version": "15.11.2",
+ "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-15.11.2.tgz",
+ "integrity": "sha512-+YfF72IbWQUKzCIydlijV1fLuBsQNGMT6Da2kFlo1sh+LE3BIm/2Q7AR1zAAR6L0BFLi1WaQPLfFUC9bNZpOmw==",
+ "license": "MIT",
+ "dependencies": {
+ "css-select": "^5.1.0",
+ "css-tree": "^1.1.3",
+ "warn-once": "0.1.1"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-tab-view": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-4.2.2.tgz",
+ "integrity": "sha512-NXtrG6OchvbGjsvbySJGVocXxo4Y2vA17ph4rAaWtA2jh+AasD8OyikKBRg2SmllEfeQ+GEhcKe8kulHv8BhTg==",
+ "license": "MIT",
+ "dependencies": {
+ "use-latest-callback": "^0.2.4"
+ },
+ "peerDependencies": {
+ "react": ">= 18.2.0",
+ "react-native": "*",
+ "react-native-pager-view": ">= 6.0.0"
+ }
+ },
+ "node_modules/react-native-toast-message": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/react-native-toast-message/-/react-native-toast-message-2.3.3.tgz",
+ "integrity": "sha512-4IIUHwUPvKHu4gjD0Vj2aGQzqPATiblL1ey8tOqsxOWRPGGu52iIbL8M/mCz4uyqecvPdIcMY38AfwRuUADfQQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native-web": {
+ "version": "0.20.0",
+ "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.20.0.tgz",
+ "integrity": "sha512-OOSgrw+aON6R3hRosCau/xVxdLzbjEcsLysYedka0ZON4ZZe6n9xgeN9ZkoejhARM36oTlUgHIQqxGutEJ9Wxg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.18.6",
+ "@react-native/normalize-colors": "^0.74.1",
+ "fbjs": "^3.0.4",
+ "inline-style-prefixer": "^7.0.1",
+ "memoize-one": "^6.0.0",
+ "nullthrows": "^1.1.1",
+ "postcss-value-parser": "^4.2.0",
+ "styleq": "^0.1.3"
+ },
+ "peerDependencies": {
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/react-native-web/node_modules/@react-native/normalize-colors": {
+ "version": "0.74.89",
+ "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.74.89.tgz",
+ "integrity": "sha512-qoMMXddVKVhZ8PA1AbUCk83trpd6N+1nF2A6k1i6LsQObyS92fELuk8kU/lQs6M7BsMHwqyLCpQJ1uFgNvIQXg==",
+ "license": "MIT"
+ },
+ "node_modules/react-native-web/node_modules/memoize-one": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz",
+ "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==",
+ "license": "MIT"
+ },
+ "node_modules/react-native-webview": {
+ "version": "13.13.5",
+ "resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-13.13.5.tgz",
+ "integrity": "sha512-MfC2B+woL4Hlj2WCzcb1USySKk+SteXnUKmKktOk/H/AQy5+LuVdkPKm8SknJ0/RxaxhZ48WBoTRGaqgR137hw==",
+ "license": "MIT",
+ "dependencies": {
+ "escape-string-regexp": "^4.0.0",
+ "invariant": "2.2.4"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "*"
+ }
+ },
+ "node_modules/react-native/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/react-native/node_modules/commander": {
+ "version": "12.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/react-native/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Glob versions prior to v9 are no longer supported",
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/react-native/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/react-native/node_modules/promise": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz",
+ "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==",
+ "license": "MIT",
+ "dependencies": {
+ "asap": "~2.0.6"
+ }
+ },
+ "node_modules/react-native/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/react-native/node_modules/ws": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz",
+ "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==",
+ "license": "MIT",
+ "dependencies": {
+ "async-limiter": "~1.0.0"
+ }
+ },
+ "node_modules/react-refresh": {
+ "version": "0.14.2",
+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz",
+ "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/read-cache": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
+ "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
+ "license": "MIT",
+ "dependencies": {
+ "pify": "^2.3.0"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "license": "MIT",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/readdirp/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/redis": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/redis/-/redis-5.10.0.tgz",
+ "integrity": "sha512-0/Y+7IEiTgVGPrLFKy8oAEArSyEJkU0zvgV5xyi9NzNQ+SLZmyFbUsWIbgPcd4UdUh00opXGKlXJwMmsis5Byw==",
+ "license": "MIT",
+ "dependencies": {
+ "@redis/bloom": "5.10.0",
+ "@redis/client": "5.10.0",
+ "@redis/json": "5.10.0",
+ "@redis/search": "5.10.0",
+ "@redis/time-series": "5.10.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/redis-errors": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz",
+ "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/redis-parser": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz",
+ "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==",
+ "license": "MIT",
+ "dependencies": {
+ "redis-errors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/reflect.getprototypeof": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
+ "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.9",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.7",
+ "get-proto": "^1.0.1",
+ "which-builtin-type": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/regenerate": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
+ "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
+ "license": "MIT"
+ },
+ "node_modules/regenerate-unicode-properties": {
+ "version": "10.2.2",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz",
+ "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==",
+ "license": "MIT",
+ "dependencies": {
+ "regenerate": "^1.4.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/regenerator-runtime": {
+ "version": "0.13.11",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
+ "license": "MIT"
+ },
+ "node_modules/regexp.prototype.flags": {
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
+ "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-errors": "^1.3.0",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "set-function-name": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/regexpu-core": {
+ "version": "6.4.0",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz",
+ "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==",
+ "license": "MIT",
+ "dependencies": {
+ "regenerate": "^1.4.2",
+ "regenerate-unicode-properties": "^10.2.2",
+ "regjsgen": "^0.8.0",
+ "regjsparser": "^0.13.0",
+ "unicode-match-property-ecmascript": "^2.0.0",
+ "unicode-match-property-value-ecmascript": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/regjsgen": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz",
+ "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==",
+ "license": "MIT"
+ },
+ "node_modules/regjsparser": {
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz",
+ "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "jsesc": "~3.1.0"
+ },
+ "bin": {
+ "regjsparser": "bin/parser"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/requireg": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/requireg/-/requireg-0.2.2.tgz",
+ "integrity": "sha512-nYzyjnFcPNGR3lx9lwPPPnuQxv6JWEZd2Ci0u9opN7N5zUEPIhY/GbL3vMGOr2UXwEg9WwSyV9X9Y/kLFgPsOg==",
+ "dependencies": {
+ "nested-error-stacks": "~2.0.1",
+ "rc": "~1.2.7",
+ "resolve": "~1.7.1"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/requireg/node_modules/resolve": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
+ "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
+ "license": "MIT",
+ "dependencies": {
+ "path-parse": "^1.0.5"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.11",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
+ "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.16.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "devOptional": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
+ "node_modules/resolve-workspace-root": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-workspace-root/-/resolve-workspace-root-2.0.0.tgz",
+ "integrity": "sha512-IsaBUZETJD5WsI11Wt8PKHwaIe45or6pwNc8yflvLJ4DWtImK9kuLoH5kUva/2Mmx/RdIyr4aONNSa2v9LTJsw==",
+ "license": "MIT"
+ },
+ "node_modules/resolve.exports": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz",
+ "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/restore-cursor": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
+ "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==",
+ "license": "MIT",
+ "dependencies": {
+ "onetime": "^2.0.0",
+ "signal-exit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/restore-cursor/node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "license": "ISC"
+ },
+ "node_modules/retry": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
+ "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
+ "license": "MIT",
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz",
+ "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "glob": "^13.0.0",
+ "package-json-from-dist": "^1.0.1"
+ },
+ "bin": {
+ "rimraf": "dist/esm/bin.mjs"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/rimraf/node_modules/glob": {
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz",
+ "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "minimatch": "^10.1.1",
+ "minipass": "^7.1.2",
+ "path-scurry": "^2.0.0"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/rimraf/node_modules/lru-cache": {
+ "version": "11.2.4",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz",
+ "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/rimraf/node_modules/minimatch": {
+ "version": "10.1.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz",
+ "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "@isaacs/brace-expansion": "^5.0.0"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/rimraf/node_modules/path-scurry": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz",
+ "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "lru-cache": "^11.0.0",
+ "minipass": "^7.1.2"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/robust-predicates": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-2.0.4.tgz",
+ "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==",
+ "license": "Unlicense"
+ },
+ "node_modules/rollup": {
+ "version": "4.53.3",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.3.tgz",
+ "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.8"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.53.3",
+ "@rollup/rollup-android-arm64": "4.53.3",
+ "@rollup/rollup-darwin-arm64": "4.53.3",
+ "@rollup/rollup-darwin-x64": "4.53.3",
+ "@rollup/rollup-freebsd-arm64": "4.53.3",
+ "@rollup/rollup-freebsd-x64": "4.53.3",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.53.3",
+ "@rollup/rollup-linux-arm-musleabihf": "4.53.3",
+ "@rollup/rollup-linux-arm64-gnu": "4.53.3",
+ "@rollup/rollup-linux-arm64-musl": "4.53.3",
+ "@rollup/rollup-linux-loong64-gnu": "4.53.3",
+ "@rollup/rollup-linux-ppc64-gnu": "4.53.3",
+ "@rollup/rollup-linux-riscv64-gnu": "4.53.3",
+ "@rollup/rollup-linux-riscv64-musl": "4.53.3",
+ "@rollup/rollup-linux-s390x-gnu": "4.53.3",
+ "@rollup/rollup-linux-x64-gnu": "4.53.3",
+ "@rollup/rollup-linux-x64-musl": "4.53.3",
+ "@rollup/rollup-openharmony-arm64": "4.53.3",
+ "@rollup/rollup-win32-arm64-msvc": "4.53.3",
+ "@rollup/rollup-win32-ia32-msvc": "4.53.3",
+ "@rollup/rollup-win32-x64-gnu": "4.53.3",
+ "@rollup/rollup-win32-x64-msvc": "4.53.3",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/router": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "is-promise": "^4.0.0",
+ "parseurl": "^1.3.3",
+ "path-to-regexp": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/router/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/router/node_modules/is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "license": "MIT"
+ },
+ "node_modules/router/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/router/node_modules/path-to-regexp": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
+ "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/safe-array-concat": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz",
+ "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.2",
+ "get-intrinsic": "^1.2.6",
+ "has-symbols": "^1.1.0",
+ "isarray": "^2.0.5"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/safe-push-apply": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",
+ "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "isarray": "^2.0.5"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/safe-regex-test": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz",
+ "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "is-regex": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
+ "node_modules/sax": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz",
+ "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==",
+ "license": "BlueOak-1.0.0"
+ },
+ "node_modules/scheduler": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz",
+ "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/send": {
+ "version": "0.19.1",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.1.tgz",
+ "integrity": "sha512-p4rRk4f23ynFEfcD9LA0xRYngj+IyGiEYyqqOak8kaN0TvNmuxC2dcVeBn62GpCeR2CpWqyHCNScTP91QbAVFg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/send/node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/serialize-error": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz",
+ "integrity": "sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/seroval": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.4.0.tgz",
+ "integrity": "sha512-BdrNXdzlofomLTiRnwJTSEAaGKyHHZkbMXIywOh7zlzp4uZnXErEwl9XZ+N1hJSNpeTtNxWvVwN0wUzAIQ4Hpg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/seroval-plugins": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.4.0.tgz",
+ "integrity": "sha512-zir1aWzoiax6pbBVjoYVd0O1QQXgIL3eVGBMsBsNmM8Ukq90yGaWlfx0AB9dTS8GPqrOrbXn79vmItCUP9U3BQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "seroval": "^1.0"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "1.16.2",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
+ "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.19.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/serve-static/node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/serve-static/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/serve-static/node_modules/send": {
+ "version": "0.19.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
+ "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/serve-static/node_modules/send/node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/serve-static/node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/server-only": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz",
+ "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==",
+ "license": "MIT"
+ },
+ "node_modules/set-function-length": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/set-function-name": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
+ "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "functions-have-names": "^1.2.3",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/set-proto": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz",
+ "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
+ "license": "MIT"
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/sf-symbols-typescript": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/sf-symbols-typescript/-/sf-symbols-typescript-2.2.0.tgz",
+ "integrity": "sha512-TPbeg0b7ylrswdGCji8FRGFAKuqbpQlLbL8SOle3j1iHSs5Ob5mhvMAxWN2UItOjgALAB5Zp3fmMfj8mbWvXKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/shallowequal": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
+ "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
+ "license": "MIT"
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shell-quote": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz",
+ "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/simple-plist": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.1.tgz",
+ "integrity": "sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw==",
+ "license": "MIT",
+ "dependencies": {
+ "bplist-creator": "0.1.0",
+ "bplist-parser": "0.3.1",
+ "plist": "^3.0.5"
+ }
+ },
+ "node_modules/simple-plist/node_modules/bplist-parser": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.1.tgz",
+ "integrity": "sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA==",
+ "license": "MIT",
+ "dependencies": {
+ "big-integer": "1.6.x"
+ },
+ "engines": {
+ "node": ">= 5.10.0"
+ }
+ },
+ "node_modules/simple-swizzle": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz",
+ "integrity": "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==",
+ "license": "MIT",
+ "dependencies": {
+ "is-arrayish": "^0.3.1"
+ }
+ },
+ "node_modules/simple-swizzle/node_modules/is-arrayish": {
+ "version": "0.3.4",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz",
+ "integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==",
+ "license": "MIT"
+ },
+ "node_modules/sisteransi": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
+ "license": "MIT"
+ },
+ "node_modules/skmeans": {
+ "version": "0.9.7",
+ "resolved": "https://registry.npmjs.org/skmeans/-/skmeans-0.9.7.tgz",
+ "integrity": "sha512-hNj1/oZ7ygsfmPZ7ZfN5MUBRoGg1gtpnImuJBgLO0ljQ67DtJuiQaiYdS4lUA6s0KCwnPhGivtC/WRwIZLkHyg==",
+ "license": "MIT"
+ },
+ "node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/slugify": {
+ "version": "1.6.6",
+ "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.6.tgz",
+ "integrity": "sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/solid-js": {
+ "version": "1.9.10",
+ "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.10.tgz",
+ "integrity": "sha512-Coz956cos/EPDlhs6+jsdTxKuJDPT7B5SVIWgABwROyxjY7Xbr8wkzD68Et+NxnV7DLJ3nJdAC2r9InuV/4Jew==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "csstype": "^3.1.0",
+ "seroval": "~1.3.0",
+ "seroval-plugins": "~1.3.0"
+ }
+ },
+ "node_modules/solid-js/node_modules/seroval": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.3.2.tgz",
+ "integrity": "sha512-RbcPH1n5cfwKrru7v7+zrZvjLurgHhGyso3HTyGtRivGWgYjbOmGuivCQaORNELjNONoK35nj28EoWul9sb1zQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/solid-js/node_modules/seroval-plugins": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.3.3.tgz",
+ "integrity": "sha512-16OL3NnUBw8JG1jBLUoZJsLnQq0n5Ua6aHalhJK4fMQkz1lqR7Osz1sA30trBtd9VUDc2NgkuRCn8+/pBwqZ+w==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "seroval": "^1.0"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/source-map-support/node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/splaytree-ts": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/splaytree-ts/-/splaytree-ts-1.0.2.tgz",
+ "integrity": "sha512-0kGecIZNIReCSiznK3uheYB8sbstLjCZLiwcQwbmLhgHJj2gz6OnSPkVzJQCMnmEz1BQ4gPK59ylhBoEWOhGNA==",
+ "license": "BDS-3-Clause"
+ },
+ "node_modules/split-on-first": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
+ "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/split2": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
+ "license": "ISC",
+ "engines": {
+ "node": ">= 10.x"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/stable-hash": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",
+ "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/stack-utils": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
+ "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
+ "license": "MIT",
+ "dependencies": {
+ "escape-string-regexp": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/stack-utils/node_modules/escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/stackframe": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz",
+ "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==",
+ "license": "MIT"
+ },
+ "node_modules/stacktrace-parser": {
+ "version": "0.1.11",
+ "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.11.tgz",
+ "integrity": "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg==",
+ "license": "MIT",
+ "dependencies": {
+ "type-fest": "^0.7.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/standard-as-callback": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz",
+ "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==",
+ "license": "MIT"
+ },
+ "node_modules/statuses": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/stop-iteration-iterator": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",
+ "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "internal-slot": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/stream-buffers": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
+ "integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==",
+ "license": "Unlicense",
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/streamsearch": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
+ "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/strict-uri-encode": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
+ "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "node_modules/string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+ "license": "MIT",
+ "dependencies": {
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/string-width-cjs": {
+ "name": "string-width",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-width-cjs/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/string-width-cjs/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string.prototype.matchall": {
+ "version": "4.0.12",
+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz",
+ "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.6",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.6",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "internal-slot": "^1.1.0",
+ "regexp.prototype.flags": "^1.5.3",
+ "set-function-name": "^2.0.2",
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.repeat": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz",
+ "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
+ }
+ },
+ "node_modules/string.prototype.trim": {
+ "version": "1.2.10",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
+ "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.2",
+ "define-data-property": "^1.1.4",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.5",
+ "es-object-atoms": "^1.0.0",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimend": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz",
+ "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.2",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimstart": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
+ "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz",
+ "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/strip-ansi-cjs": {
+ "name": "strip-ansi",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi/node_modules/ansi-regex": {
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/strnum": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.2.tgz",
+ "integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/NaturalIntelligence"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/structured-headers": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/structured-headers/-/structured-headers-0.4.1.tgz",
+ "integrity": "sha512-0MP/Cxx5SzeeZ10p/bZI0S6MpgD+yxAhi1BOQ34jgnMXsCq3j1t6tQnZu+KdlL7dvJTLT3g9xN8tl10TqgFMcg==",
+ "license": "MIT"
+ },
+ "node_modules/styleq": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/styleq/-/styleq-0.1.3.tgz",
+ "integrity": "sha512-3ZUifmCDCQanjeej1f6kyl/BeP/Vae5EYkQ9iJfUm/QwZvlgnZzyflqAsAWYURdtea8Vkvswu2GrC57h3qffcA==",
+ "license": "MIT"
+ },
+ "node_modules/sucrase": {
+ "version": "3.35.0",
+ "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz",
+ "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "commander": "^4.0.0",
+ "glob": "^10.3.10",
+ "lines-and-columns": "^1.1.6",
+ "mz": "^2.7.0",
+ "pirates": "^4.0.1",
+ "ts-interface-checker": "^0.1.9"
+ },
+ "bin": {
+ "sucrase": "bin/sucrase",
+ "sucrase-node": "bin/sucrase-node"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/sucrase/node_modules/commander": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/superjson": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.6.tgz",
+ "integrity": "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==",
+ "license": "MIT",
+ "dependencies": {
+ "copy-anything": "^4"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-hyperlinks": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz",
+ "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==",
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0",
+ "supports-color": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/sweepline-intersections": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/sweepline-intersections/-/sweepline-intersections-1.5.0.tgz",
+ "integrity": "sha512-AoVmx72QHpKtItPu72TzFL+kcYjd67BPLDoR0LarIk+xyaRg+pDTMFXndIEvZf9xEKnJv6JdhgRMnocoG0D3AQ==",
+ "license": "MIT",
+ "dependencies": {
+ "tinyqueue": "^2.0.0"
+ }
+ },
+ "node_modules/symbuyote-info-site": {
+ "resolved": "apps/info-site",
+ "link": true
+ },
+ "node_modules/tailwind-merge": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.0.tgz",
+ "integrity": "sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/dcastil"
+ }
+ },
+ "node_modules/tailwindcss": {
+ "version": "3.4.19",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz",
+ "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@alloc/quick-lru": "^5.2.0",
+ "arg": "^5.0.2",
+ "chokidar": "^3.6.0",
+ "didyoumean": "^1.2.2",
+ "dlv": "^1.1.3",
+ "fast-glob": "^3.3.2",
+ "glob-parent": "^6.0.2",
+ "is-glob": "^4.0.3",
+ "jiti": "^1.21.7",
+ "lilconfig": "^3.1.3",
+ "micromatch": "^4.0.8",
+ "normalize-path": "^3.0.0",
+ "object-hash": "^3.0.0",
+ "picocolors": "^1.1.1",
+ "postcss": "^8.4.47",
+ "postcss-import": "^15.1.0",
+ "postcss-js": "^4.0.1",
+ "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0",
+ "postcss-nested": "^6.2.0",
+ "postcss-selector-parser": "^6.1.2",
+ "resolve": "^1.22.8",
+ "sucrase": "^3.35.0"
+ },
+ "bin": {
+ "tailwind": "lib/cli.js",
+ "tailwindcss": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/tailwindcss-animate": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz",
+ "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "tailwindcss": ">=3.0.0 || insiders"
+ }
+ },
+ "node_modules/tar": {
+ "version": "7.5.2",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz",
+ "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==",
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "@isaacs/fs-minipass": "^4.0.0",
+ "chownr": "^3.0.0",
+ "minipass": "^7.1.2",
+ "minizlib": "^3.1.0",
+ "yallist": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tar/node_modules/yallist": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
+ "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/temp-dir": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz",
+ "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/terminal-link": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz",
+ "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-escapes": "^4.2.1",
+ "supports-hyperlinks": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/terser": {
+ "version": "5.44.1",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz",
+ "integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "@jridgewell/source-map": "^0.3.3",
+ "acorn": "^8.15.0",
+ "commander": "^2.20.0",
+ "source-map-support": "~0.5.20"
+ },
+ "bin": {
+ "terser": "bin/terser"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/terser/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "license": "MIT"
+ },
+ "node_modules/test-exclude": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
+ "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
+ "license": "ISC",
+ "dependencies": {
+ "@istanbuljs/schema": "^0.1.2",
+ "glob": "^7.1.4",
+ "minimatch": "^3.0.4"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/test-exclude/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/test-exclude/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Glob versions prior to v9 are no longer supported",
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/test-exclude/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/thenify": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
+ "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
+ "license": "MIT",
+ "dependencies": {
+ "any-promise": "^1.0.0"
+ }
+ },
+ "node_modules/thenify-all": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
+ "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
+ "license": "MIT",
+ "dependencies": {
+ "thenify": ">= 3.1.0 < 4"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/throat": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz",
+ "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==",
+ "license": "MIT"
+ },
+ "node_modules/tiny-case": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz",
+ "integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==",
+ "license": "MIT"
+ },
+ "node_modules/tiny-invariant": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
+ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==",
+ "license": "MIT"
+ },
+ "node_modules/tiny-warning": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
+ "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==",
+ "license": "MIT"
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.15",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
+ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tinyglobby/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/tinyqueue": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz",
+ "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==",
+ "license": "ISC"
+ },
+ "node_modules/tmpl": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
+ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/token-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-1.0.0.tgz",
+ "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==",
+ "license": "MIT"
+ },
+ "node_modules/topojson-client": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz",
+ "integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==",
+ "license": "ISC",
+ "dependencies": {
+ "commander": "2"
+ },
+ "bin": {
+ "topo2geo": "bin/topo2geo",
+ "topomerge": "bin/topomerge",
+ "topoquantize": "bin/topoquantize"
+ }
+ },
+ "node_modules/topojson-client/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "license": "MIT"
+ },
+ "node_modules/topojson-server": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/topojson-server/-/topojson-server-3.0.1.tgz",
+ "integrity": "sha512-/VS9j/ffKr2XAOjlZ9CgyyeLmgJ9dMwq6Y0YEON8O7p/tGGk+dCWnrE03zEdu7i4L7YsFZLEPZPzCvcB7lEEXw==",
+ "license": "ISC",
+ "dependencies": {
+ "commander": "2"
+ },
+ "bin": {
+ "geo2topo": "bin/geo2topo"
+ }
+ },
+ "node_modules/topojson-server/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "license": "MIT"
+ },
+ "node_modules/toposort": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz",
+ "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==",
+ "license": "MIT"
+ },
+ "node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+ "license": "MIT"
+ },
+ "node_modules/tree-kill": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
+ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "tree-kill": "cli.js"
+ }
+ },
+ "node_modules/ts-api-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz",
+ "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.12"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4"
+ }
+ },
+ "node_modules/ts-interface-checker": {
+ "version": "0.1.13",
+ "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
+ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/ts-node": {
+ "version": "10.9.2",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
+ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js",
+ "ts-node-cwd": "dist/bin-cwd.js",
+ "ts-node-esm": "dist/bin-esm.js",
+ "ts-node-script": "dist/bin-script.js",
+ "ts-node-transpile-only": "dist/bin-transpile.js",
+ "ts-script": "dist/bin-script-deprecated.js"
+ },
+ "peerDependencies": {
+ "@swc/core": ">=1.2.50",
+ "@swc/wasm": ">=1.2.50",
+ "@types/node": "*",
+ "typescript": ">=2.7"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "@swc/wasm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ts-node-dev": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-2.0.0.tgz",
+ "integrity": "sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "chokidar": "^3.5.1",
+ "dynamic-dedupe": "^0.3.0",
+ "minimist": "^1.2.6",
+ "mkdirp": "^1.0.4",
+ "resolve": "^1.0.0",
+ "rimraf": "^2.6.1",
+ "source-map-support": "^0.5.12",
+ "tree-kill": "^1.2.2",
+ "ts-node": "^10.4.0",
+ "tsconfig": "^7.0.0"
+ },
+ "bin": {
+ "ts-node-dev": "lib/bin.js",
+ "tsnd": "lib/bin.js"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "peerDependencies": {
+ "node-notifier": "*",
+ "typescript": "*"
+ },
+ "peerDependenciesMeta": {
+ "node-notifier": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ts-node-dev/node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/ts-node-dev/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Glob versions prior to v9 are no longer supported",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/ts-node-dev/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/ts-node-dev/node_modules/rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "deprecated": "Rimraf versions prior to v4 are no longer supported",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ }
+ },
+ "node_modules/ts-node/node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/tsconfig": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz",
+ "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/strip-bom": "^3.0.0",
+ "@types/strip-json-comments": "0.0.30",
+ "strip-bom": "^3.0.0",
+ "strip-json-comments": "^2.0.0"
+ }
+ },
+ "node_modules/tsconfig-paths": {
+ "version": "3.15.0",
+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
+ "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/json5": "^0.0.29",
+ "json5": "^1.0.2",
+ "minimist": "^1.2.6",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "node_modules/tsconfig-paths/node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
+ "node_modules/tsconfig/node_modules/strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "license": "0BSD"
+ },
+ "node_modules/tsx": {
+ "version": "4.21.0",
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz",
+ "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "~0.27.0",
+ "get-tsconfig": "^4.7.5"
+ },
+ "bin": {
+ "tsx": "dist/cli.mjs"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/aix-ppc64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.1.tgz",
+ "integrity": "sha512-HHB50pdsBX6k47S4u5g/CaLjqS3qwaOVE5ILsq64jyzgMhLuCuZ8rGzM9yhsAjfjkbgUPMzZEPa7DAp7yz6vuA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-arm": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.1.tgz",
+ "integrity": "sha512-kFqa6/UcaTbGm/NncN9kzVOODjhZW8e+FRdSeypWe6j33gzclHtwlANs26JrupOntlcWmB0u8+8HZo8s7thHvg==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-arm64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.1.tgz",
+ "integrity": "sha512-45fuKmAJpxnQWixOGCrS+ro4Uvb4Re9+UTieUY2f8AEc+t7d4AaZ6eUJ3Hva7dtrxAAWHtlEFsXFMAgNnGU9uQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-x64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.1.tgz",
+ "integrity": "sha512-LBEpOz0BsgMEeHgenf5aqmn/lLNTFXVfoWMUox8CtWWYK9X4jmQzWjoGoNb8lmAYml/tQ/Ysvm8q7szu7BoxRQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/darwin-arm64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.1.tgz",
+ "integrity": "sha512-veg7fL8eMSCVKL7IW4pxb54QERtedFDfY/ASrumK/SbFsXnRazxY4YykN/THYqFnFwJ0aVjiUrVG2PwcdAEqQQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/darwin-x64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.1.tgz",
+ "integrity": "sha512-+3ELd+nTzhfWb07Vol7EZ+5PTbJ/u74nC6iv4/lwIU99Ip5uuY6QoIf0Hn4m2HoV0qcnRivN3KSqc+FyCHjoVQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.1.tgz",
+ "integrity": "sha512-/8Rfgns4XD9XOSXlzUDepG8PX+AVWHliYlUkFI3K3GB6tqbdjYqdhcb4BKRd7C0BhZSoaCxhv8kTcBrcZWP+xg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/freebsd-x64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.1.tgz",
+ "integrity": "sha512-GITpD8dK9C+r+5yRT/UKVT36h/DQLOHdwGVwwoHidlnA168oD3uxA878XloXebK4Ul3gDBBIvEdL7go9gCUFzQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-arm": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.1.tgz",
+ "integrity": "sha512-ieMID0JRZY/ZeCrsFQ3Y3NlHNCqIhTprJfDgSB3/lv5jJZ8FX3hqPyXWhe+gvS5ARMBJ242PM+VNz/ctNj//eA==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-arm64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.1.tgz",
+ "integrity": "sha512-W9//kCrh/6in9rWIBdKaMtuTTzNj6jSeG/haWBADqLLa9P8O5YSRDzgD5y9QBok4AYlzS6ARHifAb75V6G670Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-ia32": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.1.tgz",
+ "integrity": "sha512-VIUV4z8GD8rtSVMfAj1aXFahsi/+tcoXXNYmXgzISL+KB381vbSTNdeZHHHIYqFyXcoEhu9n5cT+05tRv13rlw==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-loong64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.1.tgz",
+ "integrity": "sha512-l4rfiiJRN7sTNI//ff65zJ9z8U+k6zcCg0LALU5iEWzY+a1mVZ8iWC1k5EsNKThZ7XCQ6YWtsZ8EWYm7r1UEsg==",
+ "cpu": [
+ "loong64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-mips64el": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.1.tgz",
+ "integrity": "sha512-U0bEuAOLvO/DWFdygTHWY8C067FXz+UbzKgxYhXC0fDieFa0kDIra1FAhsAARRJbvEyso8aAqvPdNxzWuStBnA==",
+ "cpu": [
+ "mips64el"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-ppc64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.1.tgz",
+ "integrity": "sha512-NzdQ/Xwu6vPSf/GkdmRNsOfIeSGnh7muundsWItmBsVpMoNPVpM61qNzAVY3pZ1glzzAxLR40UyYM23eaDDbYQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-riscv64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.1.tgz",
+ "integrity": "sha512-7zlw8p3IApcsN7mFw0O1Z1PyEk6PlKMu18roImfl3iQHTnr/yAfYv6s4hXPidbDoI2Q0pW+5xeoM4eTCC0UdrQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-s390x": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.1.tgz",
+ "integrity": "sha512-cGj5wli+G+nkVQdZo3+7FDKC25Uh4ZVwOAK6A06Hsvgr8WqBBuOy/1s+PUEd/6Je+vjfm6stX0kmib5b/O2Ykw==",
+ "cpu": [
+ "s390x"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-x64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.1.tgz",
+ "integrity": "sha512-z3H/HYI9MM0HTv3hQZ81f+AKb+yEoCRlUby1F80vbQ5XdzEMyY/9iNlAmhqiBKw4MJXwfgsh7ERGEOhrM1niMA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.1.tgz",
+ "integrity": "sha512-wzC24DxAvk8Em01YmVXyjl96Mr+ecTPyOuADAvjGg+fyBpGmxmcr2E5ttf7Im8D0sXZihpxzO1isus8MdjMCXQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/netbsd-x64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.1.tgz",
+ "integrity": "sha512-1YQ8ybGi2yIXswu6eNzJsrYIGFpnlzEWRl6iR5gMgmsrR0FcNoV1m9k9sc3PuP5rUBLshOZylc9nqSgymI+TYg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.1.tgz",
+ "integrity": "sha512-5Z+DzLCrq5wmU7RDaMDe2DVXMRm2tTDvX2KU14JJVBN2CT/qov7XVix85QoJqHltpvAOZUAc3ndU56HSMWrv8g==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/openbsd-x64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.1.tgz",
+ "integrity": "sha512-Q73ENzIdPF5jap4wqLtsfh8YbYSZ8Q0wnxplOlZUOyZy7B4ZKW8DXGWgTCZmF8VWD7Tciwv5F4NsRf6vYlZtqg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.1.tgz",
+ "integrity": "sha512-ajbHrGM/XiK+sXM0JzEbJAen+0E+JMQZ2l4RR4VFwvV9JEERx+oxtgkpoKv1SevhjavK2z2ReHk32pjzktWbGg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/sunos-x64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.1.tgz",
+ "integrity": "sha512-IPUW+y4VIjuDVn+OMzHc5FV4GubIwPnsz6ubkvN8cuhEqH81NovB53IUlrlBkPMEPxvNnf79MGBoz8rZ2iW8HA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-arm64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.1.tgz",
+ "integrity": "sha512-RIVRWiljWA6CdVu8zkWcRmGP7iRRIIwvhDKem8UMBjPql2TXM5PkDVvvrzMtj1V+WFPB4K7zkIGM7VzRtFkjdg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-ia32": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.1.tgz",
+ "integrity": "sha512-2BR5M8CPbptC1AK5JbJT1fWrHLvejwZidKx3UMSF0ecHMa+smhi16drIrCEggkgviBwLYd5nwrFLSl5Kho96RQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-x64": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.1.tgz",
+ "integrity": "sha512-d5X6RMYv6taIymSk8JBP+nxv8DQAMY6A51GPgusqLdK9wBz5wWIXy1KjTck6HnjE9hqJzJRdk+1p/t5soSbCtw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tsx/node_modules/esbuild": {
+ "version": "0.27.1",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.1.tgz",
+ "integrity": "sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA==",
+ "devOptional": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.27.1",
+ "@esbuild/android-arm": "0.27.1",
+ "@esbuild/android-arm64": "0.27.1",
+ "@esbuild/android-x64": "0.27.1",
+ "@esbuild/darwin-arm64": "0.27.1",
+ "@esbuild/darwin-x64": "0.27.1",
+ "@esbuild/freebsd-arm64": "0.27.1",
+ "@esbuild/freebsd-x64": "0.27.1",
+ "@esbuild/linux-arm": "0.27.1",
+ "@esbuild/linux-arm64": "0.27.1",
+ "@esbuild/linux-ia32": "0.27.1",
+ "@esbuild/linux-loong64": "0.27.1",
+ "@esbuild/linux-mips64el": "0.27.1",
+ "@esbuild/linux-ppc64": "0.27.1",
+ "@esbuild/linux-riscv64": "0.27.1",
+ "@esbuild/linux-s390x": "0.27.1",
+ "@esbuild/linux-x64": "0.27.1",
+ "@esbuild/netbsd-arm64": "0.27.1",
+ "@esbuild/netbsd-x64": "0.27.1",
+ "@esbuild/openbsd-arm64": "0.27.1",
+ "@esbuild/openbsd-x64": "0.27.1",
+ "@esbuild/openharmony-arm64": "0.27.1",
+ "@esbuild/sunos-x64": "0.27.1",
+ "@esbuild/win32-arm64": "0.27.1",
+ "@esbuild/win32-ia32": "0.27.1",
+ "@esbuild/win32-x64": "0.27.1"
+ }
+ },
+ "node_modules/turbo": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.6.3.tgz",
+ "integrity": "sha512-bf6YKUv11l5Xfcmg76PyWoy/e2vbkkxFNBGJSnfdSXQC33ZiUfutYh6IXidc5MhsnrFkWfdNNLyaRk+kHMLlwA==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "turbo": "bin/turbo"
+ },
+ "optionalDependencies": {
+ "turbo-darwin-64": "2.6.3",
+ "turbo-darwin-arm64": "2.6.3",
+ "turbo-linux-64": "2.6.3",
+ "turbo-linux-arm64": "2.6.3",
+ "turbo-windows-64": "2.6.3",
+ "turbo-windows-arm64": "2.6.3"
+ }
+ },
+ "node_modules/turbo-darwin-64": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.6.3.tgz",
+ "integrity": "sha512-BlJJDc1CQ7SK5Y5qnl7AzpkvKSnpkfPmnA+HeU/sgny3oHZckPV2776ebO2M33CYDSor7+8HQwaodY++IINhYg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/turbo-darwin-arm64": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.6.3.tgz",
+ "integrity": "sha512-MwVt7rBKiOK7zdYerenfCRTypefw4kZCue35IJga9CH1+S50+KTiCkT6LBqo0hHeoH2iKuI0ldTF2a0aB72z3w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/turbo-linux-64": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.6.3.tgz",
+ "integrity": "sha512-cqpcw+dXxbnPtNnzeeSyWprjmuFVpHJqKcs7Jym5oXlu/ZcovEASUIUZVN3OGEM6Y/OTyyw0z09tOHNt5yBAVg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/turbo-linux-arm64": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.6.3.tgz",
+ "integrity": "sha512-MterpZQmjXyr4uM7zOgFSFL3oRdNKeflY7nsjxJb2TklsYqiu3Z9pQ4zRVFFH8n0mLGna7MbQMZuKoWqqHb45w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/turbo-windows-64": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.6.3.tgz",
+ "integrity": "sha512-biDU70v9dLwnBdLf+daoDlNJVvqOOP8YEjqNipBHzgclbQlXbsi6Gqqelp5er81Qo3BiRgmTNx79oaZQTPb07Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/turbo-windows-arm64": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.6.3.tgz",
+ "integrity": "sha512-dDHVKpSeukah3VsI/xMEKeTnV9V9cjlpFSUs4bmsUiLu3Yv2ENlgVEZv65wxbeE0bh0jjpmElDT+P1KaCxArQQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/twrnc": {
+ "version": "4.11.1",
+ "resolved": "https://registry.npmjs.org/twrnc/-/twrnc-4.11.1.tgz",
+ "integrity": "sha512-iBLt2CBXig32Jg7opTZjhXYrT0fM7hFjLpddZBBhXhhFfyTI6WUaMojHoACKpM5ys8D/Kdum4s571BmctLUn1Q==",
+ "license": "MIT",
+ "dependencies": {
+ "tailwindcss": ">=2.0.0 <4.0.0"
+ },
+ "peerDependencies": {
+ "react-native": ">=0.62.2"
+ }
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/type-detect": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz",
+ "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==",
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "license": "MIT",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/typed-array-buffer": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
+ "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "is-typed-array": "^1.1.14"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/typed-array-byte-length": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz",
+ "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "for-each": "^0.3.3",
+ "gopd": "^1.2.0",
+ "has-proto": "^1.2.0",
+ "is-typed-array": "^1.1.14"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-byte-offset": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz",
+ "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "for-each": "^0.3.3",
+ "gopd": "^1.2.0",
+ "has-proto": "^1.2.0",
+ "is-typed-array": "^1.1.15",
+ "reflect.getprototypeof": "^1.0.9"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-length": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz",
+ "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "is-typed-array": "^1.1.13",
+ "possible-typed-array-names": "^1.0.0",
+ "reflect.getprototypeof": "^1.0.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typedarray": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
+ "license": "MIT"
+ },
+ "node_modules/typescript": {
+ "version": "5.8.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
+ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/ua-parser-js": {
+ "version": "0.7.41",
+ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.41.tgz",
+ "integrity": "sha512-O3oYyCMPYgNNHuO7Jjk3uacJWZF8loBgwrfd/5LE/HyZ3lUIOdniQ7DNXJcIgZbwioZxk0fLfI4EVnetdiX5jg==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/ua-parser-js"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/faisalman"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/faisalman"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "ua-parser-js": "script/cli.js"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/unbox-primitive": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
+ "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "has-bigints": "^1.0.2",
+ "has-symbols": "^1.1.0",
+ "which-boxed-primitive": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/undici": {
+ "version": "6.22.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.22.0.tgz",
+ "integrity": "sha512-hU/10obOIu62MGYjdskASR3CUAiYaFTtC9Pa6vHyf//mAipSvSQg6od2CnJswq7fvzNS3zJhxoRkgNVaHurWKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.17"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/unicode-canonical-property-names-ecmascript": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz",
+ "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/unicode-match-property-ecmascript": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz",
+ "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==",
+ "license": "MIT",
+ "dependencies": {
+ "unicode-canonical-property-names-ecmascript": "^2.0.0",
+ "unicode-property-aliases-ecmascript": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/unicode-match-property-value-ecmascript": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz",
+ "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/unicode-property-aliases-ecmascript": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz",
+ "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/unique-string": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
+ "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==",
+ "license": "MIT",
+ "dependencies": {
+ "crypto-random-string": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/unrs-resolver": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz",
+ "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "napi-postinstall": "^0.3.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unrs-resolver"
+ },
+ "optionalDependencies": {
+ "@unrs/resolver-binding-android-arm-eabi": "1.11.1",
+ "@unrs/resolver-binding-android-arm64": "1.11.1",
+ "@unrs/resolver-binding-darwin-arm64": "1.11.1",
+ "@unrs/resolver-binding-darwin-x64": "1.11.1",
+ "@unrs/resolver-binding-freebsd-x64": "1.11.1",
+ "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1",
+ "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1",
+ "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-arm64-musl": "1.11.1",
+ "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1",
+ "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-x64-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-x64-musl": "1.11.1",
+ "@unrs/resolver-binding-wasm32-wasi": "1.11.1",
+ "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1",
+ "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1",
+ "@unrs/resolver-binding-win32-x64-msvc": "1.11.1"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.2.tgz",
+ "integrity": "sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/use-latest-callback": {
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/use-latest-callback/-/use-latest-callback-0.2.6.tgz",
+ "integrity": "sha512-FvRG9i1HSo0wagmX63Vrm8SnlUU3LMM3WyZkQ76RnslpBrX694AdG4A0zQBx2B3ZifFA0yv/BaEHGBnEax5rZg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": ">=16.8"
+ }
+ },
+ "node_modules/use-sync-external-store": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz",
+ "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/user-ui": {
+ "resolved": "apps/user-ui",
+ "link": true
+ },
+ "node_modules/util": {
+ "version": "0.12.5",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",
+ "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "is-arguments": "^1.0.4",
+ "is-generator-function": "^1.0.7",
+ "is-typed-array": "^1.1.3",
+ "which-typed-array": "^1.1.2"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "license": "MIT"
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
+ "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/esm/bin/uuid"
+ }
+ },
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/validate-npm-package-name": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz",
+ "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==",
+ "license": "ISC",
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
+ "node_modules/validator": {
+ "version": "13.15.23",
+ "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.23.tgz",
+ "integrity": "sha512-4yoz1kEWqUjzi5zsPbAS/903QXSYp0UOtHsPpp7p9rHAw/W+dkInskAE386Fat3oKRROwO98d9ZB0G4cObgUyw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/vite": {
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
+ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "^0.25.0",
+ "fdir": "^6.4.4",
+ "picomatch": "^4.0.2",
+ "postcss": "^8.5.3",
+ "rollup": "^4.34.9",
+ "tinyglobby": "^0.2.13"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
+ "jiti": ">=1.21.0",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "sass-embedded": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/vlq": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.1.tgz",
+ "integrity": "sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==",
+ "license": "MIT"
+ },
+ "node_modules/void-elements": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz",
+ "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/walker": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz",
+ "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "makeerror": "1.0.12"
+ }
+ },
+ "node_modules/warn-once": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.1.tgz",
+ "integrity": "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q==",
+ "license": "MIT"
+ },
+ "node_modules/wcwidth": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
+ "license": "MIT",
+ "dependencies": {
+ "defaults": "^1.0.3"
+ }
+ },
+ "node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/whatwg-fetch": {
+ "version": "3.6.20",
+ "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz",
+ "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==",
+ "license": "MIT"
+ },
+ "node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ },
+ "node_modules/whatwg-url-without-unicode": {
+ "version": "8.0.0-3",
+ "resolved": "https://registry.npmjs.org/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-3.tgz",
+ "integrity": "sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^5.4.3",
+ "punycode": "^2.1.1",
+ "webidl-conversions": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/whatwg-url-without-unicode/node_modules/webidl-conversions": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz",
+ "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/which-boxed-primitive": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz",
+ "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-bigint": "^1.1.0",
+ "is-boolean-object": "^1.2.1",
+ "is-number-object": "^1.1.1",
+ "is-string": "^1.1.1",
+ "is-symbol": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-builtin-type": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz",
+ "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "function.prototype.name": "^1.1.6",
+ "has-tostringtag": "^1.0.2",
+ "is-async-function": "^2.0.0",
+ "is-date-object": "^1.1.0",
+ "is-finalizationregistry": "^1.1.0",
+ "is-generator-function": "^1.0.10",
+ "is-regex": "^1.2.1",
+ "is-weakref": "^1.0.2",
+ "isarray": "^2.0.5",
+ "which-boxed-primitive": "^1.1.0",
+ "which-collection": "^1.0.2",
+ "which-typed-array": "^1.1.16"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-collection": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
+ "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-map": "^2.0.3",
+ "is-set": "^2.0.3",
+ "is-weakmap": "^2.0.2",
+ "is-weakset": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-typed-array": {
+ "version": "1.1.19",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz",
+ "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==",
+ "license": "MIT",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "for-each": "^0.3.5",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/with": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz",
+ "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.9.6",
+ "@babel/types": "^7.9.6",
+ "assert-never": "^1.2.1",
+ "babel-walk": "3.0.0-canary-5"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/wonka": {
+ "version": "6.3.5",
+ "resolved": "https://registry.npmjs.org/wonka/-/wonka-6.3.5.tgz",
+ "integrity": "sha512-SSil+ecw6B4/Dm7Pf2sAshKQ5hWFvfyGlfPbEd6A14dOH6VDjrmbY86u6nZvy9omGwwIPFR8V41+of1EezgoUw==",
+ "license": "MIT"
+ },
+ "node_modules/word-wrap": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi-cjs": {
+ "name": "wrap-ansi",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/wrap-ansi/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "license": "ISC"
+ },
+ "node_modules/write-file-atomic": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz",
+ "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==",
+ "license": "ISC",
+ "dependencies": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^3.0.7"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/write-file-atomic/node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "license": "ISC"
+ },
+ "node_modules/ws": {
+ "version": "8.18.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
+ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/xcode": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/xcode/-/xcode-3.0.1.tgz",
+ "integrity": "sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "simple-plist": "^1.1.0",
+ "uuid": "^7.0.3"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/xcode/node_modules/uuid": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz",
+ "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==",
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/xml2js": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.0.tgz",
+ "integrity": "sha512-eLTh0kA8uHceqesPqSE+VvO1CDDJWMwlQfB6LuN6T8w6MaDJ8Txm8P7s5cHD0miF0V+GGTZrDQfxPZQVsur33w==",
+ "license": "MIT",
+ "dependencies": {
+ "sax": ">=0.6.0",
+ "xmlbuilder": "~11.0.0"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/xml2js/node_modules/xmlbuilder": {
+ "version": "11.0.1",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
+ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/xmlbuilder": {
+ "version": "15.1.1",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
+ "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "license": "ISC"
+ },
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/yargs/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/yup": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/yup/-/yup-1.7.1.tgz",
+ "integrity": "sha512-GKHFX2nXul2/4Dtfxhozv701jLQHdf6J34YDh2cEkpqoo8le5Mg6/LrdseVLrFarmFygZTlfIhHx/QKfb/QWXw==",
+ "license": "MIT",
+ "dependencies": {
+ "property-expr": "^2.0.5",
+ "tiny-case": "^1.0.3",
+ "toposort": "^2.0.2",
+ "type-fest": "^2.19.0"
+ }
+ },
+ "node_modules/yup/node_modules/type-fest": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
+ "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/zod": {
+ "version": "4.1.13",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.13.tgz",
+ "integrity": "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
+ "node_modules/zustand": {
+ "version": "5.0.10",
+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.10.tgz",
+ "integrity": "sha512-U1AiltS1O9hSy3rul+Ub82ut2fqIAefiSuwECWt6jlMVUGejvf+5omLcRBSzqbRagSM3hQZbtzdeRc6QVScXTg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.20.0"
+ },
+ "peerDependencies": {
+ "@types/react": ">=18.0.0",
+ "immer": ">=9.0.6",
+ "react": ">=18.0.0",
+ "use-sync-external-store": ">=1.2.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "immer": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ },
+ "use-sync-external-store": {
+ "optional": true
+ }
+ }
+ },
+ "packages/ui": {
+ "name": "common-ui",
+ "version": "1.0.0",
+ "dependencies": {
+ "@expo/vector-icons": "^14.1.0",
+ "@react-native-community/datetimepicker": "8.4.1",
+ "@react-native-google-signin/google-signin": "^16.0.0",
+ "@react-native-picker/picker": "2.11.1",
+ "@react-navigation/bottom-tabs": "^7.3.10",
+ "@react-navigation/drawer": "^7.5.8",
+ "@react-navigation/elements": "^2.3.8",
+ "@react-navigation/native": "^7.1.6",
+ "@tanstack/react-query": "^5.85.9",
+ "axios": "^1.11.0",
+ "buffer": "^6.0.3",
+ "dayjs": "^1.11.18",
+ "expo": "~53.0.22",
+ "expo-blur": "~14.1.5",
+ "expo-constants": "~17.1.7",
+ "expo-dev-client": "~5.2.4",
+ "expo-device": "~7.1.4",
+ "expo-document-picker": "~13.1.6",
+ "expo-font": "~13.3.2",
+ "expo-haptics": "~14.1.4",
+ "expo-image": "~2.4.0",
+ "expo-image-picker": "~16.1.4",
+ "expo-linear-gradient": "~14.1.5",
+ "expo-linking": "~7.1.7",
+ "expo-notifications": "~0.31.4",
+ "expo-router": "~5.1.5",
+ "expo-secure-store": "~14.2.4",
+ "expo-splash-screen": "~0.30.10",
+ "expo-status-bar": "~2.2.3",
+ "expo-symbols": "~0.4.5",
+ "expo-system-ui": "~5.0.11",
+ "expo-web-browser": "~14.2.0",
+ "formik": "^2.4.6",
+ "jwt-decode": "^4.0.0",
+ "react": "19.0.0",
+ "react-dom": "19.0.0",
+ "react-hook-form": "^7.62.0",
+ "react-native": "0.79.6",
+ "react-native-element-dropdown": "^2.12.4",
+ "react-native-gesture-handler": "~2.24.0",
+ "react-native-keyboard-aware-scroll-view": "^0.9.5",
+ "react-native-pager-view": "^6.9.1",
+ "react-native-paper": "^5.14.5",
+ "react-native-phonepe-pg": "^3.1.1",
+ "react-native-razorpay": "^2.3.0",
+ "react-native-reanimated": "~3.17.4",
+ "react-native-safe-area-context": "5.4.0",
+ "react-native-screens": "~4.11.1",
+ "react-native-tab-view": "^4.1.3",
+ "react-native-toast-message": "^2.3.3",
+ "react-native-web": "~0.20.0",
+ "react-native-webview": "13.13.5",
+ "twrnc": "^4.9.1",
+ "yup": "^1.7.0"
+ }
+ },
+ "packages/ui/node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..fd20819
--- /dev/null
+++ b/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "meat-farmer-monorepo",
+ "version": "1.0.0",
+ "private": true,
+ "packageManager": "npm@10.8.1",
+ "scripts": {
+ "build": "turbo run build",
+ "dev": "turbo run dev --parallel",
+ "lint": "turbo run lint",
+ "test": "turbo run test",
+ "docker:build": "docker buildx build --platform linux/amd64 -t mohdshafiuddin54/meat_farmer .",
+ "docker:push": "docker push mohdshafiuddin54/meat_farmer",
+ "docker:deploy": "docker buildx build --platform linux/amd64 -t mohdshafiuddin54/meat_farmer . && docker push mohdshafiuddin54/meat_farmer",
+ "android": "expo run:android",
+ "ios": "expo run:ios"
+ },
+ "workspaces": [
+ "apps/*",
+ "packages/*"
+ ],
+ "devDependencies": {
+ "@babel/core": "^7.25.2",
+ "@types/react": "~19.0.10",
+ "@types/react-native-razorpay": "^2.2.6",
+ "eslint": "^9.25.0",
+ "eslint-config-expo": "~9.2.0",
+ "turbo": "^2.0.0",
+ "typescript": "~5.8.3"
+ },
+ "dependencies": {
+ "@react-native/virtualized-lists": "^0.79.6",
+ "admin-ui": "^1.0.0",
+ "backend": "^1.0.0",
+ "expo": "~53.0.22",
+ "expo-auth-session": "~6.2.1",
+ "expo-crypto": "~14.1.5",
+ "expo-web-browser": "~14.2.0",
+ "node-cron": "^4.2.1",
+ "react": "19.0.0",
+ "react-native": "0.79.6",
+ "user-ui": "^1.0.0",
+ "zustand": "^5.0.9"
+ }
+}
diff --git a/packages/ui/hooks/theme-context.tsx b/packages/ui/hooks/theme-context.tsx
new file mode 100755
index 0000000..6249402
--- /dev/null
+++ b/packages/ui/hooks/theme-context.tsx
@@ -0,0 +1,43 @@
+// import { colors, colorsType } from '@/lib/theme-colors';\
+import {colors, colorsType} from '../src/lib/theme-colors';
+import React, { createContext, useContext, useState, ReactNode } from 'react';
+
+// 1. Define the theme type
+export type Theme = {
+ colors: colorsType;
+ // Add more theme-level properties as needed (e.g., font, spacing)
+};
+
+// 2. Default theme object
+export const defaultTheme: Theme = {
+ colors: colors,
+ // Add more theme-level defaults here
+};
+
+// 3. Create the context
+const ThemeContext = createContext<{
+ theme: Theme;
+ setTheme: (theme: Theme) => void;
+}>({
+ theme: defaultTheme,
+ setTheme: () => {},
+});
+
+// 4. Provider component
+export const ThemeProvider = ({ children }: { children: ReactNode }) => {
+ const [theme, setTheme] = useState(defaultTheme);
+ return (
+
+ {children}
+
+ );
+};
+
+// 5. useTheme hook
+export function useTheme() {
+ const context = useContext(ThemeContext);
+ if (!context) {
+ throw new Error('useTheme must be used within a ThemeProvider');
+ }
+ return context;
+}
diff --git a/packages/ui/hooks/useDrawerTitle.ts b/packages/ui/hooks/useDrawerTitle.ts
new file mode 100644
index 0000000..49443fa
--- /dev/null
+++ b/packages/ui/hooks/useDrawerTitle.ts
@@ -0,0 +1,19 @@
+import { DependencyList, useEffect } from 'react';
+import { DeviceEventEmitter } from 'react-native';
+import { useFocusEffect } from '@react-navigation/native';
+
+export function useDrawerTitle(title: string, deps: DependencyList) {
+ useFocusEffect(() => {
+ DeviceEventEmitter.emit('updateDrawerTitle', title);
+ return () => {
+ DeviceEventEmitter.emit('updateDrawerTitle', undefined);
+ };
+ });
+
+ useEffect(() => {
+ DeviceEventEmitter.emit('updateDrawerTitle', title);
+ return () => {
+ DeviceEventEmitter.emit('updateDrawerTitle', undefined);
+ }
+ },[deps])
+}
\ No newline at end of file
diff --git a/packages/ui/hooks/useFocusCallback.ts b/packages/ui/hooks/useFocusCallback.ts
new file mode 100644
index 0000000..3e3dd6f
--- /dev/null
+++ b/packages/ui/hooks/useFocusCallback.ts
@@ -0,0 +1,16 @@
+import { useFocusEffect } from '@react-navigation/native';
+import { useCallback } from 'react';
+
+/**
+ * Hook that calls a callback function when the current screen comes into focus
+ * @param callback - Function to call when screen gains focus
+ */
+const useFocusCallback = (callback: () => void) => {
+ useFocusEffect(
+ useCallback(() => {
+ callback();
+ }, [callback])
+ );
+};
+
+export default useFocusCallback;
\ No newline at end of file
diff --git a/packages/ui/hooks/useIsDevMode.ts b/packages/ui/hooks/useIsDevMode.ts
new file mode 100644
index 0000000..f301e4b
--- /dev/null
+++ b/packages/ui/hooks/useIsDevMode.ts
@@ -0,0 +1,8 @@
+import { useMemo } from 'react';
+import Constants from 'expo-constants';
+
+export const useIsDevMode = () => {
+ return useMemo(() => {
+ return !Constants.isDevice;
+ }, []);
+};
\ No newline at end of file
diff --git a/packages/ui/hooks/useManualRefresh.ts b/packages/ui/hooks/useManualRefresh.ts
new file mode 100644
index 0000000..7379361
--- /dev/null
+++ b/packages/ui/hooks/useManualRefresh.ts
@@ -0,0 +1,10 @@
+import { useEffect } from 'react';
+import { DeviceEventEmitter } from 'react-native';
+import { REFRESH_EVENT } from '../src/lib/const-strs';
+
+export default function useManualRefresh(callback: () => void) {
+ useEffect(() => {
+ const subscription = DeviceEventEmitter.addListener(REFRESH_EVENT, callback);
+ return () => subscription.remove();
+ }, [callback]);
+}
\ No newline at end of file
diff --git a/packages/ui/hooks/useMarkDataFetchers.ts b/packages/ui/hooks/useMarkDataFetchers.ts
new file mode 100644
index 0000000..c748f09
--- /dev/null
+++ b/packages/ui/hooks/useMarkDataFetchers.ts
@@ -0,0 +1,16 @@
+import { useCallback, useRef } from 'react';
+import { useFocusEffect } from '@react-navigation/native';
+
+export const useMarkDataFetchers = (callback: () => void) => {
+ const focusCountRef = useRef(0);
+
+ useFocusEffect(
+ useCallback(() => {
+
+ if (focusCountRef.current > 1) {
+ callback();
+ }
+ focusCountRef.current += 1;
+ },[])
+ )
+}
\ No newline at end of file
diff --git a/packages/ui/hooks/usePagination.tsx b/packages/ui/hooks/usePagination.tsx
new file mode 100644
index 0000000..533b2f1
--- /dev/null
+++ b/packages/ui/hooks/usePagination.tsx
@@ -0,0 +1,96 @@
+import { useState } from 'react';
+import { TouchableOpacity, Text, View } from 'react-native';
+import { tw } from '../index';
+
+export const usePagination = (initialPageSize: number = 10) => {
+ const [currentPage, setCurrentPage] = useState(1);
+ const pageSize = initialPageSize;
+
+ const PaginationComponent = ({ totalCount }: { totalCount: number }) => {
+ const totalPages = Math.ceil(totalCount / pageSize);
+
+ if (totalCount === 0 || totalPages <= 1) {
+ return null;
+ }
+
+ const getVisiblePages = () => {
+ const pages: (number | string)[] = [];
+ const maxVisible = 3;
+ const half = Math.floor(maxVisible / 2);
+
+ let start = Math.max(1, currentPage - half);
+ let end = Math.min(totalPages, start + maxVisible - 1);
+
+ if (end - start + 1 < maxVisible) {
+ start = Math.max(1, end - maxVisible + 1);
+ }
+
+ if (start > 1) {
+ pages.push(1);
+ if (start > 2) pages.push('...');
+ }
+
+ for (let i = start; i <= end; i++) {
+ pages.push(i);
+ }
+
+ if (end < totalPages) {
+ if (end < totalPages - 1) pages.push('...');
+ pages.push(totalPages);
+ }
+
+ return pages;
+ };
+
+ const visiblePages = getVisiblePages();
+
+ return (
+
+
+ setCurrentPage(currentPage - 1)}
+ style={tw`px-4 py-2 rounded-lg ${currentPage === 1 ? 'bg-gray-100' : 'bg-blue-500'}`}
+ >
+
+ Previous
+
+
+
+
+ {visiblePages.map((page, index) => (
+ typeof page === 'number' && setCurrentPage(page)}
+ style={tw`px-3 py-2 mx-1 rounded-lg ${
+ typeof page === 'number' && currentPage === page ? 'bg-blue-500' : 'bg-gray-100'
+ }`}
+ >
+
+ {page}
+
+
+ ))}
+
+
+ setCurrentPage(currentPage + 1)}
+ style={tw`px-4 py-2 rounded-lg ${currentPage === totalPages ? 'bg-gray-100' : 'bg-blue-500'}`}
+ >
+
+ Next
+
+
+
+
+ );
+ };
+
+ return { currentPage, pageSize, PaginationComponent };
+};
\ No newline at end of file
diff --git a/packages/ui/index.ts b/packages/ui/index.ts
new file mode 100755
index 0000000..a4413dc
--- /dev/null
+++ b/packages/ui/index.ts
@@ -0,0 +1,127 @@
+import Constants from "expo-constants";
+import { Platform } from "react-native";
+import RolesDropdown from "./src/roles-dropdown";
+import { StorageService } from "./src/services/StorageService";
+import {
+ ROLE_NAMES,
+ ROLE_DISPLAY_NAMES,
+ ROLE_OPTIONS,
+ BUSINESS_ROLE_OPTIONS,
+} from "./src/lib/constants";
+import { REFUND_STATUS } from "./src/lib/const-strs";
+import { colors, colorsType } from "./src/lib/theme-colors";
+import { theme } from "./src/theme";
+import MyButton, { MyTextButton } from "./src/components/button";
+import { useTheme, Theme } from "./hooks/theme-context";
+import MyTextInput from "./src/components/textinput";
+import BottomDialog, { ConfirmationDialog } from "./src/components/dialog";
+import LoadingDialog from "./src/components/loading-dialog";
+import DatePicker from "./src/components/date-picker";
+import MyText from "./src/components/text";
+import MyTouchableOpacity from "./src/components/touchable-opacity";
+import BottomDropdown from "./src/components/bottom-dropdown";
+import ImageViewerURI from "./src/components/image-viewer";
+import ImageCarousel from "./src/components/ImageCarousel";
+import ImageGallery from "./src/components/ImageGallery";
+import ImageGalleryWithDelete from "./src/components/ImageGalleryWithDelete";
+import ImageUploader from "./src/components/ImageUploader";
+import ProfileImage from "./src/components/profile-image";
+import Checkbox from "./src/components/checkbox";
+import AppContainer from "./src/components/app-container";
+import tw from "./src/lib/tailwind";
+import SearchBar from "./src/components/search-bar";
+import DataTable from "./src/components/data-table";
+import Quantifier from "./src/components/quantifier";
+import MiniQuantifier from "./src/components/mini-quantifier";
+import TabViewWrapper from "./src/components/tab-view";
+import MyFlatList from "./src/components/flat-list";
+import useFocusCallback from "./hooks/useFocusCallback";
+import useManualRefresh from "./hooks/useManualRefresh";
+import { useDrawerTitle } from "./hooks/useDrawerTitle";
+import { useMarkDataFetchers } from "./hooks/useMarkDataFetchers";
+import { useIsDevMode } from "./hooks/useIsDevMode";
+import { usePagination } from "./hooks/usePagination";
+import { StorageServiceCasual } from "./src/services/StorageServiceCasual";
+import DateTimePickerMod from "./src/components/date-time-picker";
+import { RefreshProvider, useRefresh } from "./src/lib/refresh-context";
+import MyStatusBar from "./src/components/MyStatusBar";
+import { updateStatusBarColor, useStatusBarStore } from "./src/lib/status-bar-store";
+
+const isDevMode = Constants.executionEnvironment !== "standalone";
+// const localhost =
+// Platform.OS === "android"
+// ? "http://10.0.2.2:4000" // Android emulator
+// : "http://localhost:4000"; // iOS simulator / web dev
+
+// const production = "https://technocracy.ovh/mf";
+// // const production = "http://10.0.2.2:4000";
+// // const production = "http://192.168.1.3:4000";
+
+// const API_URL =
+// Constants.executionEnvironment === "standalone" ? production : localhost;
+
+// 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.9:4000';
+// const BASE_API_URL = "https://mf.technocracy.ovh";
+let BASE_API_URL = "https://mf.freshyo.in";
+ // let BASE_API_URL = 'http://192.168.100.103:4000';
+ // let BASE_API_URL = 'http://192.168.29.219:4000';
+
+// if(isDevMode) {
+// }
+
+export {
+ RolesDropdown,
+ StorageService,
+ ROLE_NAMES,
+ ROLE_DISPLAY_NAMES,
+ ROLE_OPTIONS,
+ BUSINESS_ROLE_OPTIONS,
+ colors,
+ colorsType,
+ theme,
+ MyButton,
+ MyTextButton,
+ useTheme,
+ Theme,
+ MyTextInput,
+ BottomDialog,
+ LoadingDialog,
+ MyText,
+ MyTouchableOpacity,
+ ConfirmationDialog,
+ DatePicker,
+ BottomDropdown,
+ ImageViewerURI,
+ ImageCarousel,
+ ImageGallery,
+ ImageGalleryWithDelete,
+ ImageUploader,
+ ProfileImage,
+ Checkbox,
+ AppContainer,
+ tw,
+ SearchBar,
+ DataTable,
+ Quantifier,
+ MiniQuantifier,
+ TabViewWrapper,
+ MyFlatList,
+ useFocusCallback,
+ useManualRefresh,
+ useDrawerTitle,
+ BASE_API_URL,
+ useMarkDataFetchers,
+ StorageServiceCasual,
+ useIsDevMode,
+ usePagination,
+ REFUND_STATUS,
+ DateTimePickerMod,
+ RefreshProvider,
+ useRefresh,
+ MyStatusBar,
+ updateStatusBarColor,
+ useStatusBarStore,
+ };
diff --git a/packages/ui/package.json b/packages/ui/package.json
new file mode 100755
index 0000000..78446e3
--- /dev/null
+++ b/packages/ui/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "common-ui",
+ "version": "1.0.0",
+ "main": "index.ts",
+ "private": true,
+ "dependencies": {
+ "@expo/vector-icons": "^14.1.0",
+ "@react-native-community/datetimepicker": "8.4.1",
+ "@react-native-google-signin/google-signin": "^16.0.0",
+ "@react-native-picker/picker": "2.11.1",
+ "@react-navigation/bottom-tabs": "^7.3.10",
+ "@react-navigation/drawer": "^7.5.8",
+ "@react-navigation/elements": "^2.3.8",
+ "@react-navigation/native": "^7.1.6",
+ "@tanstack/react-query": "^5.85.9",
+ "axios": "^1.11.0",
+ "buffer": "^6.0.3",
+ "dayjs": "^1.11.18",
+ "expo": "~53.0.22",
+ "expo-blur": "~14.1.5",
+ "expo-constants": "~17.1.7",
+ "expo-dev-client": "~5.2.4",
+ "expo-device": "~7.1.4",
+ "expo-document-picker": "~13.1.6",
+ "expo-font": "~13.3.2",
+ "expo-haptics": "~14.1.4",
+ "expo-image": "~2.4.0",
+ "expo-image-picker": "~16.1.4",
+ "expo-linear-gradient": "~14.1.5",
+ "expo-linking": "~7.1.7",
+ "expo-notifications": "~0.31.4",
+ "expo-router": "~5.1.5",
+ "expo-secure-store": "~14.2.4",
+ "expo-splash-screen": "~0.30.10",
+ "expo-status-bar": "~2.2.3",
+ "expo-symbols": "~0.4.5",
+ "expo-system-ui": "~5.0.11",
+ "expo-web-browser": "~14.2.0",
+ "formik": "^2.4.6",
+ "jwt-decode": "^4.0.0",
+ "react": "19.0.0",
+ "react-dom": "19.0.0",
+ "react-hook-form": "^7.62.0",
+ "react-native": "0.79.6",
+ "react-native-element-dropdown": "^2.12.4",
+ "react-native-gesture-handler": "~2.24.0",
+ "react-native-keyboard-aware-scroll-view": "^0.9.5",
+ "react-native-pager-view": "^6.9.1",
+ "react-native-paper": "^5.14.5",
+ "react-native-phonepe-pg": "^3.1.1",
+ "react-native-razorpay": "^2.3.0",
+ "react-native-reanimated": "~3.17.4",
+ "react-native-safe-area-context": "5.4.0",
+ "react-native-screens": "~4.11.1",
+ "react-native-tab-view": "^4.1.3",
+ "react-native-toast-message": "^2.3.3",
+ "react-native-web": "~0.20.0",
+ "react-native-webview": "13.13.5",
+ "twrnc": "^4.9.1",
+ "yup": "^1.7.0"
+ }
+}
diff --git a/packages/ui/shared-types.ts b/packages/ui/shared-types.ts
new file mode 100755
index 0000000..04dd4f0
--- /dev/null
+++ b/packages/ui/shared-types.ts
@@ -0,0 +1,352 @@
+export type Person = {
+ name: string;
+ age: number;
+ email: string;
+}
+
+
+export interface User {
+ id: number;
+ name?: string | null;
+ email: string;
+ mobile: string;
+ profilePicUrl?: string;
+ address?: string;
+ joinDate?: Date;
+ specializations: DoctorSpecialization[] | null;
+ qualifications?: string;
+ hospital?: string;
+ hospitalId?: number;
+ consultationFee?: string;
+}
+
+export interface Hospital {
+ id: number;
+ name: string;
+ description?: string;
+ address: string;
+ adminId?: number;
+ adminName?: string;
+ hospitalImages?: string[]
+}
+
+export interface DoctorSpecialization {
+ id: number;
+ name: string | null;
+ description: string | null;
+}
+
+export interface DoctorInfo {
+ id: number;
+ qualifications: string | null;
+ dailyTokenCount: number;
+ consultationFee: number | string;
+}
+
+export interface Doctor {
+ id: number;
+ name: string;
+ username?: string | null;
+ email?: string | null;
+ mobile?: string;
+ doctorInfo?: DoctorInfo;
+ specializations?: DoctorSpecialization[] | null;
+ qualifications: string | null;
+}
+
+export interface DoctorDetails {
+ id: number;
+ name: string;
+ username?: string | null;
+ email?: string | null;
+ mobile?: string;
+ profilePicUrl?: string | null;
+ address?: string | null;
+ joinDate?: string | null;
+ role: string;
+ roles: string[];
+ doctorId: number;
+ qualifications?: string | null;
+ dailyTokenCount: number;
+ consultationFee: number;
+ hospital?: string;
+ hospitalId?: number;
+ description?: string | null;
+ yearsOfExperience?: number | null;
+ specializations: {
+ id: number;
+ name: string;
+ description: string | null;
+ }[];
+ isConsultationsPaused: boolean;
+ pauseReason: string | null;
+}
+
+// Define local DashboardDoctor type based on the API response structure
+export interface DashboardDoctor {
+ availableTokens: number;
+ consultationFee: string;
+ consultationsDone: number;
+ currentConsultationNumber: number;
+ id: number;
+ isAvailable: boolean;
+ name: string;
+ profilePicUrl?: string | null;
+ qualifications: string | null;
+ tokensIssuedToday: number;
+ totalTokenCount: number;
+}
+
+// Token types
+export interface TokenDoctor {
+ id: number;
+ name: string;
+ mobile: string;
+ profilePicUrl: string | null;
+}
+
+export interface UpcomingToken {
+ id: number;
+ tokenDate: string;
+ queueNumber: number;
+ description: string | null;
+ createdAt: string;
+ doctor: TokenDoctor;
+ currentConsultationNumber?: number; // Current consultation number for the doctor
+}
+
+export interface PastToken {
+ id: number;
+ tokenDate: string;
+ queueNumber: number;
+ description: string | null;
+ createdAt: string;
+ doctor: TokenDoctor;
+ status?: 'COMPLETED' | 'MISSED' | 'CANCELLED';
+ consultationNotes?: string | null;
+}
+
+export interface UpcomingAppointment {
+ id: number;
+ doctorName: string;
+ doctorImageUrl?: string;
+ date: string;
+ hospital: string;
+ queueNumber: number;
+ status: string;
+}
+
+export interface MyTokensResponse {
+ message: string;
+ tokens: UpcomingToken[];
+}
+
+export interface PastTokensResponse {
+ message: string;
+ tokens: PastToken[];
+}
+
+export interface BookTokenPayload {
+ doctorId: number;
+ userId: number;
+ tokenDate: string;
+ description?: string;
+}
+
+export interface BookTokenResponse {
+ message: string;
+ token: {
+ id: number;
+ doctorId: number;
+ userId: number;
+ tokenDate: string;
+ queueNumber: number;
+ description: string | null;
+ createdAt: string;
+ };
+}
+
+// Doctor availability types
+export interface DoctorAvailability {
+ id: number;
+ doctorId: number;
+ date: string;
+ totalTokenCount: number;
+ filledTokenCount: number;
+ consultationsDone: number;
+ isStopped: boolean;
+ availableTokens: number;
+ isPaused: boolean;
+ isLeave: boolean;
+ pauseReason: string | null;
+}
+
+export interface DoctorAvailabilityWithDate {
+ date: string;
+ availability: DoctorAvailability | null;
+}
+
+export interface DoctorAvailabilityResponse {
+ message: string;
+ doctorId: number;
+ availabilities: DoctorAvailabilityWithDate[];
+}
+
+export interface DoctorAvailabilityPayload {
+ doctorId: number;
+ date: string;
+ tokenCount: number;
+ isStopped?: boolean;
+ filledTokenCount?: number;
+ consultationsDone?: number;
+}
+
+
+export interface token_user {
+ id: number;
+ name: string;
+ mobile: string;
+ age: number;
+ gender: string;
+}
+
+export interface ProductSummary {
+ id: number;
+ name: string;
+ shortDescription?: string;
+ price: number;
+ unit: string;
+ isOutOfStock: boolean;
+ nextDeliveryDate: string | null;
+ images: string[];
+}
+
+export interface GetSlotsProductIdsPayload {
+ slotIds: number[];
+}
+
+export interface GetSlotsProductIdsResponse {
+ [slotId: number]: number[];
+}
+
+export interface Order {
+ id: string;
+ orderId: string;
+ readableId: string;
+ customerName: string;
+ address: string;
+ totalAmount: number;
+ items: {
+ name: string;
+ quantity: number;
+ price: number;
+ amount: number;
+ unit: string;
+ isPackaged: boolean;
+ isPackageVerified: boolean;
+ }[];
+ deliveryTime: string;
+ status: 'pending' | 'delivered' | 'cancelled';
+ isPackaged: boolean;
+ isDelivered: boolean;
+ isCod: boolean;
+ paymentMode: string;
+ paymentStatus: string;
+ slotId: number;
+}
+
+export interface Slot {
+ id: number;
+ deliveryTime: string;
+ freezeTime: string;
+ isActive: boolean;
+ deliverySequence?: number[];
+}
+
+export interface Coupon {
+ id: number;
+ couponCode: string;
+ isUserBased: boolean;
+ discountPercent: string | null;
+ flatDiscount: string | null;
+ minOrder: string | null;
+ targetUser: {
+ id: number;
+ name: string | null;
+ mobile: string;
+ } | null;
+ productIds: number[] | null;
+ createdBy: number;
+ creator: {
+ id: number;
+ name: string | null;
+ } | null;
+ maxValue: string | null;
+ isApplyForAll: boolean;
+ validTill: Date | null;
+ maxLimitForUser: number | null;
+ isInvalidated: boolean;
+ createdAt: Date;
+}
+
+export interface CreateCouponPayload {
+ couponCode: string;
+ discountPercent?: number;
+ flatDiscount?: number;
+ minOrder?: number;
+ maxValue?: number;
+ validTill?: string;
+ maxLimitForUser?: number;
+ isApplyForAll: boolean;
+ isUserBased: boolean;
+ targetUsers?: number[];
+ productIds?: number[];
+ applicableUsers?: number[];
+ applicableProducts?: number[];
+ exclusiveApply?: boolean;
+}
+
+// Patient History Types
+export interface PatientHistoryToken {
+ id: number;
+ queueNum: number;
+ tokenDate: string;
+ doctorName: string;
+ status: string;
+ description: string;
+ consultationNotes?: string;
+}
+
+export interface PatientHistory {
+ id: number;
+ name: string;
+ mobile: string;
+ age: number;
+ gender: string;
+ totalTokens: number;
+ completedTokens: number;
+ upcomingTokens: number;
+ firstVisitDate: string;
+ lastVisitDate: string;
+ tokens: PatientHistoryToken[];
+}
+
+export interface GetHospitalPatientHistoryResponse {
+ message: string;
+ patients: PatientHistory[];
+ totalCount: number;
+ page: number;
+ limit: number;
+}
+
+export interface PatientHistoryFilters {
+ patientIds?: string[];
+ doctorIds?: string[];
+ statuses?: string[];
+ startDate?: string | null;
+ endDate?: string | null;
+}
+
+
+// Export the types from token-types.ts
+export * from './token-types';
\ No newline at end of file
diff --git a/packages/ui/src/common-api-hooks/product.api.tsx b/packages/ui/src/common-api-hooks/product.api.tsx
new file mode 100644
index 0000000..4c684c6
--- /dev/null
+++ b/packages/ui/src/common-api-hooks/product.api.tsx
@@ -0,0 +1,40 @@
+import { useQuery } from "@tanstack/react-query";
+import axios from "../services/axios";
+import type { ProductSummary, GetSlotsProductIdsPayload, GetSlotsProductIdsResponse } from '../../shared-types';
+
+export interface GetProductsSummaryResponse {
+ products: ProductSummary[];
+ count: number;
+}
+
+const getAllProductsSummaryApi = async (): Promise => {
+
+ const response = await axios.get('/cm/products/summary');
+
+ return response.data;
+};
+
+export const useGetAllProductsSummary = () => {
+ return useQuery({
+ queryKey: ['products-summary'],
+ // queryFn: getAllProductsSummaryApi,
+ queryFn: async () => {
+ const response = await axios.get('/cm/products/summary');
+
+ return response.data;
+ }
+ });
+};
+
+const getSlotsProductIdsApi = async (payload: GetSlotsProductIdsPayload): Promise => {
+ const response = await axios.post('/av/products/slots/product-ids', payload);
+ return response.data;
+};
+
+export const useGetSlotsProductIds = (slotIds: number[]) => {
+ return useQuery({
+ queryKey: ['slots-product-ids', slotIds],
+ queryFn: () => getSlotsProductIdsApi({ slotIds }),
+ enabled: slotIds.length > 0,
+ });
+};
\ No newline at end of file
diff --git a/packages/ui/src/components/ImageCarousel.tsx b/packages/ui/src/components/ImageCarousel.tsx
new file mode 100755
index 0000000..36286db
--- /dev/null
+++ b/packages/ui/src/components/ImageCarousel.tsx
@@ -0,0 +1,116 @@
+import React, { useState } from 'react';
+import { View, FlatList, Dimensions, StyleSheet } from 'react-native';
+import ImageViewerURI from './image-viewer';
+import { theme } from '../theme';
+
+interface ImageCarouselProps {
+ urls: string[];
+ imageHeight?: number;
+ imageWidth?: number;
+ showPaginationDots?: boolean;
+}
+
+const { width: screenWidth } = Dimensions.get('window');
+
+const ImageCarousel: React.FC = ({
+ urls,
+ imageHeight = 400,
+ imageWidth = screenWidth,
+ showPaginationDots = true,
+}) => {
+ const [activeIndex, setActiveIndex] = useState(0);
+
+ if (!urls || urls.length === 0) {
+ return null;
+ }
+
+ const handleScroll = (event: any) => {
+ const slideIndex = Math.round(event.nativeEvent.contentOffset.x / imageWidth);
+ setActiveIndex(slideIndex);
+ };
+
+ const renderItem = ({ item }: { item: string }) => (
+
+
+
+ );
+
+ return (
+
+
+ index.toString()}
+ />
+
+ {showPaginationDots && (
+
+ {urls.map((_, index) => (
+
+ ))}
+
+ )}
+
+ );
+};
+
+const styles = StyleSheet.create({
+ wrapper: {
+ alignItems: 'center',
+ },
+ container: {
+ position: 'relative',
+ shadowColor: '#000',
+ shadowOffset: { width: 0, height: 1 },
+ shadowOpacity: 0.1,
+ shadowRadius: 2,
+ elevation: 2,
+ borderWidth: 1,
+ borderColor: '#e5e7eb',
+ borderRadius: 8,
+ overflow: 'hidden',
+ },
+ slide: {
+ justifyContent: 'center',
+ alignItems: 'center',
+ backgroundColor: '#fff',
+ },
+ image: {
+ resizeMode: 'cover',
+ },
+ pagination: {
+ flexDirection: 'row',
+ marginTop: 12,
+ alignSelf: 'center',
+ },
+ dot: {
+ width: 8,
+ height: 8,
+ borderRadius: 4,
+ marginHorizontal: 4,
+ },
+});
+
+export default ImageCarousel;
\ No newline at end of file
diff --git a/packages/ui/src/components/ImageGallery.tsx b/packages/ui/src/components/ImageGallery.tsx
new file mode 100755
index 0000000..a04ca79
--- /dev/null
+++ b/packages/ui/src/components/ImageGallery.tsx
@@ -0,0 +1,71 @@
+import React from 'react';
+import { View, FlatList, Dimensions, StyleSheet, TouchableOpacity } from 'react-native';
+import { Image } from 'expo-image';
+import ImageViewerURI from './image-viewer';
+
+interface ImageGalleryProps {
+ urls: string[];
+ imageHeight?: number;
+ imageWidth?: number;
+ columns?: number;
+}
+
+const { width: screenWidth } = Dimensions.get('window');
+
+const ImageGallery: React.FC = ({
+ urls,
+ imageHeight = 150,
+ imageWidth = screenWidth / 3 - 8, // Default to 3 columns with some margin
+ columns = 3,
+}) => {
+ if (!urls || urls.length === 0) {
+ return null;
+ }
+
+ const numColumns = columns;
+ const containerPadding = 16;
+
+ const renderItem = ({ item }: { item: string }) => (
+
+
+
+ );
+
+ return (
+
+ index.toString()}
+ renderItem={renderItem}
+ showsVerticalScrollIndicator={false}
+ />
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ imageContainer: {
+ margin: 4,
+ borderRadius: 8,
+ overflow: 'hidden',
+ },
+ image: {
+ resizeMode: 'cover',
+ borderRadius: 8,
+ },
+});
+
+export default ImageGallery;
\ No newline at end of file
diff --git a/packages/ui/src/components/ImageGalleryWithDelete.tsx b/packages/ui/src/components/ImageGalleryWithDelete.tsx
new file mode 100644
index 0000000..b2ec412
--- /dev/null
+++ b/packages/ui/src/components/ImageGalleryWithDelete.tsx
@@ -0,0 +1,106 @@
+import React from 'react';
+import { View, FlatList, Dimensions, StyleSheet, TouchableOpacity, Alert } from 'react-native';
+import { Ionicons } from '@expo/vector-icons';
+import ImageViewerURI from './image-viewer';
+
+interface ImageGalleryWithDeleteProps {
+ imageUrls: string[];
+ setImageUrls: (urls: string[]) => void;
+ imageHeight?: number;
+ imageWidth?: number;
+ columns?: number;
+}
+
+const { width: screenWidth } = Dimensions.get('window');
+
+const ImageGalleryWithDelete: React.FC = ({
+ imageUrls,
+ setImageUrls,
+ imageHeight = 150,
+ imageWidth = screenWidth / 3 - 8, // Default to 3 columns with some margin
+ columns = 3,
+}) => {
+ if (!imageUrls || imageUrls.length === 0) {
+ return null;
+ }
+
+ const numColumns = columns;
+ const containerPadding = 16;
+
+ const handleDeleteImage = (index: number) => {
+ Alert.alert(
+ 'Delete Image',
+ 'Are you sure you want to delete this image?',
+ [
+ { text: 'Cancel', style: 'cancel' },
+ {
+ text: 'Delete',
+ style: 'destructive',
+ onPress: () => {
+ const newUrls = imageUrls.filter((_, i) => i !== index);
+ setImageUrls(newUrls);
+ },
+ },
+ ]
+ );
+ };
+
+ const renderItem = ({ item, index }: { item: string; index: number }) => (
+
+
+ handleDeleteImage(index)}
+ >
+
+
+
+ );
+
+ return (
+
+ index.toString()}
+ renderItem={renderItem}
+ showsVerticalScrollIndicator={false}
+ />
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ imageContainer: {
+ margin: 4,
+ borderRadius: 8,
+ overflow: 'hidden',
+ position: 'relative',
+ },
+ image: {
+ resizeMode: 'cover',
+ borderRadius: 8,
+ },
+ deleteButton: {
+ position: 'absolute',
+ top: 4,
+ right: 4,
+ backgroundColor: 'rgba(255, 255, 255, 0.8)',
+ borderRadius: 12,
+ padding: 2,
+ },
+});
+
+export default ImageGalleryWithDelete;
\ No newline at end of file
diff --git a/packages/ui/src/components/ImageUploader.tsx b/packages/ui/src/components/ImageUploader.tsx
new file mode 100755
index 0000000..2c0c89c
--- /dev/null
+++ b/packages/ui/src/components/ImageUploader.tsx
@@ -0,0 +1,79 @@
+import React from "react";
+import { View, TouchableOpacity } from "react-native";
+import { Image } from 'expo-image';
+import MyText from "./text";
+import tw from '../lib/tailwind';
+import Ionicons from "@expo/vector-icons/Ionicons";
+import { MaterialIcons } from "@expo/vector-icons";
+
+interface ImageUploaderProps {
+ images: { uri?: string }[];
+ onAddImage: () => void;
+ onRemoveImage: (uri: string) => void;
+ existingImageUrls?: string[]; // URLs of existing images that should be displayed
+ onRemoveExistingImage?: (url: string) => void; // Callback to track which existing images are removed
+ allowMultiple?: boolean; // Whether to allow multiple image uploads
+}
+
+const ImageUploader: React.FC = ({
+ images,
+ existingImageUrls = [],
+ onAddImage,
+ onRemoveImage,
+ onRemoveExistingImage,
+ allowMultiple = true,
+}) => {
+
+ const totalImageCount = images.length + existingImageUrls.length;
+ return (
+
+
+ {/* Render existing images with URLs */}
+ {existingImageUrls.map((url, index) => (
+
+
+ onRemoveExistingImage?.(url)}
+ style={tw`absolute top-0 right-0 bg-red-500 rounded-full p-1`}
+ >
+
+
+
+ ))}
+ {/* Render newly added images */}
+ {images.map((image, index) => (
+
+
+ onRemoveImage(image.uri!)}
+ style={tw`absolute top-0 right-0 bg-red-500 rounded-full p-1`}
+ >
+
+
+
+ ))}
+ = 1} onPress={onAddImage} style={tw`w-1/3 px-1 mb-2`}>
+
+ {!allowMultiple && totalImageCount >= 1 ? (
+
+ Only one image allowed
+
+ ) :
+
+ }
+
+
+
+
+ );
+};
+
+export default ImageUploader;
\ No newline at end of file
diff --git a/packages/ui/src/components/MyStatusBar.tsx b/packages/ui/src/components/MyStatusBar.tsx
new file mode 100644
index 0000000..738a6d2
--- /dev/null
+++ b/packages/ui/src/components/MyStatusBar.tsx
@@ -0,0 +1,19 @@
+import React from 'react';
+import { StatusBar as RNStatusBar } from 'react-native';
+import { StatusBar as ExpoStatusBar } from 'expo-status-bar';
+import { useStatusBarStore } from '../lib/status-bar-store';
+
+const MyStatusBar: React.FC = () => {
+ const { barStyle, backgroundColor } = useStatusBarStore();
+
+ // Map expo-status-bar style values to react-native barStyle values
+ const rnBarStyle = barStyle === 'light' ? 'light-content' : 'dark-content';
+
+ return (
+ //
+ //
+ <>>
+ );
+};
+
+export default MyStatusBar;
\ No newline at end of file
diff --git a/packages/ui/src/components/PaginatedDataTable.tsx b/packages/ui/src/components/PaginatedDataTable.tsx
new file mode 100755
index 0000000..243ff2c
--- /dev/null
+++ b/packages/ui/src/components/PaginatedDataTable.tsx
@@ -0,0 +1,76 @@
+import React from 'react';
+import { DataTable } from 'react-native-paper';
+import dayjs from 'dayjs';
+
+// Define the shape of a single token item
+interface Token {
+ id: number;
+ queueNum: number;
+ tokenDate: string;
+ doctorName: string;
+ patientName: string;
+ status: string;
+}
+
+// Define the props for the component
+interface PaginatedDataTableProps {
+ tokens: Token[];
+ page: number;
+ numberOfPages: number;
+ onPageChange: (page: number) => void;
+ from: number;
+ to: number;
+ totalCount: number;
+ numberOfItemsPerPageList: number[];
+ itemsPerPage: number;
+ onItemsPerPageChange: (itemsPerPage: number) => void;
+}
+
+const PaginatedDataTable: React.FC = ({
+ tokens,
+ page,
+ numberOfPages,
+ onPageChange,
+ from,
+ to,
+ totalCount,
+ numberOfItemsPerPageList,
+ itemsPerPage,
+ onItemsPerPageChange,
+}) => {
+ return (
+
+
+ Q.No
+ Date
+ Doctor
+ Patient
+ Status
+
+
+ {tokens.map((token) => (
+
+ {token.queueNum}
+ {dayjs(token.tokenDate).format('DD-MM-YY')}
+ {token.doctorName}
+ {token.patientName}
+ {token.status}
+
+ ))}
+
+
+
+ );
+};
+
+export default PaginatedDataTable;
\ No newline at end of file
diff --git a/packages/ui/src/components/app-container.tsx b/packages/ui/src/components/app-container.tsx
new file mode 100755
index 0000000..4302842
--- /dev/null
+++ b/packages/ui/src/components/app-container.tsx
@@ -0,0 +1,33 @@
+import tw from "../lib/tailwind";
+import React from "react";
+import { KeyboardAvoidingView, Platform, ScrollView, View, RefreshControl } from "react-native";
+import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
+import { useRefresh } from "../lib/refresh-context";
+
+interface Props {
+ children: React.ReactNode;
+}
+
+function AppContainer(props: Props) {
+ const { children } = props;
+ const { refreshAll } = useRefresh();
+
+ return (
+
+ }
+ automaticallyAdjustKeyboardInsets={true}
+ >
+
+ {children}
+
+
+ );
+}
+
+export default AppContainer;
diff --git a/packages/ui/src/components/bottom-dropdown.tsx b/packages/ui/src/components/bottom-dropdown.tsx
new file mode 100644
index 0000000..16a80c1
--- /dev/null
+++ b/packages/ui/src/components/bottom-dropdown.tsx
@@ -0,0 +1,265 @@
+import React, { useState, useCallback, useRef, useEffect } from 'react';
+import { Text, View, TouchableOpacity, ScrollView, TextInput } from 'react-native';
+import { Ionicons } from '@expo/vector-icons';
+import { BottomDialog } from './dialog';
+import MyText from './text';
+import { useTheme } from '../../hooks/theme-context';
+import tw from '../lib/tailwind';
+import { colors } from '../lib/theme-colors';
+
+export interface DropdownOption {
+ label: string;
+ value: string | number;
+ disabled?: boolean;
+}
+
+interface BottomDropdownProps {
+ label: string;
+ topLabel?: string;
+ value: string | number | string[] | number[];
+ options: DropdownOption[];
+ onValueChange: (value: string | number | string[] | number[]) => void;
+ multiple?: boolean;
+ error?: boolean;
+ style?: any;
+ placeholder?: string;
+ disabled?: boolean;
+ className?: string;
+ triggerComponent?: React.ComponentType<{
+ onPress: () => void;
+ disabled?: boolean;
+ displayText: string;
+ }>;
+ onSearch?: (query: string) => void;
+}
+
+const BottomDropdown: React.FC = ({
+ label,
+ topLabel,
+ value,
+ options,
+ onValueChange,
+ multiple = false,
+ error,
+ style,
+ placeholder,
+ disabled,
+ className,
+ triggerComponent,
+ onSearch,
+}) => {
+ const { theme } = useTheme();
+ const [isOpen, setIsOpen] = useState(false);
+ const [searchQuery, setSearchQuery] = useState('');
+ const debounceTimeoutRef = useRef(null);
+
+ // Debounced search function
+ const debouncedOnSearch = useCallback((query: string) => {
+ if (debounceTimeoutRef.current) {
+ clearTimeout(debounceTimeoutRef.current);
+ }
+ debounceTimeoutRef.current = setTimeout(() => {
+ onSearch?.(query);
+ }, 2000);
+ }, [onSearch]);
+
+ // Cleanup on unmount
+ useEffect(() => {
+ return () => {
+ if (debounceTimeoutRef.current) {
+ clearTimeout(debounceTimeoutRef.current);
+ }
+ };
+ }, []);
+
+ // Filter options based on search query
+ const filteredOptions = options.filter(option =>
+ option.label.toLowerCase().includes(searchQuery.toLowerCase())
+ );
+
+ const getDisplayText = () => {
+ if (multiple) {
+ const selectedValues = value as string[];
+ if (selectedValues.length === 0) return placeholder ?? label;
+
+ const selectedLabels = options
+ .filter(option => selectedValues.includes(option.value as string))
+ .map(option => option.label);
+
+ return selectedLabels.length > 0 ? selectedLabels.join(', ') : (placeholder ?? label);
+ } else {
+ const selectedOption = options.find(option => option.value === value);
+ return selectedOption ? selectedOption.label : (placeholder ?? label);
+ }
+ };
+
+ const handleSelect = (optionValue: string | number) => {
+ if (multiple) {
+ const currentValues = value as string[];
+ const newValues = currentValues.includes(optionValue as string)
+ ? currentValues.filter(v => v !== optionValue)
+ : [...currentValues, optionValue as string];
+ onValueChange(newValues);
+ } else {
+ onValueChange(optionValue);
+ setIsOpen(false);
+ }
+ };
+
+ const handleDone = () => {
+ setIsOpen(false);
+ setSearchQuery(''); // Clear search when done
+ if (debounceTimeoutRef.current) {
+ clearTimeout(debounceTimeoutRef.current);
+ debounceTimeoutRef.current = null;
+ }
+ };
+
+ const isSelected = (optionValue: string | number) => {
+ if (multiple) {
+ return (value as string[]).includes(optionValue as string);
+ } else {
+ return value === optionValue;
+ }
+ };
+
+ return (
+
+ {topLabel && (
+
+ {topLabel}
+
+ )}
+ {triggerComponent ? (
+ React.createElement(triggerComponent, {
+ onPress: () => !disabled && setIsOpen(true),
+ disabled,
+ displayText: getDisplayText(),
+ })
+ ) : (
+ !disabled && setIsOpen(true)}
+ disabled={disabled}
+ >
+ 0 : options.some(opt => opt.value === value))
+ ? tw`text-gray-900 font-medium`
+ : tw`text-gray-500`,
+ disabled && tw`text-gray-400`,
+ ]}
+ numberOfLines={1}
+ >
+ {getDisplayText()}
+
+
+
+ )}
+
+ {
+ setIsOpen(false);
+ setSearchQuery(''); // Clear search when closed
+ if (debounceTimeoutRef.current) {
+ clearTimeout(debounceTimeoutRef.current);
+ debounceTimeoutRef.current = null;
+ }
+ }}>
+
+ {label}
+
+ {/* Search Input - Fixed at top */}
+ {onSearch && (
+
+ {
+ setSearchQuery(text);
+ debouncedOnSearch(text);
+ }}
+ autoFocus={true}
+ clearButtonMode="while-editing"
+ />
+
+ )}
+
+
+ {filteredOptions.length === 0 && searchQuery ? (
+
+
+ No options found for "{searchQuery}"
+
+
+ ) : (
+ filteredOptions.map((option) => {
+ const selected = isSelected(option.value);
+ const isDisabled = option.disabled || disabled;
+ return (
+ !isDisabled && handleSelect(option.value)}
+ disabled={isDisabled}
+ >
+
+ {(() => {
+ const labelStr = option.label as string;
+ const [code, rest] = labelStr.split(' - ', 2);
+ return (
+ <>
+ {code}
+ {rest ? ` - ${rest}` : ''}
+ >
+ );
+ })()}
+
+ {selected && (
+
+ )}
+
+ );
+ })
+ )}
+
+ {multiple && (
+
+
+ Done
+
+
+ )}
+
+
+
+ );
+};
+
+export default BottomDropdown;
\ No newline at end of file
diff --git a/packages/ui/src/components/button.tsx b/packages/ui/src/components/button.tsx
new file mode 100755
index 0000000..ee535eb
--- /dev/null
+++ b/packages/ui/src/components/button.tsx
@@ -0,0 +1,95 @@
+import React from "react";
+import { Button as PaperButton, ButtonProps } from "react-native-paper";
+// import { useTheme } from "../hooks/theme-context";
+import { theme, useTheme } from "common-ui";
+import { TouchableOpacity } from "react-native";
+import MyText from "./text"; // Updated import path
+
+
+// Omit 'children' from ButtonProps so it can't be passed
+interface Props extends Omit {
+ variant?: "blue" | "red" | "green";
+ fillColor?: keyof ReturnType["theme"]["colors"];
+ textColor?: keyof ReturnType["theme"]["colors"];
+ borderColor?: keyof ReturnType["theme"]["colors"];
+ fullWidth?: boolean;
+ textContent?: string;
+ children?: React.ReactNode;
+}
+
+function MyButton({
+ variant = "blue",
+ fullWidth,
+ fillColor,
+ textColor,
+ borderColor,
+ children,
+ textContent,
+ ...props
+}: Props) {
+ const { colors } = useTheme().theme;
+ let backgroundColor = colors.brand500;
+ if (variant === "red") backgroundColor = colors.red1;
+ if (variant === "green") backgroundColor = theme.colors.brand500
+ if (fillColor && colors[fillColor]) backgroundColor = colors[fillColor];
+
+ let finalTextColor = "#fff";
+ if (textColor && colors[textColor]) finalTextColor = colors[textColor];
+
+ let borderCol = backgroundColor;
+ if (borderColor && colors[borderColor]) borderCol = colors[borderColor];
+
+ const labelStyle = {
+ color: finalTextColor,
+ fontWeight: "400" as const,
+ ...(props.labelStyle as object),
+ };
+
+ return (
+
+ {textContent ? {textContent} : children}
+
+ );
+}
+
+// MyTextButton props: same as Props, but no children and with an extra 'text' property
+interface MyTextButtonProps extends Omit {
+ text: string;
+}
+
+export function MyTextButton({
+ variant = "blue",
+ fillColor,
+ textColor,
+ text,
+ ...props
+}: MyTextButtonProps) {
+ return (
+
+ {text}
+
+ );
+}
+
+export default MyButton;
\ No newline at end of file
diff --git a/packages/ui/src/components/checkbox.tsx b/packages/ui/src/components/checkbox.tsx
new file mode 100755
index 0000000..e921881
--- /dev/null
+++ b/packages/ui/src/components/checkbox.tsx
@@ -0,0 +1,56 @@
+import { useTheme } from "common-ui";
+import { MaterialCommunityIcons } from '@expo/vector-icons';
+import React from 'react';
+import { Platform, TouchableOpacity, ViewStyle } from 'react-native';
+// import { useTheme } from '../hooks/theme-context';
+
+interface CheckboxProps {
+ checked: boolean;
+ onPress?: () => void;
+ style?: ViewStyle;
+ size?: number;
+ color?: string;
+ disabled?: boolean;
+ checkedColor?: string; // deprecated, use checkColor
+ fillColor?: string; // new prop for box/circle fill
+ checkColor?: string; // new prop for check/tick color
+}
+
+const Checkbox: React.FC = ({
+ checked,
+ onPress,
+ style,
+ size = 24,
+ disabled = false,
+ checkedColor, // deprecated
+ fillColor,
+ checkColor,
+}) => {
+ const { colors } = useTheme().theme;
+ const fill = fillColor || colors.brand500;
+ const check = checkColor || colors.white1;
+ const iconName = Platform.OS === 'android'
+ ? checked ? 'checkbox-marked' : 'checkbox-blank-outline'
+ : checked ? 'checkbox-marked-circle' : 'checkbox-blank-circle-outline';
+
+ return (
+
+
+ {/* If checked, overlay a check icon with checkColor (for circle/box) */}
+ {/* Not implemented here due to icon limitations, but checkColor is available for future use */}
+
+ );
+};
+
+export default Checkbox;
diff --git a/packages/ui/src/components/data-table.tsx b/packages/ui/src/components/data-table.tsx
new file mode 100755
index 0000000..483a21d
--- /dev/null
+++ b/packages/ui/src/components/data-table.tsx
@@ -0,0 +1,76 @@
+import React from 'react';
+import { StyleProp, ViewStyle } from 'react-native';
+import { DataTable as PaperDataTable } from 'react-native-paper';
+
+// Define a generic column configuration
+export interface Column {
+ header: string;
+ accessor: keyof T;
+ style?: StyleProp;
+ render?: (row: T) => React.ReactNode;
+}
+
+// Define the props for the component, using a generic type T
+interface DataTableProps {
+ data: T[];
+ columns: Column[];
+ page: number;
+ numberOfPages: number;
+ onPageChange: (page: number) => void;
+ from: number;
+ to: number;
+ totalCount: number;
+ numberOfItemsPerPageList: number[];
+ itemsPerPage: number;
+ onItemsPerPageChange: (itemsPerPage: number) => void;
+}
+
+const DataTable = ({ // The data objects must have a unique 'id' property
+ data,
+ columns,
+ page,
+ numberOfPages,
+ onPageChange,
+ from,
+ to,
+ totalCount,
+ numberOfItemsPerPageList,
+ itemsPerPage,
+ onItemsPerPageChange,
+}: DataTableProps) => {
+ return (
+
+
+ {columns.map((col, index) => (
+
+ {col.header}
+
+ ))}
+
+
+ {data.map((row) => (
+
+ {columns.map((col, index) => (
+
+ {col.render ? col.render(row) : String(row[col.accessor] ?? '')}
+
+ ))}
+
+ ))}
+
+
+
+ );
+};
+
+export default DataTable;
\ No newline at end of file
diff --git a/packages/ui/src/components/date-picker.tsx b/packages/ui/src/components/date-picker.tsx
new file mode 100755
index 0000000..b7d5fd0
--- /dev/null
+++ b/packages/ui/src/components/date-picker.tsx
@@ -0,0 +1,100 @@
+import { MaterialCommunityIcons } from "@expo/vector-icons";
+import DateTimePicker, {
+ AndroidNativeProps,
+ DateTimePickerAndroid,
+ DateTimePickerEvent,
+} from "@react-native-community/datetimepicker";
+import React, { useState } from "react";
+import {
+ Modal,
+ Platform,
+ Text,
+ TouchableOpacity,
+ View,
+} from "react-native";
+import MyText from "./text";
+import { useTheme, tw } from "common-ui";
+
+interface Props {
+ value: Date | null;
+ setValue: (date: Date | null) => void;
+ showLabel?: boolean; // Optional prop to control label visibility
+ placeholder?: string; // Optional custom placeholder
+}
+
+function DatePicker(props: Props) {
+ const { value, setValue, showLabel = true, placeholder = "Select Date" } = props;
+ const [show, setShow] = useState(false);
+ const { theme } = useTheme();
+
+ const onChange = (event: DateTimePickerEvent, selectedDate?: Date) => {
+ const currentDate = selectedDate || value;
+ if (Platform.OS === "ios") setShow(false);
+ setValue(currentDate);
+ };
+
+ const showDatepicker = () => {
+ if (Platform.OS === "android") {
+ DateTimePickerAndroid.open({
+ value: value || new Date(),
+ onChange: onChange,
+ mode: "date",
+ is24Hour: true,
+ display: "default",
+ } as AndroidNativeProps);
+ } else {
+ setShow(true);
+ }
+ };
+
+ return (
+
+
+ {showLabel && {placeholder}}
+
+
+ {value?.toLocaleDateString() || placeholder}
+
+
+
+
+
+ {/* Conditional rendering for iOS, as it uses the declarative API */}
+ {show && Platform.OS === "ios" && (
+ setShow(false)}
+ >
+
+
+
+ setShow(false)}
+ style={tw`mt-2.5 bg-blue-500 rounded py-2.5 items-center`}
+ >
+ Done
+
+
+
+
+ )}
+
+ );
+}
+
+export default DatePicker;
\ No newline at end of file
diff --git a/packages/ui/src/components/date-time-picker.tsx b/packages/ui/src/components/date-time-picker.tsx
new file mode 100755
index 0000000..73faa69
--- /dev/null
+++ b/packages/ui/src/components/date-time-picker.tsx
@@ -0,0 +1,153 @@
+import { MaterialCommunityIcons } from "@expo/vector-icons";
+import DateTimePicker, {
+ AndroidNativeProps,
+ DateTimePickerAndroid,
+ DateTimePickerEvent,
+} from "@react-native-community/datetimepicker";
+import React, { useState } from "react";
+import {
+ Modal,
+ Platform,
+ Text,
+ TouchableOpacity,
+ View,
+} from "react-native";
+
+import { useTheme, tw } from "common-ui";
+import MyText from './text';
+
+interface Props {
+ value: Date | null;
+ setValue: (date: Date | null) => void;
+ showLabels?: boolean; // Optional prop to control label visibility
+ timeOnly?: boolean; // Optional prop to show only time picker
+}
+
+type Mode = "date" | "time" | "datetime";
+
+function DateTimePickerMod(props: Props) {
+ const { value, setValue, showLabels = true, timeOnly = false } = props;
+ const [show, setShow] = useState(false);
+ const [mode, setMode] = useState("date");
+
+ const onChange = (event: DateTimePickerEvent, selectedDate?: Date) => {
+ const currentDate = selectedDate || value;
+ if (Platform.OS === "ios") setShow(false);
+ setValue(currentDate);
+ };
+
+ const showMode = (currentMode: Mode) => {
+ if (Platform.OS === "android") {
+ DateTimePickerAndroid.open({
+ value: value || new Date(),
+ onChange: onChange,
+ mode: currentMode,
+ is24Hour: true,
+ display: "default",
+ } as AndroidNativeProps);
+ } else {
+ setShow(true);
+ setMode(currentMode);
+ }
+ };
+ const showDatepicker = () => {
+ showMode("date");
+ };
+
+ const showTimepicker = () => {
+ showMode("time");
+ };
+ const { theme } = useTheme();
+
+ return (
+
+ {timeOnly ? (
+
+ {showLabels && Select Time}
+
+
+ {value?.toLocaleTimeString([], {
+ hour: "2-digit",
+ minute: "2-digit",
+ }) || "Select Time"}
+
+
+
+
+ ) : (
+
+
+ {showLabels && Select Date}
+
+ {value?.toLocaleDateString() || "Select Date"}
+
+
+
+
+
+ {showLabels && Select Time}
+
+
+ {value?.toLocaleTimeString([], {
+ hour: "2-digit",
+ minute: "2-digit",
+ }) || "Select Time"}
+
+
+
+
+
+ )}
+ {/* Conditional rendering for iOS, as it uses the declarative API */}
+ {show && Platform.OS === "ios" && (
+ setShow(false)}
+ >
+
+
+
+ setShow(false)}
+ style={tw`mt-2.5 bg-blue-500 rounded py-2.5 items-center`}
+ >
+ Done
+
+
+
+
+ )}
+
+ );
+}
+
+export default DateTimePickerMod;
+
+
diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsx
new file mode 100755
index 0000000..05ece7b
--- /dev/null
+++ b/packages/ui/src/components/dialog.tsx
@@ -0,0 +1,182 @@
+import React, { ReactNode, useState } from 'react';
+import { Modal, View, TouchableOpacity, StyleSheet, Animated, Easing, Dimensions, TextInput } from 'react-native';
+import MyText from './text';
+import { MyButton } from 'common-ui';
+
+interface DialogProps {
+ open: boolean;
+ onClose: () => void;
+ children: ReactNode;
+ enableDismiss?: boolean;
+}
+
+const SCREEN_HEIGHT = Dimensions.get('window').height;
+
+export const BottomDialog: React.FC = ({ open, onClose, children, enableDismiss = true }) => {
+ const [slideAnim] = useState(new Animated.Value(SCREEN_HEIGHT));
+
+ React.useEffect(() => {
+ if (open) {
+ Animated.timing(slideAnim, {
+ toValue: 0,
+ duration: 300,
+ easing: Easing.out(Easing.cubic),
+ useNativeDriver: true,
+ }).start();
+ } else {
+ Animated.timing(slideAnim, {
+ toValue: SCREEN_HEIGHT,
+ duration: 200,
+ useNativeDriver: true,
+ }).start();
+ }
+ }, [open]);
+
+ return (
+
+ {enableDismiss ? (
+
+ ) : (
+
+ )}
+
+
+ {children}
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ backdrop: {
+ flex: 1,
+ backgroundColor: 'rgba(0,0,0,0.3)',
+ },
+ disabledBackdrop: {
+ pointerEvents: 'none',
+ },
+ dialog: {
+ position: 'absolute',
+ left: 0,
+ right: 0,
+ // top: SCREEN_HEIGHT * 0.3,
+ bottom: 0,
+ backgroundColor: '#fff',
+ borderTopLeftRadius: 18,
+ borderTopRightRadius: 18,
+ paddingHorizontal: 20,
+ // paddingTop: 16,
+ paddingBottom: 0,
+ elevation: 8,
+ shadowColor: '#000',
+ shadowOffset: { width: 0, height: -2 },
+ shadowOpacity: 0.2,
+ shadowRadius: 8,
+ },
+ handle: {
+ width: 40,
+ height: 5,
+ borderRadius: 3,
+ backgroundColor: '#ccc',
+ alignSelf: 'center',
+ // marginBottom: 12,
+ },
+});
+
+const commentStyles = StyleSheet.create({
+ container: {
+ marginBottom: 16,
+ },
+ input: {
+ borderWidth: 1,
+ borderColor: '#ccc',
+ borderRadius: 8,
+ padding: 10,
+ minHeight: 80,
+ fontSize: 16,
+ },
+});
+
+export default BottomDialog;
+
+interface ConfirmationDialogProps {
+ open: boolean;
+ positiveAction: (comment?: string) => void;
+ commentNeeded?: boolean;
+ negativeAction?: () => void;
+ title?: string;
+ message?: string;
+ confirmText?: string;
+ cancelText?: string;
+}
+
+export const ConfirmationDialog: React.FC = (props) => {
+ const {
+ open,
+ positiveAction,
+ commentNeeded = false,
+ negativeAction,
+ title = "Are you sure?",
+ message = "Do you really want to proceed with this action?",
+ confirmText = "Confirm",
+ cancelText = "Cancel"
+ } = props;
+
+ const [comment, setComment] = useState('');
+
+ const handleConfirm = () => {
+ positiveAction(commentNeeded ? comment : undefined);
+ setComment(''); // Reset comment after action
+ };
+
+ const handleCancel = () => {
+ if (negativeAction) {
+ negativeAction();
+ }
+ setComment(''); // Reset comment on cancel
+ };
+
+ return (
+
+
+
+ {title}
+
+
+ {message}
+
+
+ {commentNeeded && (
+
+
+
+ )}
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/packages/ui/src/components/dropdown.tsx b/packages/ui/src/components/dropdown.tsx
new file mode 100755
index 0000000..23633e3
--- /dev/null
+++ b/packages/ui/src/components/dropdown.tsx
@@ -0,0 +1,80 @@
+import tw from "../lib/tailwind";
+import React from "react";
+import { Text, View } from "react-native";
+import { Dropdown } from "react-native-element-dropdown";
+
+export interface DropdownOption {
+ label: string;
+ value: string | number;
+}
+
+interface Props {
+ label: string;
+ value: string | number;
+ options: DropdownOption[];
+ onValueChange: (value: string | number) => void;
+ error?: boolean;
+ style?: any;
+ placeholder?: string;
+ disabled?: boolean;
+ className?: string;
+}
+
+const CustomDropdown: React.FC = ({
+ label,
+ value,
+ options,
+ onValueChange,
+ error,
+ style,
+ placeholder,
+ disabled,
+ className,
+}) => {
+ return (
+
+ onValueChange(item.value)}
+ placeholder={placeholder ?? label}
+ placeholderStyle={[tw`text-gray-500`, disabled && tw`text-gray-400`]}
+ style={[
+ tw`border rounded-md px-3 py-2 bg-white`,
+ error ? tw`border-red-500` : tw`border-gray-300`,
+ disabled && tw`bg-gray-100 border-gray-200`,
+ tw`${className || ''}`,
+ ]}
+ disable={disabled}
+ renderItem={(item: DropdownOption) => {
+ const isSelected = value === item.value;
+ return (
+
+
+ {item.label}
+
+
+ );
+ }}
+ selectedTextStyle={disabled ? tw`text-gray-400` : tw`text-gray-800 font-medium`}
+ // the dropdown's listProps / containerProps can be tuned if needed:
+ // dropdownStyle etc. Example:
+ // dropdownStyle={tw`bg-white`}
+ />
+
+ );
+};
+
+export default CustomDropdown;
diff --git a/packages/ui/src/components/flat-list.tsx b/packages/ui/src/components/flat-list.tsx
new file mode 100644
index 0000000..aa83da8
--- /dev/null
+++ b/packages/ui/src/components/flat-list.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+import { FlatList, FlatListProps, View, RefreshControl } from 'react-native';
+import { useRefresh } from '../lib/refresh-context';
+
+const MyFlatList = (props: FlatListProps & { onRefresh?: () => void }) => {
+ const { refreshAll } = useRefresh();
+ const { onRefresh, ...restProps } = props;
+ return (
+
+ }
+ />
+
+ );
+};
+
+export default MyFlatList;
\ No newline at end of file
diff --git a/packages/ui/src/components/google-sign-in.tsx b/packages/ui/src/components/google-sign-in.tsx
new file mode 100644
index 0000000..bc5023f
--- /dev/null
+++ b/packages/ui/src/components/google-sign-in.tsx
@@ -0,0 +1,36 @@
+import * as React from 'react';
+import * as AuthSession from 'expo-auth-session';
+import * as WebBrowser from 'expo-web-browser';
+import { Button, View } from 'react-native';
+import * as Google from 'expo-auth-session/providers/google';
+import MyButton from './button';
+
+const discovery = {
+ authorizationEndpoint: 'http://localhost:8081/api/auth/authorize',
+ tokenEndpoint: 'http://localhost:8081/api/auth/token',
+};
+
+const config:AuthSession.AuthRequestConfig = {
+ clientId: "google",
+ scopes: ['profile', 'email', 'openid'],
+ redirectUri: AuthSession.makeRedirectUri()
+}
+
+WebBrowser.maybeCompleteAuthSession();
+export default function GoogleSignInPKCE() {
+
+ const [request, response, promptAsync] = AuthSession.useAuthRequest(config, discovery);
+
+ React.useEffect(() => {
+ console.log(JSON.stringify(response))
+
+ },[response])
+
+
+ return (
+
+ {/* promptAsync()} /> */}
+ promptAsync()} />
+
+ );
+}
diff --git a/packages/ui/src/components/icons/CartIcon.tsx b/packages/ui/src/components/icons/CartIcon.tsx
new file mode 100644
index 0000000..aaa878c
--- /dev/null
+++ b/packages/ui/src/components/icons/CartIcon.tsx
@@ -0,0 +1,32 @@
+import React from 'react';
+import Svg, { Path } from 'react-native-svg';
+
+interface CartIconProps {
+ focused: boolean;
+ size: number;
+ color: string;
+}
+
+const CartIcon: React.FC = ({ focused, size, color }) => {
+ if (focused) {
+ // Focused state SVG (cart without handle)
+ return (
+
+ );
+ } else {
+ // Unfocused state SVG (full cart)
+ return (
+
+ );
+ }
+};
+
+export default CartIcon;
\ No newline at end of file
diff --git a/packages/ui/src/components/image-viewer.tsx b/packages/ui/src/components/image-viewer.tsx
new file mode 100755
index 0000000..09988d2
--- /dev/null
+++ b/packages/ui/src/components/image-viewer.tsx
@@ -0,0 +1,133 @@
+import React, { useState } from "react";
+import {
+ Modal,
+ View,
+ Image,
+ TouchableOpacity,
+ StyleSheet,
+ Dimensions,
+ ActivityIndicator,
+ Platform,
+} from "react-native";
+import { Ionicons } from "@expo/vector-icons";
+
+interface ImageViewerProps {
+ uri: string;
+ style?: any;
+}
+
+const ImageViewerURI: React.FC = ({ uri, style }) => {
+ const [open, setOpen] = useState(false);
+ const screen = Dimensions.get("window");
+ const [loading, setLoading] = useState(false);
+
+ const markLoading = () => {
+
+ if(!Boolean(uri) || Platform.OS === "web") return;
+ setLoading(true);
+ setTimeout(() => {
+ setLoading(false);
+ }, 30000); // Simulate loading for 30 seconds
+ }
+
+ return (
+ <>
+ setOpen(true)}>
+
+ {loading && (
+
+ )}
+ setLoading(false)}
+ source={{ uri }}
+ style={style}
+ resizeMode="cover"
+ />
+
+
+ setOpen(false)}
+ >
+
+ setOpen(false)}
+ >
+
+
+ setOpen(false)}
+ >
+ {loading && (
+
+
+
+ )}
+
+
+
+
+ >
+ );
+};
+
+const styles = StyleSheet.create({
+ loadingContainer: {
+ position: "absolute",
+ left: 0,
+ right: 0,
+ top: 0,
+ bottom: 0,
+ justifyContent: "center",
+ alignItems: "center",
+ zIndex: 10,
+ backgroundColor: "rgba(255,255,255,0.3)",
+ },
+ backdrop: {
+ flex: 1,
+ backgroundColor: "rgba(0,0,0,0.85)",
+ justifyContent: "center",
+ alignItems: "center",
+ },
+ closeBtn: {
+ position: "absolute",
+ top: 32,
+ right: 24,
+ zIndex: 10,
+ backgroundColor: "rgba(0,0,0,0.5)",
+ borderRadius: 20,
+ padding: 4,
+ },
+ flex: {
+ flex: 1,
+ justifyContent: "center",
+ alignItems: "center",
+ },
+});
+
+export default ImageViewerURI;
diff --git a/packages/ui/src/components/loading-dialog.tsx b/packages/ui/src/components/loading-dialog.tsx
new file mode 100644
index 0000000..7f08e8e
--- /dev/null
+++ b/packages/ui/src/components/loading-dialog.tsx
@@ -0,0 +1,36 @@
+import React from 'react';
+import { View, ActivityIndicator, Modal, TouchableOpacity } from 'react-native';
+import tw from '../lib/tailwind';
+import MyText from './text';
+
+interface LoadingDialogProps {
+ open: boolean;
+ message?: string;
+}
+
+export const LoadingDialog: React.FC = ({
+ open,
+ message = 'Loading...'
+}) => {
+ return (
+ {}} // Non-dismissible loading dialog
+ >
+ {}} // Prevent dismissal
+ >
+
+
+ {message}
+
+
+
+ );
+};
+
+export default LoadingDialog;
\ No newline at end of file
diff --git a/packages/ui/src/components/mini-quantifier.tsx b/packages/ui/src/components/mini-quantifier.tsx
new file mode 100644
index 0000000..7fe925f
--- /dev/null
+++ b/packages/ui/src/components/mini-quantifier.tsx
@@ -0,0 +1,40 @@
+import React from 'react';
+import { View, TouchableOpacity, Text } from 'react-native';
+import { MaterialIcons } from '@expo/vector-icons';
+import tw from '../lib/tailwind';
+import CartIcon from './icons/CartIcon';
+
+interface MiniQuantifierProps {
+ value: number;
+ onChange: (value: number) => void;
+ showUnits?: boolean;
+ unit?: string;
+ step?: number;
+}
+
+const MiniQuantifier: React.FC = ({ value, onChange, showUnits = false, unit, step = 1 }) => (
+
+ onChange(Math.max(0, value - step))}
+ activeOpacity={0.7}
+ >
+
+
+
+ {value}
+ {showUnits && unit && (
+ {unit}
+ )}
+
+ onChange(value + step)}
+ activeOpacity={0.7}
+ >
+
+
+
+);
+
+export default MiniQuantifier;
\ No newline at end of file
diff --git a/packages/ui/src/components/multi-select.tsx b/packages/ui/src/components/multi-select.tsx
new file mode 100755
index 0000000..9d78152
--- /dev/null
+++ b/packages/ui/src/components/multi-select.tsx
@@ -0,0 +1,118 @@
+import React from 'react';
+import { ImageStyle, StyleSheet, TextStyle, View, ViewStyle, Text } from 'react-native';
+import { Image } from 'expo-image';
+import { MultiSelect } from 'react-native-element-dropdown';
+
+export interface DropdownOption {
+ label: string;
+ value: string;
+}
+
+export interface MultiSelectDropdownProps {
+ data: DropdownOption[];
+ value: string[];
+ onChange: (value: string[]) => void;
+ placeholder?: string;
+ labelField?: string;
+ valueField?: string;
+ style?: ViewStyle;
+ dropdownStyle?: ViewStyle;
+ placeholderStyle?: TextStyle;
+ selectedTextStyle?: TextStyle;
+ inputSearchStyle?: TextStyle;
+ iconStyle?: ImageStyle;
+ search?: boolean;
+ maxHeight?: number;
+ disabled?: boolean;
+}
+
+const MultiSelectDropdown: React.FC = ({
+ data,
+ value,
+ onChange,
+ placeholder = 'Select',
+ labelField = 'label',
+ valueField = 'value',
+ style,
+ dropdownStyle,
+ placeholderStyle,
+ selectedTextStyle,
+ inputSearchStyle,
+ iconStyle,
+ search = true,
+ maxHeight = 300,
+ disabled = false,
+}) => {
+ return (
+
+ {
+ const isSelected = value.includes(item.value);
+ return (
+
+
+ {item.label}
+
+
+ );
+ }}
+ />
+
+ );
+};
+
+const styles = StyleSheet.create({
+ dropdown: {
+ borderColor: '#ccc',
+ borderWidth: 1,
+ borderRadius: 8,
+ padding: 8,
+ backgroundColor: '#fff',
+ },
+ placeholderStyle: {
+ color: '#888',
+ fontSize: 16,
+ },
+ selectedTextStyle: {
+ color: '#333',
+ fontSize: 16,
+ fontWeight: 'bold',
+ },
+ itemTextStyle: {
+ color: '#333',
+ fontSize: 16,
+ },
+ inputSearchStyle: {
+ color: '#333',
+ fontSize: 16,
+ },
+ iconStyle: {
+ width: 24,
+ height: 24,
+ } as ImageStyle,
+ item: {
+ padding: 10,
+ borderRadius: 6,
+ backgroundColor: '#fff',
+ marginVertical: 2,
+ },
+ selectedItem: {
+ backgroundColor: '#e0f0ff', // Light blue for selected
+ },
+});
+
+export default MultiSelectDropdown;
diff --git a/packages/ui/src/components/profile-image.tsx b/packages/ui/src/components/profile-image.tsx
new file mode 100644
index 0000000..9b71555
--- /dev/null
+++ b/packages/ui/src/components/profile-image.tsx
@@ -0,0 +1,70 @@
+import React from 'react';
+import { TouchableOpacity, View } from 'react-native';
+import { Image } from 'expo-image';
+import { Ionicons } from '@expo/vector-icons';
+import usePickImage from './use-pick-image';
+import tw from '../lib/tailwind';
+import { theme } from '../theme';
+
+interface ProfileImageProps {
+ imageUri?: string;
+ onImageSelect?: (uri: string, file?: any) => void;
+ size?: number;
+ editable?: boolean;
+ placeholderUri?: string;
+}
+
+const ProfileImage: React.FC = ({
+ imageUri,
+ onImageSelect,
+ size = 100,
+ editable = false,
+ placeholderUri,
+}) => {
+ const handlePickImage = usePickImage({
+ setFile: (file: any) => {
+ if (file && file.uri) {
+ onImageSelect?.(file.uri, file);
+ }
+ },
+ multiple: false,
+ });
+
+ const displayUri = imageUri || placeholderUri;
+
+ return (
+
+ {displayUri ? (
+
+ ) : (
+
+
+
+ )}
+ {editable && (
+
+
+
+ )}
+
+ );
+};
+
+export default ProfileImage;
\ No newline at end of file
diff --git a/packages/ui/src/components/quantifier.tsx b/packages/ui/src/components/quantifier.tsx
new file mode 100644
index 0000000..55f6cb2
--- /dev/null
+++ b/packages/ui/src/components/quantifier.tsx
@@ -0,0 +1,63 @@
+import React from 'react';
+import { View, TouchableOpacity, Text } from 'react-native';
+import { MaterialIcons } from '@expo/vector-icons';
+import tw from '../lib/tailwind';
+import { colors } from '../lib/theme-colors';
+
+interface QuantifierProps {
+ value: number;
+ setValue: (value: number) => void;
+ step?: number;
+ unit?: string | { shortNotation: string };
+ min?: number;
+ max?: number;
+}
+
+const Quantifier: React.FC = ({
+ value,
+ setValue,
+ step = 1,
+ unit,
+ min = 0,
+ max
+}) => {
+
+ const unitText = typeof unit === 'object' ? unit?.shortNotation : unit;
+
+
+ return (
+
+ setValue(Math.max(min, value - step))}
+ activeOpacity={0.7}
+ >
+
+
+
+
+
+ {value}
+
+ {unitText && (
+
+ {unitText}
+
+ )}
+
+
+ {
+ if (max !== undefined && value + step > max) return;
+ setValue(value + step);
+ }}
+ activeOpacity={0.7}
+ >
+
+
+
+ );
+};
+
+export default Quantifier;
\ No newline at end of file
diff --git a/packages/ui/src/components/search-bar.tsx b/packages/ui/src/components/search-bar.tsx
new file mode 100755
index 0000000..f56b2e9
--- /dev/null
+++ b/packages/ui/src/components/search-bar.tsx
@@ -0,0 +1,63 @@
+import React, { forwardRef } from 'react';
+import { View, ViewStyle } from 'react-native';
+import tw from '../lib/tailwind';
+import { theme } from '../theme';
+import MaterialIcons from '@expo/vector-icons/MaterialIcons';
+import MyTextInput from './textinput';
+import MyTouchableOpacity from './touchable-opacity';
+
+interface SearchBarProps {
+ value: string;
+ onChangeText: (text: string) => void;
+ placeholder?: string;
+ editable?: boolean;
+ onSubmitEditing?: () => void;
+ returnKeyType?: 'search' | 'done' | 'go' | 'next' | 'send';
+ containerStyle?: ViewStyle;
+ onPress?: () => void;
+ activeOpacity?: number;
+}
+
+const SearchBar = forwardRef(({
+ value,
+ onChangeText,
+ placeholder = 'Search fresh meat...',
+ editable = true,
+ onSubmitEditing,
+ returnKeyType = 'search',
+ containerStyle,
+ onPress,
+ activeOpacity = 0.8,
+}, ref) => {
+ const Wrapper = onPress ? MyTouchableOpacity : View;
+
+ const wrapperProps = onPress ? {
+ style: [tw`flex-row items-center bg-white rounded-2xl px-4 h-12 mb-6 shadow-md`, { overflow: 'visible' }, containerStyle],
+ onPress,
+ activeOpacity,
+ } : {
+ style: [tw`flex-row items-center bg-white rounded-2xl px-4 h-12 mb-6 shadow-md`, { overflow: 'visible' }, containerStyle],
+ };
+
+ return (
+
+
+
+
+ );
+});
+
+SearchBar.displayName = 'SearchBar';
+
+export default SearchBar;
diff --git a/packages/ui/src/components/tab-view.tsx b/packages/ui/src/components/tab-view.tsx
new file mode 100644
index 0000000..4cd3de1
--- /dev/null
+++ b/packages/ui/src/components/tab-view.tsx
@@ -0,0 +1,26 @@
+import React from 'react';
+import { TabView, TabViewProps, Route, TabBar } from 'react-native-tab-view';
+import { useTheme } from 'common-ui';
+
+interface TabViewWrapperProps extends TabViewProps {
+ // Additional props can be added here if needed
+}
+
+const TabViewWrapper: React.FC = (props) => {
+ const { theme } = useTheme();
+
+ const renderTabBar = (tabBarProps: any) => (
+
+ );
+
+ return ;
+};
+
+export default TabViewWrapper;
\ No newline at end of file
diff --git a/packages/ui/src/components/text.tsx b/packages/ui/src/components/text.tsx
new file mode 100755
index 0000000..f737458
--- /dev/null
+++ b/packages/ui/src/components/text.tsx
@@ -0,0 +1,65 @@
+import React from 'react';
+import { Text as PaperText } from 'react-native-paper';
+import { TextProps as RNTextProps } from 'react-native';
+import { useTheme } from "common-ui";
+import type { Theme } from "common-ui";
+// import { useTheme } from '../hooks/theme-context';
+
+// All color keys from theme.colors
+// import type { Theme } from '../hooks/theme-context';
+type ThemeColor = keyof Theme['colors'];
+
+type FontWeight = 'light' | 'regular' | 'medium' | 'semibold' | 'bold';
+
+interface Props extends RNTextProps {
+ children: React.ReactNode;
+ color?: ThemeColor;
+ weight?: FontWeight;
+}
+
+function MyText({ style, children, color, weight = 'regular', ...rest }: Props) {
+ const { colors } = useTheme().theme;
+
+ // Map weight to fontFamily and fontWeight
+ let fontFamily = 'Nunito-Regular';
+ let fontWeight: any = undefined;
+ switch (weight) {
+ case 'light':
+ fontFamily = 'Nunito-Light';
+ fontWeight = '300';
+ break;
+ case 'regular':
+ fontFamily = 'Nunito-Regular';
+ fontWeight = '400';
+ break;
+ case 'medium':
+ fontFamily = 'Nunito-Medium';
+ fontWeight = '500';
+ break;
+ case 'semibold':
+ fontFamily = 'Nunito-SemiBold';
+ fontWeight = '600';
+ break;
+ case 'bold':
+ fontFamily = 'Nunito-Bold';
+ fontWeight = '700';
+ break;
+ }
+
+ let textColor: string | undefined;
+ if (color && colors[color]) textColor = colors[color];
+ return (
+
+ {children}
+
+ );
+}
+
+export default MyText;
diff --git a/packages/ui/src/components/textinput.tsx b/packages/ui/src/components/textinput.tsx
new file mode 100755
index 0000000..e88381c
--- /dev/null
+++ b/packages/ui/src/components/textinput.tsx
@@ -0,0 +1,78 @@
+// import { useTheme } from "@/hooks/theme-context";
+import React from "react";
+import {
+ TextInput as PaperTextInput,
+ TextInputProps,
+} from "react-native-paper";
+import { View, Text, StyleSheet } from "react-native";
+import MyText from "./text";
+import { colors } from "common-ui";
+import { useTheme } from "common-ui";
+
+type MyTextInputProps = TextInputProps & {
+ topLabel?: string;
+ fullWidth?: boolean; // Optional prop to control width
+ shrunkPadding?: boolean; // Optional prop to reduce padding
+};
+
+
+const MyTextInput: React.FC = ({
+ topLabel,
+ fullWidth = true,
+ secureTextEntry,
+ shrunkPadding = false,
+ ...props
+}) => {
+ const { theme } = useTheme();
+ const [showPassword, setShowPassword] = React.useState(false);
+ const isPassword = !!secureTextEntry;
+
+ return (
+
+ {topLabel && (
+
+ {topLabel}
+
+ )}
+ setShowPassword((v) => !v)}
+ forceTextInputFocus={false}
+ style={{ opacity: 0.7 }}
+ />
+ )
+ : undefined
+ }
+ />
+
+ );
+};
+
+export default MyTextInput;
\ No newline at end of file
diff --git a/packages/ui/src/components/touchable-opacity.tsx b/packages/ui/src/components/touchable-opacity.tsx
new file mode 100644
index 0000000..857f0fa
--- /dev/null
+++ b/packages/ui/src/components/touchable-opacity.tsx
@@ -0,0 +1,16 @@
+import React from 'react';
+import { TouchableOpacity as RNTouchableOpacity, TouchableOpacityProps } from 'react-native';
+
+interface MyTouchableOpacityProps extends TouchableOpacityProps {
+ children?: React.ReactNode;
+}
+
+const MyTouchableOpacity: React.FC = ({ children, ...props }) => {
+ return (
+
+ {children}
+
+ );
+};
+
+export default MyTouchableOpacity;
\ No newline at end of file
diff --git a/packages/ui/src/components/use-pick-image.tsx b/packages/ui/src/components/use-pick-image.tsx
new file mode 100644
index 0000000..9982d6c
--- /dev/null
+++ b/packages/ui/src/components/use-pick-image.tsx
@@ -0,0 +1,65 @@
+import React from "react";
+import * as DocumentPicker from "expo-document-picker";
+import * as ImagePicker from "expo-image-picker";
+
+interface BaseProps {
+ label?: string;
+ multiple: boolean;
+}
+
+// interface Props {
+// setFile: (file: DocumentPicker.DocumentPickerAsset | null) => void;
+// label?: string;
+// }
+// type Props =
+// | { multiple: true; setFile: (value: DocumentPicker.DocumentPickerAsset[]) => void }
+// | { multiple?: false; setFile: (value: DocumentPicker.DocumentPickerAsset) => void };
+type Props = {
+ setFile: (file: any) => void;
+ multiple: boolean;
+};
+
+interface ImageInfo {
+ assetId?: string | null;
+ base64?: string | null;
+ duration?: number | null;
+ exif?: Record | null;
+ fileName?: string | null;
+ fileSize?: number;
+ height?: number;
+ mimeType?: string | null;
+ name?: string | null;
+ rotation?: number | null;
+ type?: string;
+ uri: string;
+ width?: number;
+}
+
+function usePickImage({ setFile, multiple = false }: Props) {
+ // const { setFile } = props;
+ const handlePickFile = async () => {
+ try {
+ const result = await ImagePicker.launchImageLibraryAsync({
+ mediaTypes: ["images"],
+ allowsMultipleSelection: multiple,
+ quality: 1,
+ });
+ if (!result.canceled) {
+ if (multiple) {
+ setFile(
+ result.assets.map((asset) => ({ ...asset, name: asset.fileName }))
+ );
+ } else {
+ setFile({ ...result.assets[0], name: result.assets[0].fileName });
+ }
+ } else {
+ setFile(null);
+ }
+ } catch (e) {
+ setFile(null);
+ }
+ };
+ return handlePickFile;
+}
+
+export default usePickImage;
diff --git a/packages/ui/src/lib/const-strs.ts b/packages/ui/src/lib/const-strs.ts
new file mode 100755
index 0000000..2aad95f
--- /dev/null
+++ b/packages/ui/src/lib/const-strs.ts
@@ -0,0 +1,27 @@
+export const OPT_LAST_SENT_TIME = 'opt_last_sent_time';
+export const NA_STRING = 'N/A';
+export const FORCE_LOGOUT_EVENT = 'forceLogout';
+export const SESSION_EXPIRED_MSG = 'session_expired';
+export const NOTIF_PERMISSION_DENIED = "Permission not granted to get push token for push notification!";
+export const REFRESH_EVENT = 'refresh_event';
+
+export const REFUND_STATUS = {
+ PENDING: 'pending',
+ NOT_APPLICABLE: 'na',
+ PROCESSING: 'initiated',
+ SUCCESS: 'success',
+};
+
+
+
+//copy pasted from backend
+export const CAR_IMAGE_COMMENT = "car_body";
+export const CAR_DOC_COMMENT = "car_doc";
+export const OTP_COMMENT_NAME = "auth_otp";
+export const GOVT_ID_CATEGORY = "govtId";
+export const OFFICE_ID_CATEGORY = "officeId";
+export const CONTEXT_CAR = "car";
+export const CONTEXT_USER = "user";
+export const CONTEXT_ANNOUNCEMENT = "announcement";
+export const CONTEXT_SEAT_BOOKING = "seatBooking";
+
diff --git a/packages/ui/src/lib/constants.ts b/packages/ui/src/lib/constants.ts
new file mode 100755
index 0000000..370e580
--- /dev/null
+++ b/packages/ui/src/lib/constants.ts
@@ -0,0 +1,45 @@
+/**
+ * Constants for role names to maintain consistency between frontend and backend
+ */
+export const ROLE_NAMES = {
+ ADMIN: 'admin',
+ GENERAL_USER: 'gen_user',
+ HOSPITAL_ADMIN: 'hospital_admin',
+ DOCTOR: 'doctor',
+ HOSPITAL_ASSISTANT: 'hospital_assistant',
+ DOCTOR_SECRETARY: 'doctor_secretary'
+};
+
+/**
+ * Constants for display names of roles for UI presentation
+ */
+export const ROLE_DISPLAY_NAMES = {
+ [ROLE_NAMES.ADMIN]: 'Administrator',
+ [ROLE_NAMES.GENERAL_USER]: 'General User',
+ [ROLE_NAMES.HOSPITAL_ADMIN]: 'Hospital Admin',
+ [ROLE_NAMES.DOCTOR]: 'Doctor',
+ [ROLE_NAMES.HOSPITAL_ASSISTANT]: 'Hospital Assistant',
+ [ROLE_NAMES.DOCTOR_SECRETARY]: 'Doctor Secretary'
+};
+
+/**
+ * Role options for dropdowns in forms
+ */
+export const ROLE_OPTIONS = [
+ { label: ROLE_DISPLAY_NAMES[ROLE_NAMES.HOSPITAL_ADMIN], value: ROLE_NAMES.HOSPITAL_ADMIN },
+ { label: ROLE_DISPLAY_NAMES[ROLE_NAMES.DOCTOR], value: ROLE_NAMES.DOCTOR },
+ { label: ROLE_DISPLAY_NAMES[ROLE_NAMES.HOSPITAL_ASSISTANT], value: ROLE_NAMES.HOSPITAL_ASSISTANT },
+ { label: ROLE_DISPLAY_NAMES[ROLE_NAMES.DOCTOR_SECRETARY], value: ROLE_NAMES.DOCTOR_SECRETARY }
+];
+
+/**
+ * Business role options (subset of roles that can be assigned to business users)
+ */
+export const BUSINESS_ROLE_OPTIONS = [
+ { label: ROLE_DISPLAY_NAMES[ROLE_NAMES.HOSPITAL_ADMIN], value: ROLE_NAMES.HOSPITAL_ADMIN },
+ { label: ROLE_DISPLAY_NAMES[ROLE_NAMES.DOCTOR], value: ROLE_NAMES.DOCTOR },
+ { label: ROLE_DISPLAY_NAMES[ROLE_NAMES.HOSPITAL_ASSISTANT], value: ROLE_NAMES.HOSPITAL_ASSISTANT },
+ { label: ROLE_DISPLAY_NAMES[ROLE_NAMES.DOCTOR_SECRETARY], value: ROLE_NAMES.DOCTOR_SECRETARY }
+];
+
+export const GENDERS = ['Male', 'Female']
\ No newline at end of file
diff --git a/packages/ui/src/lib/queryClient.ts b/packages/ui/src/lib/queryClient.ts
new file mode 100644
index 0000000..c6238b6
--- /dev/null
+++ b/packages/ui/src/lib/queryClient.ts
@@ -0,0 +1,11 @@
+import { QueryClient } from '@tanstack/react-query';
+
+const queryClient = new QueryClient({
+ defaultOptions: {
+ queries: {
+ retry: 3,
+ refetchOnWindowFocus: true,
+ },
+ }
+});
+export default queryClient;
\ No newline at end of file
diff --git a/packages/ui/src/lib/refresh-context.tsx b/packages/ui/src/lib/refresh-context.tsx
new file mode 100644
index 0000000..e6cf754
--- /dev/null
+++ b/packages/ui/src/lib/refresh-context.tsx
@@ -0,0 +1,19 @@
+import React, { createContext, useContext } from 'react';
+import { DeviceEventEmitter } from 'react-native';
+import { REFRESH_EVENT } from '../lib/const-strs';
+
+const RefreshContext = createContext<{ refreshAll: () => void } | null>(null);
+
+export const RefreshProvider: React.FC<{ children: React.ReactNode; queryClient: any }> = ({ children, queryClient }) => {
+ const refreshAll = () => {
+ queryClient.clear();
+ DeviceEventEmitter.emit(REFRESH_EVENT);
+ };
+ return {children};
+};
+
+export const useRefresh = () => {
+ const context = useContext(RefreshContext);
+ if (!context) throw new Error('useRefresh must be used within RefreshProvider');
+ return context;
+};
\ No newline at end of file
diff --git a/packages/ui/src/lib/status-bar-store.ts b/packages/ui/src/lib/status-bar-store.ts
new file mode 100644
index 0000000..345e603
--- /dev/null
+++ b/packages/ui/src/lib/status-bar-store.ts
@@ -0,0 +1,19 @@
+import { create } from 'zustand';
+import { StatusBarStyle } from 'expo-status-bar';
+
+interface StatusBarState {
+ barStyle: StatusBarStyle;
+ backgroundColor: string;
+ updateStatusBarColor: (barStyle: StatusBarStyle, backgroundColor: string) => void;
+}
+
+export const useStatusBarStore = create((set) => ({
+ barStyle: 'light',
+ backgroundColor: '#f81260',
+ updateStatusBarColor: (barStyle, backgroundColor) =>
+ set({ barStyle, backgroundColor }),
+}));
+
+export const updateStatusBarColor = (barStyle: StatusBarStyle, backgroundColor: string) => {
+ useStatusBarStore.getState().updateStatusBarColor(barStyle, backgroundColor);
+};
\ No newline at end of file
diff --git a/packages/ui/src/lib/tailwind.ts b/packages/ui/src/lib/tailwind.ts
new file mode 100755
index 0000000..8dc4b07
--- /dev/null
+++ b/packages/ui/src/lib/tailwind.ts
@@ -0,0 +1,8 @@
+// tailwind.ts
+import tailwindConfig from '../tailwind.config';
+import { create } from 'twrnc';
+
+// Create the customized `tw` function
+const tw = create(tailwindConfig as any);
+
+export default tw;
\ No newline at end of file
diff --git a/packages/ui/src/lib/theme-colors.ts b/packages/ui/src/lib/theme-colors.ts
new file mode 100755
index 0000000..5ab36ad
--- /dev/null
+++ b/packages/ui/src/lib/theme-colors.ts
@@ -0,0 +1,58 @@
+
+
+export const colors = {
+ brand25: "#F5FAFF",
+ brand50: "#EFF8FF",
+ brand100: "#D1E9FF",
+ brand200: "#B2DDFF",
+ brand300: "#84CAFF",
+ brand400: "#53B1FD",
+ brand500: "#2E90FA",
+ brand600: "#1570EF",
+ brand700: "#175CD3",
+ brand800: "#1849A9",
+ brand900: "#194185",
+ blue1: '#2E90FA',
+ blue2: '#fff0f6',
+ pink1: '#2E90FA',
+ pink2: '#fff0f6',
+ blue3: '#ECF4FF',
+ red1: '#D84343',
+ green1: '#4CAF50',
+ green2: '#C8F4D3',
+ black1: '#000000',
+ black2: '#1A1C1E',
+ white1: '#FFFFFF',
+ gray1: '#fdfdfd',
+ gray2: '#f2f2f2',
+ gray3: '#F5F5F5',
+ gray4: '#6C7278',
+ gray5: '#ced4da',
+ yellow1: '#FFB74D',
+ yellow2: '#FFE3AD',
+ purple25: "#FAFAFF",
+ purple50: "#F4F3FF",
+ purple100: "#EBE9FE",
+ purple200: "#D9D6FE",
+ purple300: "#BDB4FE",
+ purple400: "#9B8AFB",
+ purple500: "#7A5AF8",
+ purple600: "#6938EF",
+ purple700: "#5925DC",
+ purple800: "#4A1FB8",
+ purple900: "#3E1C96",
+ gray25: "#FDFDFD",
+ gray50: "#FAFAFA",
+ gray100: "#F5F5F5",
+ gray200: "#E9EAEB",
+ gray300: "#D5D7DA",
+ gray400: "#A4A7AE",
+ gray500: "#717680",
+ gray600: "#535862",
+ gray700: "#414651",
+ gray800: "#252B37",
+ gray900: "#101828",
+ get error() { return this.red1; }, // alias, not hardcoded
+ }
+
+export type colorsType = typeof colors;
\ No newline at end of file
diff --git a/packages/ui/src/roles-dropdown.tsx b/packages/ui/src/roles-dropdown.tsx
new file mode 100755
index 0000000..bdce9d7
--- /dev/null
+++ b/packages/ui/src/roles-dropdown.tsx
@@ -0,0 +1,16 @@
+import React from 'react'
+import {View,Text} from 'react-native';
+
+interface Props {}
+
+function RolesDropdown(props: Props) {
+ const {} = props
+
+ return (
+
+ RolesDropdown
+
+ )
+}
+
+export default RolesDropdown
diff --git a/packages/ui/src/services/StorageService.ts b/packages/ui/src/services/StorageService.ts
new file mode 100755
index 0000000..abc9b57
--- /dev/null
+++ b/packages/ui/src/services/StorageService.ts
@@ -0,0 +1,62 @@
+import * as SecureStore from 'expo-secure-store';
+import { Platform } from 'react-native';
+
+// Helper to detect if we're on web
+const isWeb = Platform.OS === 'web';
+
+export const StorageService = {
+ async setItem(key: string, value: string): Promise {
+ try {
+ if (isWeb) {
+ localStorage.setItem(key, value);
+ } else {
+ await SecureStore.setItemAsync(key, value);
+ }
+ return true;
+ } catch (e) {
+ console.error('StorageService setItem error:', e);
+ return false;
+ }
+ },
+
+ async getItem(key: string): Promise {
+ try {
+ if (isWeb) {
+ return localStorage.getItem(key);
+ } else {
+ return await SecureStore.getItemAsync(key);
+ }
+ } catch (e) {
+ console.error('StorageService getItem error:', e);
+ return null;
+ }
+ },
+
+ async removeItem(key: string): Promise {
+ try {
+ if (isWeb) {
+ localStorage.removeItem(key);
+ } else {
+ await SecureStore.deleteItemAsync(key);
+ }
+ return true;
+ } catch (e) {
+ console.error('StorageService removeItem error:', e);
+ return false;
+ }
+ },
+
+ async clearAll(keys: string[]): Promise {
+ try {
+ if (isWeb) {
+ keys.forEach((key) => localStorage.removeItem(key));
+ } else {
+ await Promise.all(keys.map((key) => SecureStore.deleteItemAsync(key)));
+ }
+ return true;
+ } catch (e) {
+ console.error('StorageService clearAll error:', e);
+ return false;
+ }
+ },
+};
\ No newline at end of file
diff --git a/packages/ui/src/services/StorageServiceCasual.ts b/packages/ui/src/services/StorageServiceCasual.ts
new file mode 100755
index 0000000..e2f79db
--- /dev/null
+++ b/packages/ui/src/services/StorageServiceCasual.ts
@@ -0,0 +1,71 @@
+import * as SecureStore from 'expo-secure-store';
+import { Platform } from 'react-native';
+
+// Helper to detect if we're on web
+const isWeb = Platform.OS === 'web';
+
+// Helper to prepend web prefix for web keys
+const getWebKey = (key: string): string => `web_${key}`;
+
+export const StorageServiceCasual = {
+ async setItem(key: string, value: string): Promise {
+ try {
+ const storageKey = isWeb ? getWebKey(key) : key;
+
+ if (isWeb) {
+ localStorage.setItem(storageKey, value);
+ } else {
+ await SecureStore.setItemAsync(storageKey, value);
+ }
+ return true;
+ } catch (e) {
+ console.error('StorageServiceCasual setItem error:', e);
+ return false;
+ }
+ },
+
+ async getItem(key: string): Promise {
+ try {
+ const storageKey = isWeb ? getWebKey(key) : key;
+
+ if (isWeb) {
+ return localStorage.getItem(storageKey);
+ } else {
+ return await SecureStore.getItemAsync(storageKey);
+ }
+ } catch (e) {
+ console.error('StorageServiceCasual getItem error:', e);
+ return null;
+ }
+ },
+
+ async removeItem(key: string): Promise {
+ try {
+ const storageKey = isWeb ? getWebKey(key) : key;
+
+ if (isWeb) {
+ localStorage.removeItem(storageKey);
+ } else {
+ await SecureStore.deleteItemAsync(storageKey);
+ }
+ return true;
+ } catch (e) {
+ console.error('StorageServiceCasual removeItem error:', e);
+ return false;
+ }
+ },
+
+ async clearAll(keys: string[]): Promise {
+ try {
+ if (isWeb) {
+ keys.forEach((key) => localStorage.removeItem(getWebKey(key)));
+ } else {
+ await Promise.all(keys.map((key) => SecureStore.deleteItemAsync(key)));
+ }
+ return true;
+ } catch (e) {
+ console.error('StorageServiceCasual clearAll error:', e);
+ return false;
+ }
+ },
+};
\ No newline at end of file
diff --git a/packages/ui/src/services/axios.ts b/packages/ui/src/services/axios.ts
new file mode 100644
index 0000000..37a9fcc
--- /dev/null
+++ b/packages/ui/src/services/axios.ts
@@ -0,0 +1,63 @@
+import axiosParent from 'axios';
+// import { getJWT } from '../hooks/useJWT';
+// import { getJWT } from '@/hooks/useJWT';
+import { DeviceEventEmitter } from 'react-native'
+import { FORCE_LOGOUT_EVENT } from '../lib/const-strs';
+import { getAuthToken } from '@/hooks/useJWT';
+import { BASE_API_URL } from '../../index';
+
+// const API_BASE_URL = 'http://192.168.1.5:4000'; // Change to your API base URL
+// const API_BASE_URL = 'http://192.168.100.95:4000'; // Change to your API base URL
+// const API_BASE_URL = 'https://www.technocracy.ovh/mf'; // Change to your API base URL
+// const API_BASE_URL = 'http://10.195.26.42:4000'; // Change to your API base URL
+// const API_BASE_URL = 'http://localhost:4000/api/mobile/'; // Change to your API base URL
+// const API_BASE_URL = 'https://car-safar.com/api/mobile/'; // Change to your API base URL
+
+const axios = axiosParent.create({
+ baseURL: BASE_API_URL + '/api/v1',
+ timeout: 60000,
+ // headers: {
+ // 'Content-Type': 'application/json',
+ // },
+});
+
+
+axios.interceptors.request.use(
+ async (config) => {
+ // const token = await getJWT();
+ const token = await getAuthToken();
+
+ if (token) {
+ config.headers = config.headers || {};
+ config.headers['Authorization'] = `Bearer ${token}`;
+ }
+ return config;
+ },
+ (error) => Promise.reject(error)
+);
+
+axios.interceptors.response.use(
+ (response) => response,
+ (error) => {
+
+ const status = error?.status;
+ const msg = error.response?.data?.error;
+
+ if (status === 401 && msg.startsWith('Access denied')) {
+ // Handle unauthorized access
+ DeviceEventEmitter.emit(FORCE_LOGOUT_EVENT);
+ }
+ const message = error?.response?.data?.error;
+
+ if (msg) {
+ // Optionally, you can attach the message to the error object or throw a new error
+ const err = new Error(msg);
+ // Optionally attach the original error for debugging
+ (err as any).original = error;
+ return Promise.reject(err);
+ }
+ return Promise.reject(error);
+ }
+);
+
+export default axios;
diff --git a/packages/ui/src/tailwind.config.ts b/packages/ui/src/tailwind.config.ts
new file mode 100755
index 0000000..889f530
--- /dev/null
+++ b/packages/ui/src/tailwind.config.ts
@@ -0,0 +1,17 @@
+import type { Config } from "tailwindcss";
+import { colors } from "./lib/theme-colors";
+
+const tailwindConfig: Config = {
+ content: [],
+ theme: {
+ extend: {
+ colors: {
+ // Theme colors directly available
+ ...colors,
+ },
+ },
+ },
+ plugins: [],
+};
+
+export default tailwindConfig;
diff --git a/packages/ui/src/theme.ts b/packages/ui/src/theme.ts
new file mode 100644
index 0000000..bad79e8
--- /dev/null
+++ b/packages/ui/src/theme.ts
@@ -0,0 +1,18 @@
+import { colors, colorsType } from "./lib/theme-colors";
+
+export const theme: {colors: colorsType} = {
+ colors: {
+ ...colors
+ // brand25: "#F5FAFF",
+ // brand50: "#EFF8FF",
+ // brand100: "#D1E9FF",
+ // brand200: "#B2DDFF",
+ // brand300: "#84CAFF",
+ // brand400: "#53B1FD",
+ // brand500: "#2E90FA",
+ // brand600: "#1570EF",
+ // brand700: "#175CD3",
+ // brand800: "#1849A9",
+ // brand900: "#194185",
+ },
+};
diff --git a/packages/ui/token-types.ts b/packages/ui/token-types.ts
new file mode 100755
index 0000000..9ff8e14
--- /dev/null
+++ b/packages/ui/token-types.ts
@@ -0,0 +1,43 @@
+// Adding the types for hospital today's tokens and doctor today's tokens
+export interface DoctorTokenSummary {
+ id: number;
+ name: string;
+ specializations?: string[];
+ totalTokens: number;
+ completedTokens: number;
+ inProgressTokens: number;
+ upcomingTokens: number;
+ currentTokenNumber?: number | null;
+ tokens?: DoctorTodayToken[]; // Added individual tokens
+}
+
+export interface HospitalTodaysTokensResponse {
+ message: string;
+ hospitalId: number;
+ hospitalName: string;
+ date: string;
+ doctors: DoctorTokenSummary[];
+}
+
+export interface DoctorTodayToken {
+ id: number;
+ queueNumber: number;
+ patientId: number | null;
+ patientName: string;
+ patientMobile?: string;
+ description: string | null;
+ status: 'UPCOMING' | 'IN_PROGRESS' | 'COMPLETED' | 'MISSED' | 'CANCELLED'; // Made optional
+ // status: string; // 'UPCOMING' | 'IN_PROGRESS' | 'COMPLETED' | 'MISSED' | 'CANCELLED'; // Made optional
+ consultationNotes?: string | null;
+}
+
+export interface DoctorTodaysTokensResponse {
+ message: string;
+ doctorId: number;
+ doctorName: string;
+ date: string;
+ currentTokenNumber?: number | null;
+ totalTokens: number;
+ completedTokens: number;
+ tokens: DoctorTodayToken[];
+}
diff --git a/progress.md b/progress.md
new file mode 100644
index 0000000..45370f9
--- /dev/null
+++ b/progress.md
@@ -0,0 +1,183 @@
+# Progress Summary - Meat Farmer Monorepo
+
+## User UI Development Progress
+
+### Profile Image & User Details System
+
+#### Database Schema Updates
+- **Added `user_details` table** with fields: bio, dateOfBirth, gender, occupation, profileImage
+- **Established one-to-one relationship** between users and user_details tables
+- **Updated relations** in schema for proper data fetching
+
+#### Backend API Enhancements
+- **Updated auth controller** (`login`, `register`, `getProfile`) to query userDetails and return complete user information
+- **Added `updateProfile` API** with comprehensive validation and transaction-based updates
+- **Implemented signed URLs** for secure profile image access (3-day expiration)
+- **Enhanced tRPC `getSelfData`** to include all user details with signed URLs
+
+#### Frontend Auth System
+- **Extended AuthContext** with `userDetails` state and `updateUserDetails` function
+- **Modified tRPC queries** for fresh data on every app startup (no caching)
+- **Added `useUserDetails` hook** for accessing detailed user information
+- **Updated login/register flows** to populate complete user data
+
+### Edit Profile Functionality
+
+#### Page Implementation
+- **Created edit-profile page** with pre-populated form values
+- **Conditional form rendering** - password fields hidden in edit mode
+- **Profile image upload** support with existing image display
+- **Form validation** adjusted for edit vs registration modes
+
+#### API Integration
+- **Added `useUpdateProfile` hook** using React Query for profile updates
+- **Multipart form data handling** for profile image uploads
+- **Error handling and loading states** with proper user feedback
+- **Context synchronization** after successful profile updates
+
+### UI/UX Improvements
+
+#### Drawer Layout Enhancements
+- **Profile image display** in drawer header with fallback to person icon
+- **User details integration** showing name and mobile from userDetails
+- **Circular avatar styling** for profile images
+
+#### Me Page Redesign
+- **2x2 grid layout** replacing vertical button list
+- **MaterialIcons integration** with relevant icons for each section:
+ - Orders: `shopping-bag` (blue)
+ - Complaints: `report-problem` (green)
+ - Coupons: `local-offer` (purple)
+ - Profile: `person` (orange)
+- **Enhanced styling** with rounded corners, shadows, and better typography
+- **Responsive design** with proper spacing and touch targets
+
+### Registration Form Updates
+- **Edit mode support** with `isEdit` prop
+- **Conditional field rendering** (passwords/terms hidden in edit mode)
+- **Initial values support** for pre-populating form data
+- **Profile image handling** for both new uploads and existing images
+
+## Files Modified
+
+### Backend
+- `apps/backend/src/db/schema.ts` - Added user_details table, vendor_snippets table, and relations definitions
+- `apps/backend/src/uv-apis/auth.controller.ts` - Enhanced auth APIs with userDetails and signed URLs
+- `apps/backend/src/uv-apis/auth.router.ts` - Added update profile route
+- `apps/backend/src/trpc/user-apis/user.ts` - Updated getSelfData with userDetails
+- `apps/backend/src/trpc/admin-apis/vendor-snippets.ts` - Complete CRUD API for vendor snippets management
+
+### Frontend
+- `apps/user-ui/src/types/auth.ts` - Added UserDetails interface and updated AuthState
+- `apps/user-ui/src/contexts/AuthContext.tsx` - Enhanced with userDetails state and hooks
+- `apps/user-ui/src/api-hooks/auth.api.ts` - Added updateProfile API and hook
+- `apps/user-ui/components/registration-form.tsx` - Added edit mode support
+- `apps/user-ui/app/(drawer)/edit-profile/index.tsx` - New edit profile page
+- `apps/user-ui/app/(drawer)/_layout.tsx` - Updated drawer with profile image
+- `apps/user-ui/app/(drawer)/me/index.tsx` - Redesigned with 2x2 grid and icons
+
+### Admin UI (New Vendor Snippets Feature)
+- `apps/admin-ui/app/(drawer)/vendor-snippets/index.tsx` - Main vendor snippets management page
+- `apps/admin-ui/app/(drawer)/_layout.tsx` - Added vendor snippets to drawer navigation
+- `apps/admin-ui/components/VendorSnippetForm.tsx` - Create/edit form with validation
+- `apps/admin-ui/components/SnippetOrdersView.tsx` - Orders viewing component with matching highlights
+- `apps/admin-ui/src/api-hooks/vendor-snippets.api.ts` - tRPC hooks for vendor snippets operations
+- `apps/admin-ui/src/trpc-client.ts` - Updated imports for tRPC client usage
+
+## Key Features Implemented
+
+### User UI Features
+✅ **Complete user profile system** with detailed information storage
+✅ **Secure image handling** with signed URLs and S3 integration
+✅ **Edit profile functionality** with pre-populated forms and validation
+✅ **Beautiful UI components** with icons and modern design patterns
+✅ **Fresh data fetching** on app startup with no caching
+✅ **Transaction-safe updates** with proper error handling
+✅ **Responsive grid layouts** optimized for mobile experience
+
+### Admin UI Features (Vendor Snippets)
+✅ **Complete vendor snippets management system** with full CRUD operations
+✅ **Advanced order matching logic** that finds orders by slot and product criteria
+✅ **Interactive forms** with slot/product selection and validation
+✅ **Orders viewing interface** with product matching highlights and statistics
+✅ **Automatic data refresh** using focus callbacks for fresh data
+✅ **Proper relations handling** in Drizzle ORM with foreign key relationships
+✅ **Error handling and loading states** throughout the user journey
+✅ **Navigation integration** with drawer menu and proper routing
+
+## Admin UI Changes
+
+### Vendor Snippets Management System
+
+#### Database Schema Updates
+- **Added `vendor_snippets` table** with fields: id, snippetCode, slotId, productIds, validTill, createdAt
+- **Established foreign key relationship** between vendorSnippets and deliverySlotInfo tables
+- **Added relations definition** (`vendorSnippetsRelations`) for proper Drizzle ORM queries
+- **Array field support** for storing multiple product IDs per snippet
+
+#### Backend API Implementation
+- **Complete CRUD operations** for vendor snippets:
+ - `create`: Validates slot/product existence, prevents duplicate codes
+ - `getAll`: Returns snippets with slot relations, ordered by creation date
+ - `getById`: Fetches individual snippet with slot details
+ - `update`: Partial updates with validation and uniqueness checks
+ - `delete`: Soft delete by setting expiry to current time
+- **`getOrdersBySnippet` API**: Advanced order matching logic that:
+ - Finds orders with matching delivery slots
+ - Filters orders containing at least one snippet product
+ - Returns formatted order data with product matching highlights
+ - Includes customer details, pricing, and delivery information
+
+#### Admin UI Implementation
+- **Vendor Snippets List Page**: Complete management interface with:
+ - Snippet cards showing code, slot info, product count, expiry dates
+ - Action buttons for View Orders, Edit, and Delete operations
+ - Empty state with call-to-action for first snippet creation
+ - Loading states and error handling
+- **Create/Edit Forms**: Comprehensive form components using:
+ - BottomDropdown for slot selection (replacing custom dropdowns)
+ - MultiSelectDropdown for product selection with search
+ - DatePicker for expiry date management
+ - Form validation with real-time error feedback
+ - Auto-generated snippet codes for new entries
+
+#### Orders Viewing System
+- **SnippetOrdersView Component**: Dedicated screen for viewing matched orders:
+ - Order cards with customer details, amounts, and delivery slots
+ - Product lists with matching highlights (⭐ indicators)
+ - Summary statistics (total orders, revenue)
+ - Responsive design with proper spacing and typography
+
+#### Navigation & UX Enhancements
+- **Drawer Integration**: Added "Vendor Snippets" to admin navigation menu
+- **Focus-based Refetching**: Implemented `useFocusCallback` for automatic data refresh when returning to the screen
+- **Error Handling**: Fixed tRPC client vs hooks usage (`trpcClient` for direct queries)
+- **Loading States**: Proper loading indicators and user feedback throughout the flow
+
+#### Technical Improvements
+- **Relations Fix**: Resolved Drizzle ORM error by adding missing relations definition
+- **API Client Usage**: Corrected tRPC usage patterns (hooks vs direct client)
+- **Type Safety**: Proper TypeScript interfaces and error handling
+- **Performance**: Efficient queries with proper indexing and filtering
+
+### Previous Admin UI Changes
+
+#### Slot Selection Centralization
+- **Moved slot dropdown** from individual pages to Manage Orders hub page
+- **Updated navigation** with slotId query parameters
+- **Streamlined child pages** with URL param reading
+
+#### UI Cleanup & Improvements
+- **Removed redundant elements** from drawer navigation
+- **Compacted order displays** for better space utilization
+- **Enhanced delivery sequences** layout
+
+## Important Notes
+- **Do not run build, compile, or migration commands** - These should be handled manually by developers
+- Avoid running `npm run build`, `tsc`, `drizzle-kit generate`, or similar compilation/migration commands
+- Schema changes should be committed and migrations generated manually
+- **Signed URLs** are used for secure image access with 3-day expiration
+- **React Query** handles all API state management with proper loading/error states
+- **Vendor Snippets**: Relations definitions are critical for Drizzle ORM queries - always define relations for foreign key relationships
+- **tRPC Usage**: Use `trpc` for React hooks and `trpcClient` for direct API calls outside components
+- **Focus Callbacks**: Implemented for automatic data refresh when screens regain focus
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..0e6371f
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,4 @@
+{
+ "compilerOptions": {},
+ "extends": "expo/tsconfig.base"
+}
diff --git a/turbo.json b/turbo.json
new file mode 100755
index 0000000..80e5cad
--- /dev/null
+++ b/turbo.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "https://turbo.build/schema.json",
+ "tasks": {
+ "build": {
+ "dependsOn": ["^build"],
+ "outputs": ["dist/**", ".next/**"]
+ },
+ "lint": {},
+ "dev": {
+ "cache": false
+ }
+ }
+}