--
-- Host: localhost    Database: nexopos_v4
-- ------------------------------------------------------


--
-- Table structure for table `ns_failed_jobs`
--

CREATE TABLE `ns_failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_failed_jobs`
--


--
-- Table structure for table `ns_jobs`
--

CREATE TABLE `ns_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ns_jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_jobs`
--


--
-- Table structure for table `ns_migrations`
--

CREATE TABLE `ns_migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_migrations`
--

INSERT INTO `ns_migrations` VALUES (1,'2018_08_08_100000_create_telescope_entries_table',1,NULL),(2,'2019_12_14_000001_create_personal_access_tokens_table',1,NULL),(3,'2022_10_28_123458_setup_migration_table',1,NULL),(4,'2014_10_13_000000_create_users_table',0,'core'),(5,'2017_07_28_130434_create_roles_table',0,'core'),(6,'2017_07_28_130610_create_permissions_table',0,'core'),(7,'2018_08_08_100000_create_telescope_entries_table',0,'core'),(8,'2019_08_19_000000_create_failed_jobs_table',0,'core'),(9,'2020_06_20_000000_create_permissions',0,'core'),(10,'2020_06_20_000000_create_roles',0,'core'),(11,'2020_10_11_122857_create_jobs_table',0,'core'),(12,'2020_11_04_124040_add_new_customers_permission_nov4',0,'core'),(13,'2020_11_11_151614_nov11_create_nexopos_users_attributes_table',0,'core'),(14,'2020_11_12_205243_nov12_create_order_permission',0,'core'),(15,'2020_11_25_203531_nov25_fix_report_permissions_attribution',0,'core'),(16,'2020_12_08_210001_dec8add_new_permissions',0,'core'),(17,'2020_12_19_221434_create_nexopos_modules_migrations_table',0,'core'),(18,'2021_01_07_143635_add_new_customer_permission_janv7_21',0,'core'),(19,'2021_03_09_165538_create_new_permissions_march_9',0,'core'),(20,'2021_05_25_175424_update_add_payment_type_permissions',0,'core'),(21,'2021_05_28_114827_create_new_report_permissions_may28',0,'core'),(22,'2021_06_24_053134_update_permissions_jun24',0,'core'),(23,'2021_07_31_153029_update_dashboard_days_report_jul31',0,'core'),(24,'2014_10_12_000000_create_medias_table',0,'create'),(25,'2017_12_29_174613_create_options_table',0,'create'),(26,'2020_06_20_000000_create_customers_groups_table',0,'create'),(27,'2020_06_20_000000_create_customers_table',0,'create'),(28,'2020_06_20_000000_create_expenses_categories_table',0,'create'),(29,'2020_06_20_000000_create_expenses_table',0,'create'),(30,'2020_06_20_000000_create_orders_addresses_table',0,'create'),(31,'2020_06_20_000000_create_orders_coupons_table',0,'create'),(32,'2020_06_20_000000_create_orders_metas_table',0,'create'),(33,'2020_06_20_000000_create_orders_payment_table',0,'create'),(34,'2020_06_20_000000_create_orders_products_table',0,'create'),(35,'2020_06_20_000000_create_orders_table',0,'create'),(36,'2020_06_20_000000_create_procurements_products_table',0,'create'),(37,'2020_06_20_000000_create_procurements_table',0,'create'),(38,'2020_06_20_000000_create_products_categories_table',0,'create'),(39,'2020_06_20_000000_create_products_gallery_table',0,'create'),(40,'2020_06_20_000000_create_products_history_table',0,'create'),(41,'2020_06_20_000000_create_products_metas_table',0,'create'),(42,'2020_06_20_000000_create_products_table',0,'create'),(43,'2020_06_20_000000_create_products_taxes_table',0,'create'),(44,'2020_06_20_000000_create_products_unit_quantities',0,'create'),(45,'2020_06_20_000000_create_providers_table',0,'create'),(46,'2020_06_20_000000_create_registers_history_table',0,'create'),(47,'2020_06_20_000000_create_registers_table',0,'create'),(48,'2020_06_20_000000_create_rewards_system_rules_table',0,'create'),(49,'2020_06_20_000000_create_rewards_system_table',0,'create'),(50,'2020_06_20_000000_create_taxes_table',0,'create'),(51,'2020_06_20_000000_create_units_group_table',0,'create'),(52,'2020_06_20_000000_create_units_table',0,'create'),(53,'2020_08_01_143801_create_customers_coupons_table',0,'create'),(54,'2020_10_10_224639_create_dashboard_table',0,'create'),(55,'2020_10_11_074631_create_nexopos_notifications_table',0,'create'),(56,'2020_10_17_231628_create_nexopos_orders_storage',0,'create'),(57,'2020_10_29_150642_create_nexopos_expenses_history_table',0,'create'),(58,'2020_11_17_120204_nov17_add_fields_to_nexopos_orders_products_table',0,'create'),(59,'2020_12_11_210734_create_nexopos_dashboard_months_table',0,'create'),(60,'2021_01_23_225101_create_coupons_table',0,'create'),(61,'2021_01_23_225713_create_customers_rewards_table',0,'create'),(62,'2021_02_21_144532_create_orders_instalments_table',0,'create'),(63,'2021_02_23_004748_create_new_instalments_permissions',0,'create'),(64,'2021_05_25_131104_create_nexopos_payments_types_table',0,'create'),(65,'2022_01_20_202253_create_user_role_relations_table',0,'create'),(66,'2022_05_13_142039_create_products_group_items_table',0,'create'),(67,'2022_10_12_083552_update_register_history_oct12_22',0,'create'),(68,'2022_10_28_093041_update_expense_table28_oct22',0,'create'),(69,'2022_11_25_071626_create_users_widgets_table',0,'create'),(70,'2023_10_31_120602_stock_history_detailed',0,'create'),(71,'2024_04_29_214452_create_transaction_balance_days_table',0,'create'),(72,'2024_04_29_214459_create_transaction_balance_months_table',0,'create'),(73,'2024_09_02_023528_create_accounting_table_actions',0,'create'),(74,'2025_01_22_113445_create_nexopos_orders_settings_table',0,'create'),(75,'2022_11_28_000259_v5x_general_database_update',0,'update'),(76,'2022_11_30_224820_update_orders_coupon_table',0,'update'),(77,'2023_02_14_123130_update_product_history_table14_fev23',0,'update'),(78,'2023_03_16_214039_update_expense_table',0,'update'),(79,'2023_07_30_235454_fix_wrong_purchase_price_32_jul_23',0,'update'),(80,'2024_01_26_075544_update_expenses_and_accounts',0,'update'),(81,'2024_01_26_165001_update_transaction_histories',0,'update'),(82,'2024_02_29_035014_update_add_new_pos_permissions',0,'update'),(83,'2024_03_12_235545_update_v5_2_0',0,'update'),(84,'2024_03_25_150121_update_user_widget',0,'update'),(85,'2024_04_04_234202_update_transactions_adds_missing_field',0,'update'),(86,'2024_04_18_084130_update_transactions_history_table',0,'update'),(87,'2024_04_29_110922_update_cash_registers_table',0,'update'),(88,'2024_06_14_013012_update_to_nexopos_v53',0,'update'),(89,'2024_06_28_183019_update_add_permission_to_products_unit_conversion',0,'update'),(90,'2024_07_19_145205_update_nexopos_transactions_accounts',0,'update'),(91,'2024_07_29_171109_update_orders_total_cogs',0,'update'),(92,'2025_01_27_093541_remove_deprecated_options',0,'update');

--
-- Table structure for table `ns_nexopos_coupons`
--

