/*
 Navicat Premium Dump SQL

 Source Server         : posgress kulakpos dev
 Source Server Type    : PostgreSQL
 Source Server Version : 160013 (160013)
 Source Host           : localhost:5432
 Source Catalog        : kulakpos
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 160013 (160013)
 File Encoding         : 65001

 Date: 15/04/2026 20:40:36
*/


-- ----------------------------
-- Sequence structure for banners_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."banners_id_seq";
CREATE SEQUENCE "public"."banners_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for blogs_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."blogs_id_seq";
CREATE SEQUENCE "public"."blogs_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for branches_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."branches_id_seq";
CREATE SEQUENCE "public"."branches_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for brands_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."brands_id_seq";
CREATE SEQUENCE "public"."brands_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for business_categories_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."business_categories_id_seq";
CREATE SEQUENCE "public"."business_categories_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for businesses_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."businesses_id_seq";
CREATE SEQUENCE "public"."businesses_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for categories_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."categories_id_seq";
CREATE SEQUENCE "public"."categories_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for combo_products_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."combo_products_id_seq";
CREATE SEQUENCE "public"."combo_products_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for comments_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."comments_id_seq";
CREATE SEQUENCE "public"."comments_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for currencies_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."currencies_id_seq";
CREATE SEQUENCE "public"."currencies_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for due_collects_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."due_collects_id_seq";
CREATE SEQUENCE "public"."due_collects_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for expense_categories_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."expense_categories_id_seq";
CREATE SEQUENCE "public"."expense_categories_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for expenses_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."expenses_id_seq";
CREATE SEQUENCE "public"."expenses_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for failed_jobs_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."failed_jobs_id_seq";
CREATE SEQUENCE "public"."failed_jobs_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for features_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."features_id_seq";
CREATE SEQUENCE "public"."features_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for gateways_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."gateways_id_seq";
CREATE SEQUENCE "public"."gateways_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for income_categories_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."income_categories_id_seq";
CREATE SEQUENCE "public"."income_categories_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for incomes_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."incomes_id_seq";
CREATE SEQUENCE "public"."incomes_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for jobs_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."jobs_id_seq";
CREATE SEQUENCE "public"."jobs_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for languages_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."languages_id_seq";
CREATE SEQUENCE "public"."languages_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for messages_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."messages_id_seq";
CREATE SEQUENCE "public"."messages_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for migrations_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."migrations_id_seq";
CREATE SEQUENCE "public"."migrations_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 2147483647
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for notifications_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."notifications_id_seq";
CREATE SEQUENCE "public"."notifications_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for options_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."options_id_seq";
CREATE SEQUENCE "public"."options_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for parties_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."parties_id_seq";
CREATE SEQUENCE "public"."parties_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for parties_id_seq1
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."parties_id_seq1";
CREATE SEQUENCE "public"."parties_id_seq1" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for payment_types_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."payment_types_id_seq";
CREATE SEQUENCE "public"."payment_types_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for permissions_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."permissions_id_seq";
CREATE SEQUENCE "public"."permissions_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for personal_access_tokens_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."personal_access_tokens_id_seq";
CREATE SEQUENCE "public"."personal_access_tokens_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for personal_access_tokens_id_seq1
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."personal_access_tokens_id_seq1";
CREATE SEQUENCE "public"."personal_access_tokens_id_seq1" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for plan_subscribes_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."plan_subscribes_id_seq";
CREATE SEQUENCE "public"."plan_subscribes_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for plans_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."plans_id_seq";
CREATE SEQUENCE "public"."plans_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for pos_app_interfaces_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."pos_app_interfaces_id_seq";
CREATE SEQUENCE "public"."pos_app_interfaces_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for product_models_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."product_models_id_seq";
CREATE SEQUENCE "public"."product_models_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for product_settings_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."product_settings_id_seq";
CREATE SEQUENCE "public"."product_settings_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for products_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."products_id_seq";
CREATE SEQUENCE "public"."products_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for products_id_seq1
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."products_id_seq1";
CREATE SEQUENCE "public"."products_id_seq1" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for purchase_details_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."purchase_details_id_seq";
CREATE SEQUENCE "public"."purchase_details_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for purchase_details_id_seq1
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."purchase_details_id_seq1";
CREATE SEQUENCE "public"."purchase_details_id_seq1" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for purchase_return_details_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."purchase_return_details_id_seq";
CREATE SEQUENCE "public"."purchase_return_details_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for purchase_returns_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."purchase_returns_id_seq";
CREATE SEQUENCE "public"."purchase_returns_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for purchases_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."purchases_id_seq";
CREATE SEQUENCE "public"."purchases_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for purchases_id_seq1
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."purchases_id_seq1";
CREATE SEQUENCE "public"."purchases_id_seq1" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for quotation_details_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."quotation_details_id_seq";
CREATE SEQUENCE "public"."quotation_details_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for quotations_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."quotations_id_seq";
CREATE SEQUENCE "public"."quotations_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for rack_shelf_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."rack_shelf_id_seq";
CREATE SEQUENCE "public"."rack_shelf_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for racks_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."racks_id_seq";
CREATE SEQUENCE "public"."racks_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for roles_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."roles_id_seq";
CREATE SEQUENCE "public"."roles_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for roles_id_seq1
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."roles_id_seq1";
CREATE SEQUENCE "public"."roles_id_seq1" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sale_details_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sale_details_id_seq";
CREATE SEQUENCE "public"."sale_details_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sale_return_details_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sale_return_details_id_seq";
CREATE SEQUENCE "public"."sale_return_details_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sale_returns_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sale_returns_id_seq";
CREATE SEQUENCE "public"."sale_returns_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sale_returns_id_seq1
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sale_returns_id_seq1";
CREATE SEQUENCE "public"."sale_returns_id_seq1" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sales_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sales_id_seq";
CREATE SEQUENCE "public"."sales_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for shelves_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."shelves_id_seq";
CREATE SEQUENCE "public"."shelves_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for stocks_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."stocks_id_seq";
CREATE SEQUENCE "public"."stocks_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for stocks_id_seq1
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."stocks_id_seq1";
CREATE SEQUENCE "public"."stocks_id_seq1" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for testimonials_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."testimonials_id_seq";
CREATE SEQUENCE "public"."testimonials_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for transactions_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."transactions_id_seq";
CREATE SEQUENCE "public"."transactions_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for transfer_products_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."transfer_products_id_seq";
CREATE SEQUENCE "public"."transfer_products_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for transfers_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."transfers_id_seq";
CREATE SEQUENCE "public"."transfers_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for units_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."units_id_seq";
CREATE SEQUENCE "public"."units_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for user_currencies_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."user_currencies_id_seq";
CREATE SEQUENCE "public"."user_currencies_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for users_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."users_id_seq";
CREATE SEQUENCE "public"."users_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for variations_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."variations_id_seq";
CREATE SEQUENCE "public"."variations_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for vats_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."vats_id_seq";
CREATE SEQUENCE "public"."vats_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for warehouses_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."warehouses_id_seq";
CREATE SEQUENCE "public"."warehouses_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Table structure for banners
-- ----------------------------
DROP TABLE IF EXISTS "public"."banners";
CREATE TABLE "public"."banners" (
  "id" int8 NOT NULL DEFAULT nextval('banners_id_seq'::regclass),
  "imageUrl" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "status" bool NOT NULL DEFAULT true,
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for blogs
-- ----------------------------
DROP TABLE IF EXISTS "public"."blogs";
CREATE TABLE "public"."blogs" (
  "id" int8 NOT NULL DEFAULT nextval('blogs_id_seq'::regclass),
  "user_id" int8 NOT NULL,
  "title" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "slug" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "image" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "status" bool NOT NULL DEFAULT true,
  "descriptions" text COLLATE "pg_catalog"."default",
  "tags" text COLLATE "pg_catalog"."default",
  "meta" text COLLATE "pg_catalog"."default",
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for branches
-- ----------------------------
DROP TABLE IF EXISTS "public"."branches";
CREATE TABLE "public"."branches" (
  "id" int8 NOT NULL DEFAULT nextval('branches_id_seq'::regclass),
  "business_id" int8 NOT NULL,
  "name" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "phone" varchar(191) COLLATE "pg_catalog"."default",
  "email" varchar(191) COLLATE "pg_catalog"."default",
  "address" varchar(191) COLLATE "pg_catalog"."default",
  "description" text COLLATE "pg_catalog"."default",
  "status" bool NOT NULL DEFAULT true,
  "is_main" bool NOT NULL DEFAULT false,
  "branchOpeningBalance" float8 NOT NULL DEFAULT '0'::double precision,
  "branchRemainingBalance" float8 NOT NULL DEFAULT '0'::double precision,
  "deleted_at" timestamp(0),
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for brands
-- ----------------------------
DROP TABLE IF EXISTS "public"."brands";
CREATE TABLE "public"."brands" (
  "id" int8 NOT NULL DEFAULT nextval('brands_id_seq'::regclass),
  "business_id" int8 NOT NULL,
  "brandName" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "status" bool NOT NULL DEFAULT true,
  "created_at" timestamp(0),
  "updated_at" timestamp(0),
  "icon" varchar(191) COLLATE "pg_catalog"."default",
  "description" varchar(191) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Table structure for business_categories
-- ----------------------------
DROP TABLE IF EXISTS "public"."business_categories";
CREATE TABLE "public"."business_categories" (
  "id" int8 NOT NULL DEFAULT nextval('business_categories_id_seq'::regclass),
  "name" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "description" text COLLATE "pg_catalog"."default",
  "status" bool NOT NULL DEFAULT true,
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for businesses
-- ----------------------------
DROP TABLE IF EXISTS "public"."businesses";
CREATE TABLE "public"."businesses" (
  "id" int8 NOT NULL DEFAULT nextval('businesses_id_seq'::regclass),
  "plan_subscribe_id" int8,
  "business_category_id" int8 NOT NULL,
  "companyName" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "will_expire" date,
  "address" varchar(191) COLLATE "pg_catalog"."default",
  "phoneNumber" varchar(191) COLLATE "pg_catalog"."default",
  "pictureUrl" varchar(191) COLLATE "pg_catalog"."default",
  "subscriptionDate" timestamp(0),
  "remainingShopBalance" float8 NOT NULL DEFAULT '0'::double precision,
  "shopOpeningBalance" float8 NOT NULL DEFAULT '0'::double precision,
  "created_at" timestamp(0),
  "updated_at" timestamp(0),
  "vat_name" varchar(191) COLLATE "pg_catalog"."default",
  "vat_no" varchar(191) COLLATE "pg_catalog"."default",
  "email" varchar(191) COLLATE "pg_catalog"."default",
  "status" bool NOT NULL DEFAULT true,
  "meta" text COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Table structure for categories
-- ----------------------------
DROP TABLE IF EXISTS "public"."categories";
CREATE TABLE "public"."categories" (
  "id" int8 NOT NULL DEFAULT nextval('categories_id_seq'::regclass),
  "categoryName" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "business_id" int8 NOT NULL,
  "variationCapacity" bool NOT NULL DEFAULT false,
  "variationColor" bool NOT NULL DEFAULT false,
  "variationSize" bool NOT NULL DEFAULT false,
  "variationType" bool NOT NULL DEFAULT false,
  "variationWeight" bool NOT NULL DEFAULT false,
  "status" bool NOT NULL DEFAULT true,
  "created_at" timestamp(0),
  "updated_at" timestamp(0),
  "icon" varchar(191) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Table structure for combo_products
-- ----------------------------
DROP TABLE IF EXISTS "public"."combo_products";
CREATE TABLE "public"."combo_products" (
  "id" int8 NOT NULL DEFAULT nextval('combo_products_id_seq'::regclass),
  "product_id" int8 NOT NULL,
  "branch_id" int8,
  "stock_id" int8 NOT NULL,
  "purchase_price" float8 NOT NULL DEFAULT '0'::double precision,
  "quantity" float8 NOT NULL DEFAULT '0'::double precision
)
;

-- ----------------------------
-- Table structure for comments
-- ----------------------------
DROP TABLE IF EXISTS "public"."comments";
CREATE TABLE "public"."comments" (
  "id" int8 NOT NULL DEFAULT nextval('comments_id_seq'::regclass),
  "blog_id" int8 NOT NULL,
  "comment_id" int8,
  "name" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "email" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "comment" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "status" bool NOT NULL DEFAULT true,
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for currencies
-- ----------------------------
DROP TABLE IF EXISTS "public"."currencies";
CREATE TABLE "public"."currencies" (
  "id" int8 NOT NULL DEFAULT nextval('currencies_id_seq'::regclass),
  "name" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "country_name" varchar(191) COLLATE "pg_catalog"."default",
  "code" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "rate" float8,
  "symbol" varchar(191) COLLATE "pg_catalog"."default",
  "position" varchar(191) COLLATE "pg_catalog"."default",
  "status" bool NOT NULL DEFAULT true,
  "is_default" bool NOT NULL DEFAULT false,
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for due_collects
-- ----------------------------
DROP TABLE IF EXISTS "public"."due_collects";
CREATE TABLE "public"."due_collects" (
  "id" int8 NOT NULL DEFAULT nextval('due_collects_id_seq'::regclass),
  "business_id" int8 NOT NULL,
  "party_id" int8,
  "user_id" int8,
  "sale_id" int8,
  "purchase_id" int8,
  "invoiceNumber" varchar(191) COLLATE "pg_catalog"."default",
  "totalDue" float8 NOT NULL DEFAULT '0'::double precision,
  "dueAmountAfterPay" float8 NOT NULL DEFAULT '0'::double precision,
  "payDueAmount" float8 NOT NULL DEFAULT '0'::double precision,
  "paymentType" varchar(191) COLLATE "pg_catalog"."default",
  "paymentDate" timestamp(0),
  "created_at" timestamp(0),
  "updated_at" timestamp(0),
  "payment_type_id" int8,
  "branch_id" int8
)
;

-- ----------------------------
-- Table structure for expense_categories
-- ----------------------------
DROP TABLE IF EXISTS "public"."expense_categories";
CREATE TABLE "public"."expense_categories" (
  "id" int8 NOT NULL DEFAULT nextval('expense_categories_id_seq'::regclass),
  "categoryName" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "business_id" int8 NOT NULL,
  "categoryDescription" text COLLATE "pg_catalog"."default",
  "status" bool NOT NULL DEFAULT true,
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for expenses
-- ----------------------------
DROP TABLE IF EXISTS "public"."expenses";
CREATE TABLE "public"."expenses" (
  "id" int8 NOT NULL DEFAULT nextval('expenses_id_seq'::regclass),
  "amount" float8 NOT NULL,
  "expense_category_id" int8,
  "user_id" int8,
  "business_id" int8 NOT NULL,
  "expanseFor" varchar(191) COLLATE "pg_catalog"."default",
  "paymentType" varchar(191) COLLATE "pg_catalog"."default",
  "referenceNo" varchar(191) COLLATE "pg_catalog"."default",
  "note" text COLLATE "pg_catalog"."default",
  "expenseDate" timestamp(0),
  "created_at" timestamp(0),
  "updated_at" timestamp(0),
  "payment_type_id" int8,
  "branch_id" int8
)
;

-- ----------------------------
-- Table structure for failed_jobs
-- ----------------------------
DROP TABLE IF EXISTS "public"."failed_jobs";
CREATE TABLE "public"."failed_jobs" (
  "id" int8 NOT NULL DEFAULT nextval('failed_jobs_id_seq'::regclass),
  "uuid" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "connection" text COLLATE "pg_catalog"."default" NOT NULL,
  "queue" text COLLATE "pg_catalog"."default" NOT NULL,
  "payload" text COLLATE "pg_catalog"."default" NOT NULL,
  "exception" text COLLATE "pg_catalog"."default" NOT NULL,
  "failed_at" timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP
)
;

-- ----------------------------
-- Table structure for features
-- ----------------------------
DROP TABLE IF EXISTS "public"."features";
CREATE TABLE "public"."features" (
  "id" int8 NOT NULL DEFAULT nextval('features_id_seq'::regclass),
  "title" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "bg_color" varchar(191) COLLATE "pg_catalog"."default",
  "image" varchar(191) COLLATE "pg_catalog"."default",
  "status" bool NOT NULL DEFAULT true,
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for gateways
-- ----------------------------
DROP TABLE IF EXISTS "public"."gateways";
CREATE TABLE "public"."gateways" (
  "id" int8 NOT NULL DEFAULT nextval('gateways_id_seq'::regclass),
  "name" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "currency_id" int8 NOT NULL,
  "mode" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "status" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "charge" bool NOT NULL DEFAULT false,
  "image" varchar(191) COLLATE "pg_catalog"."default",
  "data" text COLLATE "pg_catalog"."default",
  "manual_data" text COLLATE "pg_catalog"."default",
  "is_manual" bool NOT NULL DEFAULT false,
  "accept_img" bool NOT NULL DEFAULT false,
  "namespace" varchar(191) COLLATE "pg_catalog"."default",
  "phone_required" int4 NOT NULL DEFAULT 0,
  "instructions" text COLLATE "pg_catalog"."default",
  "created_at" timestamp(0),
  "updated_at" timestamp(0),
  "platform" text COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Table structure for income_categories
-- ----------------------------
DROP TABLE IF EXISTS "public"."income_categories";
CREATE TABLE "public"."income_categories" (
  "id" int8 NOT NULL DEFAULT nextval('income_categories_id_seq'::regclass),
  "categoryName" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "business_id" int8 NOT NULL,
  "categoryDescription" text COLLATE "pg_catalog"."default",
  "status" bool NOT NULL DEFAULT true,
  "created_at" timestamp(0),
  "updated_at" timestamp(0)
)
;

-- ----------------------------
-- Table structure for incomes
-- ----------------------------
DROP TABLE IF EXISTS "public"."incomes";
CREATE TABLE "public"."incomes" (
  "id" int8 NOT NULL DEFAULT nextval('incomes_id_seq'::regclass),
  "amount" float8 NOT NULL,
  "income_category_id" int8,
  "user_id" int8,
  "business_id" int8 NOT NULL,
  "incomeFor" varchar(191) COLLATE "pg_catalog"."default",
  "paymentType" varchar(191) COLLATE "pg_catalog"."default",
  "referenceNo" varchar(191) COLLATE "pg_catalog"."default",
  "note" text COLLATE "pg_catalog"."default",
  "incomeDate" timestamp(0),
  "created_at" timestamp(0),
  "updated_at" timestamp(0),
  "payment_type_id" int8,
  "branch_id" int8
)
;

-- ----------------------------
-- Table structure for jobs
-- ----------------------------
DROP TABLE IF EXISTS "public"."jobs";
CREATE TABLE "public"."jobs" (
  "id" int8 NOT NULL DEFAULT nextval('jobs_id_seq'::regclass),
  "queue" varchar(191) COLLATE "pg_catalog"."default" NOT NULL,
  "payload" text COLLATE "pg_catalog"."def