CREATE TABLE `ns_nexopos_coupons` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'discount',
  `discount_value` float NOT NULL DEFAULT '0',
  `valid_until` datetime DEFAULT NULL,
  `minimum_cart_value` float DEFAULT '0',
  `maximum_cart_value` float DEFAULT '0',
  `valid_hours_start` datetime DEFAULT NULL,
  `valid_hours_end` datetime DEFAULT NULL,
  `limit_usage` float NOT NULL DEFAULT '0',
  `groups_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customers_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `author` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_coupons`
--


--
-- Table structure for table `ns_nexopos_coupons_categories`
--

CREATE TABLE `ns_nexopos_coupons_categories` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `coupon_id` int NOT NULL,
  `category_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_coupons_categories`
--


--
-- Table structure for table `ns_nexopos_coupons_customers`
--

CREATE TABLE `ns_nexopos_coupons_customers` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `coupon_id` int NOT NULL,
  `customer_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_coupons_customers`
--


--
-- Table structure for table `ns_nexopos_coupons_customers_groups`
--

CREATE TABLE `ns_nexopos_coupons_customers_groups` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `coupon_id` int NOT NULL,
  `group_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_coupons_customers_groups`
--


--
-- Table structure for table `ns_nexopos_coupons_products`
--

CREATE TABLE `ns_nexopos_coupons_products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `coupon_id` int NOT NULL,
  `product_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_coupons_products`
--


--
-- Table structure for table `ns_nexopos_customers_account_history`
--

CREATE TABLE `ns_nexopos_customers_account_history` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` int NOT NULL,
  `order_id` int DEFAULT NULL,
  `previous_amount` double NOT NULL DEFAULT '0',
  `amount` double NOT NULL DEFAULT '0',
  `next_amount` double NOT NULL DEFAULT '0',
  `operation` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `author` int NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_customers_account_history`
--


--
-- Table structure for table `ns_nexopos_customers_addresses`
--

CREATE TABLE `ns_nexopos_customers_addresses` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` int NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_1` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pobox` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `author` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_customers_addresses`
--


--
-- Table structure for table `ns_nexopos_customers_coupons`
--

CREATE TABLE `ns_nexopos_customers_coupons` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `usage` int NOT NULL DEFAULT '0',
  `limit_usage` int NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `coupon_id` int NOT NULL,
  `customer_id` int NOT NULL,
  `author` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_customers_coupons`
--


--
-- Table structure for table `ns_nexopos_customers_groups`
--

CREATE TABLE `ns_nexopos_customers_groups` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `reward_system_id` int DEFAULT '0',
  `minimal_credit_payment` int NOT NULL DEFAULT '0',
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_customers_groups`
--


--
-- Table structure for table `ns_nexopos_customers_rewards`
--

CREATE TABLE `ns_nexopos_customers_rewards` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` int NOT NULL,
  `reward_id` int NOT NULL,
  `reward_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `points` float NOT NULL,
  `target` float NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_customers_rewards`
--


--
-- Table structure for table `ns_nexopos_dashboard_days`
--

CREATE TABLE `ns_nexopos_dashboard_days` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `total_unpaid_orders` float NOT NULL DEFAULT '0',
  `day_unpaid_orders` float NOT NULL DEFAULT '0',
  `total_unpaid_orders_count` float NOT NULL DEFAULT '0',
  `day_unpaid_orders_count` float NOT NULL DEFAULT '0',
  `total_paid_orders` float NOT NULL DEFAULT '0',
  `day_paid_orders` float NOT NULL DEFAULT '0',
  `total_paid_orders_count` float NOT NULL DEFAULT '0',
  `day_paid_orders_count` float NOT NULL DEFAULT '0',
  `total_partially_paid_orders` float NOT NULL DEFAULT '0',
  `day_partially_paid_orders` float NOT NULL DEFAULT '0',
  `total_partially_paid_orders_count` float NOT NULL DEFAULT '0',
  `day_partially_paid_orders_count` float NOT NULL DEFAULT '0',
  `total_income` float NOT NULL DEFAULT '0',
  `day_income` float NOT NULL DEFAULT '0',
  `total_discounts` float NOT NULL DEFAULT '0',
  `day_discounts` float NOT NULL DEFAULT '0',
  `day_taxes` float NOT NULL DEFAULT '0',
  `total_taxes` float NOT NULL DEFAULT '0',
  `total_wasted_goods_count` float NOT NULL DEFAULT '0',
  `day_wasted_goods_count` float NOT NULL DEFAULT '0',
  `total_wasted_goods` float NOT NULL DEFAULT '0',
  `day_wasted_goods` float NOT NULL DEFAULT '0',
  `total_expenses` float NOT NULL DEFAULT '0',
  `day_expenses` float NOT NULL DEFAULT '0',
  `day_of_year` int NOT NULL DEFAULT '0',
  `range_starts` datetime DEFAULT NULL,
  `range_ends` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_dashboard_days`
--


--
-- Table structure for table `ns_nexopos_dashboard_months`
--

CREATE TABLE `ns_nexopos_dashboard_months` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `month_taxes` float NOT NULL DEFAULT '0',
  `month_unpaid_orders` float NOT NULL DEFAULT '0',
  `month_unpaid_orders_count` float NOT NULL DEFAULT '0',
  `month_paid_orders` float NOT NULL DEFAULT '0',
  `month_paid_orders_count` float NOT NULL DEFAULT '0',
  `month_partially_paid_orders` float NOT NULL DEFAULT '0',
  `month_partially_paid_orders_count` float NOT NULL DEFAULT '0',
  `month_income` float NOT NULL DEFAULT '0',
  `month_discounts` float NOT NULL DEFAULT '0',
  `month_wasted_goods_count` float NOT NULL DEFAULT '0',
  `month_wasted_goods` float NOT NULL DEFAULT '0',
  `month_expenses` float NOT NULL DEFAULT '0',
  `total_wasted_goods` float NOT NULL DEFAULT '0',
  `total_unpaid_orders` float NOT NULL DEFAULT '0',
  `total_unpaid_orders_count` float NOT NULL DEFAULT '0',
  `total_paid_orders` float NOT NULL DEFAULT '0',
  `total_paid_orders_count` float NOT NULL DEFAULT '0',
  `total_partially_paid_orders` float NOT NULL DEFAULT '0',
  `total_partially_paid_orders_count` float NOT NULL DEFAULT '0',
  `total_income` float NOT NULL DEFAULT '0',
  `total_discounts` float NOT NULL DEFAULT '0',
  `total_taxes` float NOT NULL DEFAULT '0',
  `total_wasted_goods_count` float NOT NULL DEFAULT '0',
  `total_expenses` float NOT NULL DEFAULT '0',
  `month_of_year` int NOT NULL DEFAULT '0',
  `range_starts` datetime NOT NULL,
  `range_ends` datetime NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_dashboard_months`
--


--
-- Table structure for table `ns_nexopos_dashboard_weeks`
--

CREATE TABLE `ns_nexopos_dashboard_weeks` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `total_gross_income` float NOT NULL DEFAULT '0',
  `total_taxes` float NOT NULL DEFAULT '0',
  `total_expenses` float NOT NULL DEFAULT '0',
  `total_net_income` float NOT NULL DEFAULT '0',
  `week_number` int NOT NULL DEFAULT '0',
  `range_starts` datetime DEFAULT NULL,
  `range_ends` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_dashboard_weeks`
--


--
-- Table structure for table `ns_nexopos_medias`
--

CREATE TABLE `ns_nexopos_medias` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `extension` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ns_nexopos_medias_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_medias`
--


--
-- Table structure for table `ns_nexopos_modules_migrations`
--

CREATE TABLE `ns_nexopos_modules_migrations` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `namespace` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_modules_migrations`
--


--
-- Table structure for table `ns_nexopos_notifications`
--

CREATE TABLE `ns_nexopos_notifications` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#',
  `source` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'system',
  `dismissable` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_notifications`
--


--
-- Table structure for table `ns_nexopos_orders`
--

CREATE TABLE `ns_nexopos_orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `description` text COLLATE utf8mb4_unicode_ci,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payment_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `process_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `delivery_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `discount` float NOT NULL DEFAULT '0',
  `discount_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `support_instalments` tinyint(1) NOT NULL DEFAULT '1',
  `discount_percentage` float DEFAULT NULL,
  `shipping` float NOT NULL DEFAULT '0',
  `shipping_rate` float NOT NULL DEFAULT '0',
  `shipping_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_without_tax` float NOT NULL DEFAULT '0',
  `subtotal` float NOT NULL DEFAULT '0',
  `total_with_tax` float NOT NULL DEFAULT '0',
  `total_coupons` float NOT NULL DEFAULT '0',
  `total_cogs` float NOT NULL DEFAULT '0',
  `total` float NOT NULL DEFAULT '0',
  `tax_value` float NOT NULL DEFAULT '0',
  `products_tax_value` double NOT NULL DEFAULT '0',
  `tax_group_id` int DEFAULT NULL,
  `tax_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tendered` float NOT NULL DEFAULT '0',
  `change` float NOT NULL DEFAULT '0',
  `final_payment_date` datetime DEFAULT NULL,
  `total_instalments` int NOT NULL DEFAULT '0',
  `customer_id` int NOT NULL,
  `note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note_visibility` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `register_id` int DEFAULT NULL,
  `voidance_reason` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders`
--


--
-- Table structure for table `ns_nexopos_orders_addresses`
--

CREATE TABLE `ns_nexopos_orders_addresses` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_1` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pobox` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_addresses`
--


--
-- Table structure for table `ns_nexopos_orders_count`
--

CREATE TABLE `ns_nexopos_orders_count` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `count` int NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_count`
--


--
-- Table structure for table `ns_nexopos_orders_coupons`
--

CREATE TABLE `ns_nexopos_orders_coupons` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `customer_coupon_id` int NOT NULL,
  `coupon_id` int NOT NULL,
  `order_id` int NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `discount_value` float NOT NULL,
  `minimum_cart_value` float NOT NULL DEFAULT '0',
  `maximum_cart_value` float NOT NULL DEFAULT '0',
  `limit_usage` int NOT NULL DEFAULT '0',
  `value` float NOT NULL DEFAULT '0',
  `author` int NOT NULL,
  `counted` tinyint(1) NOT NULL DEFAULT '0',
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_coupons`
--


--
-- Table structure for table `ns_nexopos_orders_instalments`
--

CREATE TABLE `ns_nexopos_orders_instalments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `amount` float NOT NULL DEFAULT '0',
  `order_id` int DEFAULT NULL,
  `paid` tinyint(1) NOT NULL DEFAULT '0',
  `payment_id` int DEFAULT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_instalments`
--


--
-- Table structure for table `ns_nexopos_orders_payments`
--

CREATE TABLE `ns_nexopos_orders_payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int NOT NULL,
  `value` float NOT NULL DEFAULT '0',
  `author` int NOT NULL,
  `identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_payments`
--


--
-- Table structure for table `ns_nexopos_orders_products`
--

CREATE TABLE `ns_nexopos_orders_products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `unit_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mode` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'normal',
  `product_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'product',
  `product_id` int NOT NULL,
  `order_id` int NOT NULL,
  `unit_id` int NOT NULL,
  `unit_quantity_id` int NOT NULL,
  `product_category_id` int NOT NULL,
  `procurement_product_id` int DEFAULT NULL,
  `tax_group_id` int NOT NULL DEFAULT '0',
  `tax_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sold',
  `return_observations` text COLLATE utf8mb4_unicode_ci,
  `return_condition` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discount_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none',
  `discount` float NOT NULL DEFAULT '0',
  `quantity` float NOT NULL,
  `discount_percentage` float NOT NULL DEFAULT '0',
  `unit_price` float NOT NULL DEFAULT '0',
  `price_with_tax` float NOT NULL DEFAULT '0',
  `price_without_tax` float NOT NULL DEFAULT '0',
  `wholesale_tax_value` float NOT NULL DEFAULT '0',
  `sale_tax_value` float NOT NULL DEFAULT '0',
  `tax_value` float NOT NULL DEFAULT '0',
  `rate` double NOT NULL DEFAULT '0',
  `total_price` float NOT NULL DEFAULT '0',
  `total_price_with_tax` float NOT NULL DEFAULT '0',
  `total_price_without_tax` float NOT NULL DEFAULT '0',
  `total_purchase_price` float NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_products`
--


--
-- Table structure for table `ns_nexopos_orders_products_refunds`
--

CREATE TABLE `ns_nexopos_orders_products_refunds` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int NOT NULL,
  `order_refund_id` int NOT NULL,
  `order_product_id` int NOT NULL,
  `unit_id` int NOT NULL,
  `product_id` int NOT NULL,
  `unit_price` float NOT NULL,
  `tax_value` float NOT NULL DEFAULT '0',
  `quantity` float NOT NULL,
  `total_price` float NOT NULL,
  `condition` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_products_refunds`
--


--
-- Table structure for table `ns_nexopos_orders_refunds`
--

CREATE TABLE `ns_nexopos_orders_refunds` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int NOT NULL,
  `author` int NOT NULL,
  `total` float NOT NULL,
  `tax_value` float NOT NULL DEFAULT '0',
  `shipping` float NOT NULL,
  `payment_method` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_refunds`
--


--
-- Table structure for table `ns_nexopos_orders_storage`
--

CREATE TABLE `ns_nexopos_orders_storage` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int DEFAULT NULL,
  `unit_quantity_id` int DEFAULT NULL,
  `unit_id` int DEFAULT NULL,
  `quantity` int DEFAULT NULL,
  `session_identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_storage`
--


--
-- Table structure for table `ns_nexopos_orders_taxes`
--

CREATE TABLE `ns_nexopos_orders_taxes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tax_id` int DEFAULT NULL,
  `order_id` int DEFAULT NULL,
  `rate` double NOT NULL,
  `tax_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_value` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_orders_taxes`
--


--
-- Table structure for table `ns_nexopos_payments_types`
--

CREATE TABLE `ns_nexopos_payments_types` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `priority` int NOT NULL DEFAULT '0',
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `readonly` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_payments_types`
--

INSERT INTO `ns_nexopos_payments_types` VALUES (1,'Cash','cash-payment',0,NULL,96,1,1,'2025-07-06 11:55:42','2025-07-06 11:55:42'),(2,'Bank Payment','bank-payment',0,NULL,96,1,1,'2025-07-06 11:55:42','2025-07-06 11:55:42'),(3,'Customer Account','account-payment',0,NULL,96,1,1,'2025-07-06 11:55:42','2025-07-06 11:55:42');

--
-- Table structure for table `ns_nexopos_permissions`
--

CREATE TABLE `ns_nexopos_permissions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `namespace` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ns_nexopos_permissions_name_unique` (`name`),
  UNIQUE KEY `ns_nexopos_permissions_namespace_unique` (`namespace`)
) ENGINE=InnoDB AUTO_INCREMENT=121 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_permissions`
--

INSERT INTO `ns_nexopos_permissions` VALUES (1,'Create Users','create.users','Can create users','2025-07-06 11:55:17','2025-07-06 11:55:17'),(2,'Read Users','read.users','Can read users','2025-07-06 11:55:17','2025-07-06 11:55:17'),(3,'Update Users','update.users','Can update users','2025-07-06 11:55:17','2025-07-06 11:55:17'),(4,'Delete Users','delete.users','Can delete users','2025-07-06 11:55:17','2025-07-06 11:55:17'),(5,'Create Roles','create.roles','Can create roles','2025-07-06 11:55:17','2025-07-06 11:55:17'),(6,'Read Roles','read.roles','Can read roles','2025-07-06 11:55:17','2025-07-06 11:55:17'),(7,'Update Roles','update.roles','Can update roles','2025-07-06 11:55:17','2025-07-06 11:55:17'),(8,'Delete Roles','delete.roles','Can delete roles','2025-07-06 11:55:17','2025-07-06 11:55:17'),(9,'Update Core','update.core','Can update core','2025-07-06 11:55:17','2025-07-06 11:55:17'),(10,'Manage Profile','manage.profile','Can manage profile','2025-07-06 11:55:17','2025-07-06 11:55:17'),(11,'Manage Modules','manage.modules','Can manage module : install, delete, update, migrate, enable, disable','2025-07-06 11:55:17','2025-07-06 11:55:17'),(12,'Manage Options','manage.options','Can manage options : read, update','2025-07-06 11:55:17','2025-07-06 11:55:17'),(13,'View Dashboard','read.dashboard','Can access the dashboard and see metrics','2025-07-06 11:55:17','2025-07-06 11:55:17'),(14,'Upload Medias','nexopos.upload.medias','Let the user upload medias.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(15,'See Medias','nexopos.see.medias','Let the user see medias.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(16,'Delete Medias','nexopos.delete.medias','Let the user delete medias.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(17,'Update Medias','nexopos.update.medias','Let the user update uploaded medias.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(18,'Create Categories','nexopos.create.categories','Let the user create products categories.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(19,'Delete Categories','nexopos.delete.categories','Let the user delete products categories.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(20,'Update Categories','nexopos.update.categories','Let the user update products categories.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(21,'Read Categories','nexopos.read.categories','Let the user read products categories.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(22,'Create Customers','nexopos.create.customers','Let the user create customers.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(23,'Delete Customers','nexopos.delete.customers','Let the user delete customers.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(24,'Update Customers','nexopos.update.customers','Let the user update customers.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(25,'Read Customers','nexopos.read.customers','Let the user read customers.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(26,'Import Customers','nexopos.import.customers','Let the user import customers.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(27,'Manage Customer Account History','nexopos.customers.manage-account-history','Can add, deduct amount from each customers account.','2025-07-06 11:55:17','2025-07-06 11:55:17'),(28,'Create Customers Groups','nexopos.create.customers-groups','Let the user create Customers Groups','2025-07-06 11:55:17','2025-07-06 11:55:17'),(29,'Delete Customers Groups','nexopos.delete.customers-groups','Let the user delete Customers Groups','2025-07-06 11:55:17','2025-07-06 11:55:17'),(30,'Update Customers Groups','nexopos.update.customers-groups','Let the user update Customers Groups','2025-07-06 11:55:18','2025-07-06 11:55:18'),(31,'Read Customers Groups','nexopos.read.customers-groups','Let the user read Customers Groups','2025-07-06 11:55:18','2025-07-06 11:55:18'),(32,'Create Coupons','nexopos.create.coupons','Let the user create coupons','2025-07-06 11:55:18','2025-07-06 11:55:18'),(33,'Delete Coupons','nexopos.delete.coupons','Let the user delete coupons','2025-07-06 11:55:18','2025-07-06 11:55:18'),(34,'Update Coupons','nexopos.update.coupons','Let the user update coupons','2025-07-06 11:55:18','2025-07-06 11:55:18'),(35,'Read Coupons','nexopos.read.coupons','Let the user read coupons','2025-07-06 11:55:18','2025-07-06 11:55:18'),(36,'Create Transaction Account','nexopos.create.transactions-account','Let the user create transactions account','2025-07-06 11:55:18','2025-07-06 11:55:18'),(37,'Delete Transactions Account','nexopos.delete.transactions-account','Let the user delete Transaction Account','2025-07-06 11:55:18','2025-07-06 11:55:18'),(38,'Update Transactions Account','nexopos.update.transactions-account','Let the user update Transaction Account','2025-07-06 11:55:18','2025-07-06 11:55:18'),(39,'Read Transactions Account','nexopos.read.transactions-account','Let the user read Transaction Account','2025-07-06 11:55:18','2025-07-06 11:55:18'),(40,'Create Transaction','nexopos.create.transactions','Let the user create transactions','2025-07-06 11:55:18','2025-07-06 11:55:18'),(41,'Delete Transaction','nexopos.delete.transactions','Let the user delete transactions','2025-07-06 11:55:18','2025-07-06 11:55:18'),(42,'Update Transaction','nexopos.update.transactions','Let the user update transactions','2025-07-06 11:55:18','2025-07-06 11:55:18'),(43,'Read Transaction','nexopos.read.transactions','Let the user read transactions','2025-07-06 11:55:18','2025-07-06 11:55:18'),(44,'Read Transactions History','nexopos.read.transactions-history','Give access to the transactions history.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(45,'Delete Transactions History','nexopos.delete.transactions-history','Allow to delete an Transactions History.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(46,'Update Transactions History','nexopos.update.transactions-history','Allow to the Transactions History.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(47,'Create Transactions History','nexopos.create.transactions-history','Allow to create a Transactions History.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(48,'Create Orders','nexopos.create.orders','Let the user create orders','2025-07-06 11:55:18','2025-07-06 11:55:18'),(49,'Delete Orders','nexopos.delete.orders','Let the user delete orders','2025-07-06 11:55:18','2025-07-06 11:55:18'),(50,'Update Orders','nexopos.update.orders','Let the user update orders','2025-07-06 11:55:18','2025-07-06 11:55:18'),(51,'Read Orders','nexopos.read.orders','Let the user read orders','2025-07-06 11:55:18','2025-07-06 11:55:18'),(52,'Void Order','nexopos.void.orders','Let the user void orders','2025-07-06 11:55:18','2025-07-06 11:55:18'),(53,'Refund Order','nexopos.refund.orders','Let the user refund orders','2025-07-06 11:55:18','2025-07-06 11:55:18'),(54,'Make Payment To orders','nexopos.make-payment.orders','Allow the user to make payments to orders.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(55,'Create Procurements','nexopos.create.procurements','Let the user create procurements','2025-07-06 11:55:18','2025-07-06 11:55:18'),(56,'Delete Procurements','nexopos.delete.procurements','Let the user delete procurements','2025-07-06 11:55:18','2025-07-06 11:55:18'),(57,'Update Procurements','nexopos.update.procurements','Let the user update procurements','2025-07-06 11:55:18','2025-07-06 11:55:18'),(58,'Read Procurements','nexopos.read.procurements','Let the user read procurements','2025-07-06 11:55:18','2025-07-06 11:55:18'),(59,'Create Providers','nexopos.create.providers','Let the user create providers','2025-07-06 11:55:18','2025-07-06 11:55:18'),(60,'Delete Providers','nexopos.delete.providers','Let the user delete providers','2025-07-06 11:55:18','2025-07-06 11:55:18'),(61,'Update Providers','nexopos.update.providers','Let the user update providers','2025-07-06 11:55:18','2025-07-06 11:55:18'),(62,'Read Providers','nexopos.read.providers','Let the user read providers','2025-07-06 11:55:18','2025-07-06 11:55:18'),(63,'Create Products','nexopos.create.products','Let the user create products','2025-07-06 11:55:18','2025-07-06 11:55:18'),(64,'Delete Products','nexopos.delete.products','Let the user delete products','2025-07-06 11:55:18','2025-07-06 11:55:18'),(65,'Update Products','nexopos.update.products','Let the user update products','2025-07-06 11:55:18','2025-07-06 11:55:18'),(66,'Read Products','nexopos.read.products','Let the user read products','2025-07-06 11:55:18','2025-07-06 11:55:18'),(67,'Convert Products Units','nexopos.convert.products-units','Let the user convert products','2025-07-06 11:55:18','2025-07-06 11:55:18'),(68,'Read Product History','nexopos.read.products-history','Let the user read products history','2025-07-06 11:55:18','2025-07-06 11:55:18'),(69,'Adjust Product Stock','nexopos.make.products-adjustments','Let the user adjust product stock.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(70,'Create Product Units/Unit Group','nexopos.create.products-units','Let the user create products units.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(71,'Read Product Units/Unit Group','nexopos.read.products-units','Let the user read products units.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(72,'Update Product Units/Unit Group','nexopos.update.products-units','Let the user update products units.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(73,'Delete Product Units/Unit Group','nexopos.delete.products-units','Let the user delete products units.','2025-07-06 11:55:18','2025-07-06 11:55:18'),(74,'Create Registers','nexopos.create.registers','Let the user create registers','2025-07-06 11:55:18','2025-07-06 11:55:18'),(75,'Delete Registers','nexopos.delete.registers','Let the user delete registers','2025-07-06 11:55:18','2025-07-06 11:55:18'),(76,'Update Registers','nexopos.update.registers','Let the user update registers','2025-07-06 11:55:18','2025-07-06 11:55:18'),(77,'Read Registers','nexopos.read.registers','Let the user read registers','2025-07-06 11:55:18','2025-07-06 11:55:18'),(78,'Read Registers History','nexopos.read.registers-history','Let the user read registers history','2025-07-06 11:55:19','2025-07-06 11:55:19'),(79,'Read Use Registers','nexopos.use.registers','Let the user use registers','2025-07-06 11:55:19','2025-07-06 11:55:19'),(80,'Create Rewards','nexopos.create.rewards','Let the user create Rewards','2025-07-06 11:55:19','2025-07-06 11:55:19'),(81,'Delete Rewards','nexopos.delete.rewards','Let the user delete Rewards','2025-07-06 11:55:19','2025-07-06 11:55:19'),(82,'Update Rewards','nexopos.update.rewards','Let the user update Rewards','2025-07-06 11:55:19','2025-07-06 11:55:19'),(83,'Read Rewards','nexopos.read.rewards','Let the user read Rewards','2025-07-06 11:55:19','2025-07-06 11:55:19'),(84,'Create Taxes','nexopos.create.taxes','Let the user create taxes','2025-07-06 11:55:19','2025-07-06 11:55:19'),(85,'Delete Taxes','nexopos.delete.taxes','Let the user delete taxes','2025-07-06 11:55:19','2025-07-06 11:55:19'),(86,'Update Taxes','nexopos.update.taxes','Let the user update taxes','2025-07-06 11:55:19','2025-07-06 11:55:19'),(87,'Read Taxes','nexopos.read.taxes','Let the user read taxes','2025-07-06 11:55:19','2025-07-06 11:55:19'),(88,'See Sale Report','nexopos.reports.sales','Let you see the sales report','2025-07-06 11:55:19','2025-07-06 11:55:19'),(89,'See Products Report','nexopos.reports.products-report','Let you see the Products report','2025-07-06 11:55:19','2025-07-06 11:55:19'),(90,'See Best Report','nexopos.reports.best_sales','Let you see the best_sales report','2025-07-06 11:55:19','2025-07-06 11:55:19'),(91,'See Transaction Report','nexopos.reports.transactions','Let you see the transactions report','2025-07-06 11:55:19','2025-07-06 11:55:19'),(92,'See Yearly Sales','nexopos.reports.yearly','Allow to see the yearly sales.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(93,'See Customers','nexopos.reports.customers','Allow to see the customers','2025-07-06 11:55:19','2025-07-06 11:55:19'),(94,'See Inventory Tracking','nexopos.reports.inventory','Allow to see the inventory','2025-07-06 11:55:19','2025-07-06 11:55:19'),(95,'See Customers Statement','nexopos.reports.customers-statement','Allow to see the customers statement.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(96,'Read Sales by Payment Types','nexopos.reports.payment-types','Let the user read the report that shows sales by payment types.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(97,'Read Low Stock Report','nexopos.reports.low-stock','Let the user read the report that shows low stock.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(98,'Read Stock History','nexopos.reports.stock-history','Let the user read the stock history report.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(99,'Manage Order Payments','nexopos.manage-payments-types','Allow to create, update and delete payments type.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(100,'Edit Purchase Price','nexopos.pos.edit-purchase-price','Let the user edit the purchase price of products.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(101,'Edit Order Settings','nexopos.pos.edit-settings','Let the user edit the order settings.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(102,'Edit Product Discounts','nexopos.pos.products-discount','Let the user add discount on products.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(103,'Edit Cart Discounts','nexopos.pos.cart-discount','Let the user add discount on cart.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(104,'POS: Delete Order Products','nexopos.pos.delete-order-product','Let the user delete order products on POS.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(105,'Widget: Incomplete Sale Card Widget','nexopos.see.incomplete-sale-card-widget','Will display a card of current and overall incomplete sales.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(106,'Widget: Expense Card Widget','nexopos.see.expense-card-widget','Will display a card of current and overwall expenses.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(107,'Widget: Sale Card Widget','nexopos.see.sale-card-widget','Will display current and overall sales.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(108,'Widget: Best Customers','nexopos.see.best-customers-widget','Will display all customers with the highest purchases.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(109,'Widget: Profile','nexopos.see.profile-widget','Will display a profile widget with user stats.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(110,'Widget: Orders Chart','nexopos.see.orders-chart-widget','Will display a chart of weekly sales.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(111,'Widget: Orders Summary','nexopos.see.orders-summary-widget','Will display a summary of recent sales.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(112,'Widget: Best Cashiers','nexopos.see.best-cashier-widget','Will display all cashiers who performs well.','2025-07-06 11:55:19','2025-07-06 11:55:19'),(113,'Read Cash Flow History','nexopos.read.cash-flow-history','Allow to the Cash Flow History.','2025-07-06 11:55:25','2025-07-06 11:55:25'),(114,'Delete Expense History','nexopos.delete.cash-flow-history','Allow to delete an expense history.','2025-07-06 11:55:25','2025-07-06 11:55:25'),(115,'Manage Customers Account','nexopos.customers.manage-account','Allow to manage customer virtual deposit account.','2025-07-06 11:55:25','2025-07-06 11:55:25'),(116,'Create Products Labels','nexopos.create.products-labels','Allow the user to create products labels','2025-07-06 11:55:25','2025-07-06 11:55:25'),(117,'Create Instalment','nexopos.create.orders-instalments','Allow the user to create instalments.','2025-07-06 11:55:39','2025-07-06 11:55:39'),(118,'Update Instalment','nexopos.update.orders-instalments','Allow the user to update instalments.','2025-07-06 11:55:39','2025-07-06 11:55:39'),(119,'Read Instalment','nexopos.read.orders-instalments','Allow the user to read instalments.','2025-07-06 11:55:39','2025-07-06 11:55:39'),(120,'Delete Instalment','nexopos.delete.orders-instalments','Allow the user to delete instalments.','2025-07-06 11:55:40','2025-07-06 11:55:40');

--
-- Table structure for table `ns_nexopos_procurements`
--

CREATE TABLE `ns_nexopos_procurements` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `provider_id` int NOT NULL,
  `value` float NOT NULL DEFAULT '0',
  `cost` float NOT NULL DEFAULT '0',
  `tax_value` float NOT NULL DEFAULT '0',
  `invoice_reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `automatic_approval` tinyint(1) DEFAULT '0',
  `delivery_time` datetime DEFAULT NULL,
  `invoice_date` datetime DEFAULT NULL,
  `payment_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'unpaid',
  `delivery_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `total_items` int NOT NULL DEFAULT '0',
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_procurements`
--


--
-- Table structure for table `ns_nexopos_procurements_products`
--

CREATE TABLE `ns_nexopos_procurements_products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `gross_purchase_price` float NOT NULL DEFAULT '0',
  `net_purchase_price` float NOT NULL DEFAULT '0',
  `procurement_id` int NOT NULL,
  `product_id` int NOT NULL,
  `purchase_price` float NOT NULL DEFAULT '0',
  `quantity` float NOT NULL,
  `available_quantity` float NOT NULL,
  `tax_group_id` int DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expiration_date` datetime DEFAULT NULL,
  `tax_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tax_value` float NOT NULL DEFAULT '0',
  `total_purchase_price` float NOT NULL DEFAULT '0',
  `unit_id` int NOT NULL,
  `convert_unit_id` int DEFAULT NULL,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_procurements_products`
--


--
-- Table structure for table `ns_nexopos_products`
--

CREATE TABLE `ns_nexopos_products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tax_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_group_id` int DEFAULT NULL,
  `tax_value` float NOT NULL DEFAULT '0',
  `product_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'product',
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'tangible',
  `accurate_tracking` tinyint(1) NOT NULL DEFAULT '0',
  `auto_cogs` tinyint(1) NOT NULL DEFAULT '1',
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'available',
  `stock_management` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'enabled',
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `barcode_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sku` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `thumbnail_id` int DEFAULT NULL,
  `category_id` int DEFAULT NULL,
  `parent_id` int NOT NULL DEFAULT '0',
  `unit_group` int NOT NULL,
  `on_expiration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'prevent_sales',
  `expires` tinyint(1) NOT NULL DEFAULT '0',
  `searchable` tinyint(1) NOT NULL DEFAULT '1',
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_products`
--


--
-- Table structure for table `ns_nexopos_products_categories`
--

CREATE TABLE `ns_nexopos_products_categories` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_id` int DEFAULT '0',
  `media_id` int NOT NULL DEFAULT '0',
  `preview_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `displays_on_pos` tinyint(1) NOT NULL DEFAULT '1',
  `total_items` int NOT NULL DEFAULT '0',
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_products_categories`
--


--
-- Table structure for table `ns_nexopos_products_galleries`
--

CREATE TABLE `ns_nexopos_products_galleries` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_id` int NOT NULL,
  `media_id` int DEFAULT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order` int NOT NULL DEFAULT '0',
  `featured` tinyint(1) NOT NULL DEFAULT '0',
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_products_galleries`
--


--
-- Table structure for table `ns_nexopos_products_histories`
--

CREATE TABLE `ns_nexopos_products_histories` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `procurement_id` int DEFAULT NULL,
  `procurement_product_id` int DEFAULT NULL,
  `order_id` int DEFAULT NULL,
  `order_product_id` int DEFAULT NULL,
  `operation_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `unit_id` int NOT NULL,
  `before_quantity` float DEFAULT NULL,
  `quantity` float NOT NULL,
  `after_quantity` float DEFAULT NULL,
  `unit_price` float NOT NULL,
  `total_price` float NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_products_histories`
--


--
-- Table structure for table `ns_nexopos_products_histories_combined`
--

CREATE TABLE `ns_nexopos_products_histories_combined` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `product_id` int NOT NULL,
  `unit_id` int NOT NULL,
  `initial_quantity` double NOT NULL DEFAULT '0',
  `sold_quantity` double NOT NULL DEFAULT '0',
  `procured_quantity` double NOT NULL DEFAULT '0',
  `defective_quantity` double NOT NULL DEFAULT '0',
  `final_quantity` double NOT NULL DEFAULT '0',
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_products_histories_combined`
--


--
-- Table structure for table `ns_nexopos_products_subitems`
--

CREATE TABLE `ns_nexopos_products_subitems` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL,
  `product_id` int NOT NULL,
  `unit_id` int NOT NULL,
  `unit_quantity_id` int NOT NULL,
  `sale_price` double NOT NULL DEFAULT '0',
  `quantity` double NOT NULL DEFAULT '0',
  `total_price` double NOT NULL DEFAULT '0',
  `author` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_products_subitems`
--


--
-- Table structure for table `ns_nexopos_products_taxes`
--

CREATE TABLE `ns_nexopos_products_taxes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `unit_quantity_id` int NOT NULL,
  `tax_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `rate` float NOT NULL,
  `value` float NOT NULL,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_products_taxes`
--


--
-- Table structure for table `ns_nexopos_products_unit_quantities`
--

CREATE TABLE `ns_nexopos_products_unit_quantities` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'product',
  `preview_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expiration_date` datetime DEFAULT NULL,
  `unit_id` int NOT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantity` float NOT NULL,
  `low_quantity` float NOT NULL DEFAULT '0',
  `stock_alert_enabled` tinyint(1) NOT NULL DEFAULT '0',
  `sale_price` float NOT NULL DEFAULT '0',
  `sale_price_edit` float NOT NULL DEFAULT '0',
  `sale_price_without_tax` float NOT NULL DEFAULT '0',
  `sale_price_with_tax` float NOT NULL DEFAULT '0',
  `sale_price_tax` float NOT NULL DEFAULT '0',
  `wholesale_price` float NOT NULL DEFAULT '0',
  `wholesale_price_edit` float NOT NULL DEFAULT '0',
  `wholesale_price_with_tax` float NOT NULL DEFAULT '0',
  `wholesale_price_without_tax` float NOT NULL DEFAULT '0',
  `wholesale_price_tax` float NOT NULL DEFAULT '0',
  `custom_price` float NOT NULL DEFAULT '0',
  `custom_price_edit` float NOT NULL DEFAULT '0',
  `custom_price_with_tax` float NOT NULL DEFAULT '0',
  `custom_price_without_tax` float NOT NULL DEFAULT '0',
  `custom_price_tax` float NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `convert_unit_id` int DEFAULT NULL,
  `cogs` double NOT NULL DEFAULT '0',
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_products_unit_quantities`
--


--
-- Table structure for table `ns_nexopos_providers`
--

CREATE TABLE `ns_nexopos_providers` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_1` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `author` int NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `amount_due` float NOT NULL DEFAULT '0',
  `amount_paid` float NOT NULL DEFAULT '0',
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ns_nexopos_providers_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_providers`
--


--
-- Table structure for table `ns_nexopos_registers`
--

CREATE TABLE `ns_nexopos_registers` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'closed',
  `description` text COLLATE utf8mb4_unicode_ci,
  `used_by` int DEFAULT NULL,
  `author` int NOT NULL,
  `balance` float NOT NULL DEFAULT '0',
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_registers`
--


--
-- Table structure for table `ns_nexopos_registers_history`
--

CREATE TABLE `ns_nexopos_registers_history` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `register_id` int NOT NULL,
  `payment_id` int DEFAULT NULL,
  `payment_type_id` int NOT NULL DEFAULT '0',
  `order_id` int DEFAULT NULL,
  `action` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `author` int NOT NULL,
  `value` float NOT NULL DEFAULT '0',
  `description` text COLLATE utf8mb4_unicode_ci,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `balance_before` float NOT NULL DEFAULT '0',
  `transaction_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `balance_after` float NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_registers_history`
--


--
-- Table structure for table `ns_nexopos_rewards_system`
--

CREATE TABLE `ns_nexopos_rewards_system` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `author` int NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `target` float NOT NULL DEFAULT '0',
  `description` text COLLATE utf8mb4_unicode_ci,
  `coupon_id` int DEFAULT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_rewards_system`
--


--
-- Table structure for table `ns_nexopos_rewards_system_rules`
--

CREATE TABLE `ns_nexopos_rewards_system_rules` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `from` float NOT NULL,
  `to` float NOT NULL,
  `reward` float NOT NULL,
  `reward_id` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `author` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_rewards_system_rules`
--


--
-- Table structure for table `ns_nexopos_role_permission`
--

CREATE TABLE `ns_nexopos_role_permission` (
  `permission_id` int NOT NULL,
  `role_id` int NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_role_permission`
--

INSERT INTO `ns_nexopos_role_permission` VALUES (1,2),(2,2),(3,2),(4,2),(5,2),(6,2),(7,2),(8,2),(9,2),(10,1),(10,2),(10,3),(10,4),(10,5),(11,2),(12,2),(13,2),(13,3),(13,4),(13,5),(14,2),(15,2),(16,2),(17,2),(18,2),(18,3),(19,2),(19,3),(20,2),(20,3),(21,2),(21,3),(22,2),(22,3),(23,2),(23,3),(24,2),(24,3),(25,2),(25,3),(26,2),(26,3),(27,2),(27,3),(27,4),(28,2),(28,3),(29,2),(29,3),(30,2),(30,3),(31,2),(31,3),(32,2),(32,3),(33,2),(33,3),(34,2),(34,3),(35,2),(35,3),(36,2),(36,3),(37,2),(37,3),(38,2),(38,3),(39,2),(39,3),(40,2),(40,3),(41,2),(41,3),(42,2),(42,3),(43,2),(43,3),(44,2),(44,3),(45,2),(45,3),(46,2),(46,3),(47,2),(47,3),(48,2),(48,3),(48,4),(49,2),(49,3),(50,2),(50,3),(50,4),(51,2),(51,3),(51,4),(52,2),(52,3),(52,4),(53,2),(53,3),(53,4),(54,2),(54,3),(54,4),(55,2),(55,3),(56,2),(56,3),(57,2),(57,3),(58,2),(58,3),(59,2),(59,3),(60,2),(60,3),(61,2),(61,3),(62,2),(62,3),(63,2),(63,3),(64,2),(64,3),(65,2),(65,3),(66,2),(66,3),(67,2),(67,3),(68,2),(68,3),(69,2),(69,3),(70,2),(70,3),(71,2),(71,3),(72,2),(72,3),(73,2),(73,3),(74,2),(74,3),(75,2),(75,3),(76,2),(76,3),(77,2),(77,3),(78,2),(78,3),(79,2),(79,3),(80,2),(80,3),(81,2),(81,3),(82,2),(82,3),(83,2),(83,3),(84,2),(84,3),(85,2),(85,3),(86,2),(86,3),(87,2),(87,3),(88,2),(88,3),(89,2),(89,3),(90,2),(90,3),(91,2),(91,3),(92,2),(92,3),(93,2),(93,3),(94,2),(94,3),(95,2),(95,3),(96,2),(96,3),(97,2),(97,3),(98,2),(98,3),(99,2),(99,3),(100,2),(100,3),(100,4),(101,2),(101,3),(101,4),(102,2),(102,3),(102,4),(103,2),(103,3),(103,4),(104,2),(104,3),(104,4),(105,2),(105,3),(106,2),(106,3),(107,2),(107,3),(108,2),(108,3),(109,1),(109,2),(109,3),(109,4),(109,5),(110,2),(110,3),(111,2),(111,3),(112,2),(112,3),(113,2),(113,3),(114,2),(114,3),(115,2),(115,3),(116,2),(116,3),(117,2),(117,3),(118,2),(118,3),(119,2),(119,3),(120,2),(120,3);

--
-- Table structure for table `ns_nexopos_roles`
--

CREATE TABLE `ns_nexopos_roles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `namespace` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `reward_system_id` int DEFAULT NULL,
  `minimal_credit_payment` double NOT NULL DEFAULT '0',
  `author` int DEFAULT NULL,
  `locked` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ns_nexopos_roles_name_unique` (`name`),
  UNIQUE KEY `ns_nexopos_roles_namespace_unique` (`namespace`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_roles`
--

INSERT INTO `ns_nexopos_roles` VALUES (1,'User','user','Basic user role.',NULL,0,NULL,1,'2025-07-06 11:55:19','2025-07-06 11:55:19'),(2,'Administrator','admin','Master role which can perform all actions like create users, install/update/delete modules and much more.',NULL,0,NULL,1,'2025-07-06 11:55:19','2025-07-06 11:55:19'),(3,'Store Administrator','nexopos.store.administrator','Has a control over an entire store of NexoPOS.',NULL,0,NULL,1,'2025-07-06 11:55:22','2025-07-06 11:55:22'),(4,'Store Cashier','nexopos.store.cashier','Has a control over the sale process.',NULL,0,NULL,1,'2025-07-06 11:55:24','2025-07-06 11:55:24'),(5,'Store Customer','nexopos.store.customer','Can purchase orders and manage his profile.',NULL,0,NULL,1,'2025-07-06 11:55:24','2025-07-06 11:55:24');

--
-- Table structure for table `ns_nexopos_taxes`
--

CREATE TABLE `ns_nexopos_taxes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `rate` float NOT NULL,
  `tax_group_id` int NOT NULL,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_taxes`
--


--
-- Table structure for table `ns_nexopos_taxes_groups`
--

CREATE TABLE `ns_nexopos_taxes_groups` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_taxes_groups`
--


--
-- Table structure for table `ns_nexopos_transactions`
--

CREATE TABLE `ns_nexopos_transactions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_id` int NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `media_id` int NOT NULL DEFAULT '0',
  `value` float NOT NULL DEFAULT '0',
  `recurring` tinyint(1) NOT NULL DEFAULT '0',
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `group_id` int DEFAULT NULL,
  `occurrence` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `occurrence_value` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `scheduled_date` datetime DEFAULT NULL,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_transactions`
--


--
-- Table structure for table `ns_nexopos_transactions_accounts`
--

CREATE TABLE `ns_nexopos_transactions_accounts` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  `sub_category_id` int DEFAULT NULL,
  `category_identifier` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_transactions_accounts`
--

INSERT INTO `ns_nexopos_transactions_accounts` VALUES (1,'Fixed Assets','1001-assets-fixed-assets',NULL,'assets',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(2,'Current Assets','1002-assets-current-assets',NULL,'assets',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(3,'Inventory Account','1003-assets-inventory-account',NULL,'assets',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(4,'Current Liabilities','2001-liabilities-current-liabilities',NULL,'liabilities',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(5,'Sales Revenues','4001-revenues-sales-revenues',NULL,'revenues',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(6,'Direct Expenses','5001-expenses-direct-expenses',NULL,'expenses',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(7,'Expenses Cash','1004-assets-expenses-cash',2,'assets',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(8,'Procurement Cash','1005-assets-procurement-cash',2,'assets',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(9,'Procurement Payable','2002-liabilities-procurement-payable',4,'liabilities',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(10,'Receivables','1006-assets-receivables',2,'assets',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(11,'Sales','1007-assets-sales',2,'assets',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(12,'Refunds','4002-revenues-refunds',5,'revenues',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(13,'Sales COGS','5002-expenses-sales-cogs',6,'expenses',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(14,'Operating Expenses','5003-expenses-operating-expenses',6,'expenses',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(15,'Rent Expenses','5004-expenses-rent-expenses',6,'expenses',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(16,'Other Expenses','5005-expenses-other-expenses',6,'expenses',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(17,'Salaries And Wages','5006-expenses-salaries-and-wages',6,'expenses',NULL,96,NULL,'2025-07-06 11:55:43','2025-07-06 11:55:43');

--
-- Table structure for table `ns_nexopos_transactions_actions_rules`
--

CREATE TABLE `ns_nexopos_transactions_actions_rules` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `on` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `action` enum('increase','decrease') COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_id` int NOT NULL,
  `do` enum('increase','decrease') COLLATE utf8mb4_unicode_ci NOT NULL,
  `offset_account_id` int NOT NULL,
  `locked` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_transactions_actions_rules`
--

INSERT INTO `ns_nexopos_transactions_actions_rules` VALUES (1,'procurement_unpaid','increase',3,'increase',9,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(2,'procurement_paid','increase',3,'decrease',8,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(3,'procurement_paid','increase',7,'decrease',8,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(4,'procurement_from_unpaid_to_paid','decrease',9,'decrease',8,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(5,'order_unpaid','increase',10,'increase',5,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(6,'order_unpaid','increase',7,'decrease',3,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(7,'order_from_unpaid_to_paid','decrease',11,'increase',10,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(8,'order_paid','increase',11,'increase',5,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(9,'order_refunded','decrease',5,'decrease',11,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(10,'order_cogs','increase',13,'decrease',3,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(11,'order_paid_voided','increase',11,'decrease',11,0,'2025-07-06 11:55:43','2025-07-06 11:55:43'),(12,'order_unpaid_voided','decrease',5,'decrease',10,0,'2025-07-06 11:55:43','2025-07-06 11:55:43');

--
-- Table structure for table `ns_nexopos_transactions_balance_days`
--

CREATE TABLE `ns_nexopos_transactions_balance_days` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `opening_balance` double NOT NULL DEFAULT '0',
  `income` double NOT NULL DEFAULT '0',
  `expense` double NOT NULL DEFAULT '0',
  `closing_balance` double NOT NULL DEFAULT '0',
  `date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_transactions_balance_days`
--


--
-- Table structure for table `ns_nexopos_transactions_balance_months`
--

CREATE TABLE `ns_nexopos_transactions_balance_months` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `opening_balance` double NOT NULL DEFAULT '0',
  `income` double NOT NULL DEFAULT '0',
  `expense` double NOT NULL DEFAULT '0',
  `closing_balance` double NOT NULL DEFAULT '0',
  `date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_transactions_balance_months`
--


--
-- Table structure for table `ns_nexopos_transactions_histories`
--

CREATE TABLE `ns_nexopos_transactions_histories` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` int DEFAULT NULL,
  `operation` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_reflection` tinyint(1) NOT NULL DEFAULT '0',
  `reflection_source_id` int DEFAULT NULL,
  `transaction_account_id` int DEFAULT NULL,
  `procurement_id` int DEFAULT NULL,
  `order_refund_id` int DEFAULT NULL,
  `order_payment_id` int DEFAULT NULL,
  `order_refund_product_id` int DEFAULT NULL,
  `order_id` int DEFAULT NULL,
  `order_product_id` int DEFAULT NULL,
  `register_history_id` int DEFAULT NULL,
  `customer_account_history_id` int DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `value` float NOT NULL DEFAULT '0',
  `trigger_date` datetime DEFAULT NULL,
  `rule_id` int DEFAULT NULL,
  `author` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_transactions_histories`
--


--
-- Table structure for table `ns_nexopos_units`
--

CREATE TABLE `ns_nexopos_units` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `group_id` int NOT NULL,
  `value` float NOT NULL,
  `preview_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `base_unit` tinyint(1) NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ns_nexopos_units_identifier_unique` (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_units`
--


--
-- Table structure for table `ns_nexopos_units_groups`
--

CREATE TABLE `ns_nexopos_units_groups` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `author` int NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_units_groups`
--


--
-- Table structure for table `ns_nexopos_users_attributes`
--

CREATE TABLE `ns_nexopos_users_attributes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `avatar_link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `theme` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `language` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_users_attributes`
--

INSERT INTO `ns_nexopos_users_attributes` VALUES (1,96,NULL,NULL,'en');

--
-- Table structure for table `ns_nexopos_users_roles_relations`
--

CREATE TABLE `ns_nexopos_users_roles_relations` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `role_id` int NOT NULL,
  `user_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_users_roles_relations`
--

INSERT INTO `ns_nexopos_users_roles_relations` VALUES (1,2,96,'2025-07-06 11:55:42','2025-07-06 11:55:42');

--
-- Table structure for table `ns_nexopos_users_widgets`
--

CREATE TABLE `ns_nexopos_users_widgets` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `column` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `class_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `position` int NOT NULL,
  `user_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_nexopos_users_widgets`
--

INSERT INTO `ns_nexopos_users_widgets` VALUES ('9f5341c0-4448-4e97-a75f-c07aca50d748','nsIncompleteSaleCardWidget','first-column','App\\Widgets\\IncompleteSaleCardWidget',0,96,'2025-07-06 11:55:42','2025-07-06 11:55:42'),('9f5341c0-4e3b-4547-b669-bed7d5b6cdc8','nsBestCustomers','first-column','App\\Widgets\\BestCustomersWidget',1,96,'2025-07-06 11:55:42','2025-07-06 11:55:42'),('9f5341c0-579e-4960-be61-c86781b50771','nsOrdersSummary','first-column','App\\Widgets\\OrdersSummaryWidget',2,96,'2025-07-06 11:55:42','2025-07-06 11:55:42'),('9f5341c0-5d54-40f0-a60f-f2bf33c12aea','nsExpenseCardWidget','second-column','App\\Widgets\\ExpenseCardWidget',0,96,'2025-07-06 11:55:42','2025-07-06 11:55:42'),('9f5341c0-63fc-4fd0-a8e1-6e5b6d19da25','nsProfileWidget','second-column','App\\Widgets\\ProfileWidget',1,96,'2025-07-06 11:55:42','2025-07-06 11:55:42'),('9f5341c0-6d29-4912-9819-853f2547a70b','nsBestCashiers','second-column','App\\Widgets\\BestCashiersWidget',2,96,'2025-07-06 11:55:42','2025-07-06 11:55:42'),('9f5341c0-7638-48cb-b244-e3f69ebbf45c','nsSaleCardWidget','third-column','App\\Widgets\\SaleCardWidget',0,96,'2025-07-06 11:55:42','2025-07-06 11:55:42'),('9f5341c0-7bba-4644-ba97-8686067b1f34','nsOrdersChart','third-column','App\\Widgets\\OrdersChartWidget',1,96,'2025-07-06 11:55:42','2025-07-06 11:55:42');

--
-- Table structure for table `ns_telescope_entries`
--

CREATE TABLE `ns_telescope_entries` (
  `sequence` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `family_hash` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `should_display_on_index` tinyint(1) NOT NULL DEFAULT '1',
  `type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`sequence`),
  UNIQUE KEY `ns_telescope_entries_uuid_unique` (`uuid`),
  KEY `ns_telescope_entries_batch_id_index` (`batch_id`),
  KEY `ns_telescope_entries_family_hash_index` (`family_hash`),
  KEY `ns_telescope_entries_created_at_index` (`created_at`),
  KEY `ns_telescope_entries_type_should_display_on_index_index` (`type`,`should_display_on_index`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_telescope_entries`
--


--
-- Table structure for table `ns_telescope_entries_tags`
--

CREATE TABLE `ns_telescope_entries_tags` (
  `entry_uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tag` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  KEY `ns_telescope_entries_tags_entry_uuid_tag_index` (`entry_uuid`,`tag`),
  KEY `ns_telescope_entries_tags_tag_index` (`tag`),
  CONSTRAINT `ns_telescope_entries_tags_entry_uuid_foreign` FOREIGN KEY (`entry_uuid`) REFERENCES `ns_telescope_entries` (`uuid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_telescope_entries_tags`
--


--
-- Table structure for table `ns_telescope_monitoring`
--

CREATE TABLE `ns_telescope_monitoring` (
  `tag` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ns_telescope_monitoring`
--



