-- phpMyAdmin SQL Dump
-- version 5.2.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 29, 2026 at 08:18 PM
-- Server version: 8.4.3
-- PHP Version: 8.3.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `laravel_insan`
--

-- --------------------------------------------------------

--
-- Table structure for table `banks`
--

CREATE TABLE `banks` (
  `id` bigint UNSIGNED NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `owner_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `owner_phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8mb4_unicode_ci,
  `balance` decimal(10,2) NOT NULL DEFAULT '0.00',
  `status` enum('active','inactive') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `banks`
--

INSERT INTO `banks` (`id`, `label`, `bank_name`, `owner_name`, `owner_phone`, `note`, `balance`, `status`, `created_at`, `updated_at`) VALUES
(4, 'Voluptas sint aliqua', 'Beatae dolor quis au', 'Nisi aperiam commodo', '+1 (312) 457-7168', 'Suscipit magna rerum', 1484.00, 'active', '2026-08-28 16:45:09', '2026-08-29 19:46:06');

-- --------------------------------------------------------

--
-- Table structure for table `bank_transactions`
--

CREATE TABLE `bank_transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `bank_id` bigint UNSIGNED NOT NULL,
  `date` date DEFAULT NULL,
  `note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `type` enum('in','out','other') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bank_transactions`
--

INSERT INTO `bank_transactions` (`id`, `bank_id`, `date`, `note`, `amount`, `type`, `by`, `created_at`, `updated_at`) VALUES
(1, 4, '2026-08-28', 'Initial Deposit', 39.00, 'in', 1, '2026-08-28 16:45:09', '2026-08-28 16:45:09'),
(2, 4, '2026-08-28', 'This is a test deposit', 100.00, 'in', 1, '2026-08-28 17:01:03', '2026-08-28 17:01:03'),
(3, 4, '2026-08-28', NULL, 1.00, 'in', 1, '2026-08-28 17:01:11', '2026-08-28 17:01:11'),
(4, 4, '2026-08-28', NULL, 60.00, 'in', 1, '2026-08-28 17:01:53', '2026-08-28 17:01:53'),
(5, 4, '2026-08-28', 'First out', 100.00, 'out', 1, '2026-08-28 17:08:10', '2026-08-28 17:08:10'),
(6, 4, '2026-08-28', 'Payment for product purchase, ID: 1', 79.00, 'other', 1, '2026-08-28 20:16:51', '2026-08-28 20:16:51'),
(7, 4, '2026-08-28', 'Payment for product purchase, ID: 2', 100.00, 'other', 1, '2026-08-28 20:21:51', '2026-08-28 20:21:51'),
(8, 4, '2026-08-29', 'Initial Deposit', 279.00, 'in', 1, '2026-08-28 20:25:51', '2026-08-28 20:25:51'),
(9, 4, '2026-08-29', 'Initial Deposit', 279.00, 'in', 1, '2026-08-28 20:25:57', '2026-08-28 20:25:57'),
(10, 4, '2026-08-28', 'Payment for product purchase, ID: 3', 100.00, 'other', 1, '2026-08-28 21:03:01', '2026-08-28 21:03:01'),
(11, 4, '2026-08-28', 'Payment for product purchase, ID: 4', 79.00, 'other', 1, '2026-08-28 22:33:58', '2026-08-28 22:33:58'),
(12, 4, '2026-08-28', 'Expense: This is atest', 10.00, 'other', 1, '2026-08-28 22:53:09', '2026-08-28 22:53:09'),
(14, 4, '2026-08-29', 'Purchases: Payment for purchases- This is a test due', 270.00, 'other', 1, '2026-08-29 14:35:35', '2026-08-29 14:35:35'),
(15, 4, '2026-08-29', 'Sales Income, ID: 1', 70.00, 'in', 1, '2026-08-29 16:59:27', '2026-08-29 16:59:27'),
(16, 4, '2026-08-29', 'Sales Due payment- sdsdg', 9.00, 'in', 1, '2026-08-29 17:17:26', '2026-08-29 17:17:26'),
(17, 4, '2026-08-29', 'Sales Income, Sales ID: 2', 100.00, 'in', 1, '2026-08-29 17:27:19', '2026-08-29 17:27:19'),
(18, 4, '2026-08-30', 'Expense: dsfghj', 12.00, 'other', 1, '2026-08-29 18:22:07', '2026-08-29 18:22:07'),
(19, 4, '2026-08-30', 'Sales Income, Sales ID: 3', 100.00, 'in', 1, '2026-08-29 18:27:26', '2026-08-29 18:27:26'),
(20, 4, '2026-08-30', 'Sales Income, Sales ID: 4', 12.00, 'in', 1, '2026-08-29 18:27:36', '2026-08-29 18:27:36'),
(21, 4, '2026-08-30', 'Sales Income, Sales ID: 5', 27.00, 'in', 1, '2026-08-29 19:25:01', '2026-08-29 19:25:01'),
(22, 4, '2026-08-30', 'Expense: sfsdg', 100.00, 'other', 1, '2026-08-29 19:29:02', '2026-08-29 19:29:02'),
(23, 4, '2026-08-30', 'Sales Due payment- asfsf', 500.00, 'in', 1, '2026-08-29 19:29:47', '2026-08-29 19:29:47'),
(24, 4, '2026-08-29', 'Sales Income, Sales ID: 6', 600.00, 'in', 1, '2026-08-29 19:34:12', '2026-08-29 19:34:12'),
(25, 4, '2026-08-29', 'Expense: cbxcb', 100.00, 'other', 1, '2026-08-29 19:34:21', '2026-08-29 19:34:21'),
(26, 4, '2026-07-01', 'Sales Income, Sales ID: 7', 100.00, 'in', 1, '2026-08-29 19:46:06', '2026-08-29 19:46:06');

-- --------------------------------------------------------

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` bigint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `owner` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` bigint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `companies`
--

CREATE TABLE `companies` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `companies`
--

INSERT INTO `companies` (`id`, `name`, `phone`, `email`, `address`, `created_at`, `updated_at`) VALUES
(2, 'Tenetur incididunt l', '+1 (377) 407-5094', 'bomudosod@mailinator.com', 'Ipsa ea in accusant', '2026-08-28 15:53:45', '2026-08-28 15:53:45'),
(3, 'Rem quibusdam a dolo', '+1 (425) 128-2388', 'jygub@mailinator.com', 'Delectus labore mag', '2026-08-28 22:32:51', '2026-08-28 22:32:51');

-- --------------------------------------------------------

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `name`, `phone`, `address`, `created_at`, `updated_at`) VALUES
(2, 'Voluptate voluptatem dgdfhdfhfhf xdgdfhd dgdhdfh', '+1 (208) 996-7155', 'Animi delectus ut', '2026-08-27 19:42:19', '2026-08-29 18:47:36');

-- --------------------------------------------------------

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` bigint UNSIGNED NOT NULL,
  `uid` text COLLATE utf8mb4_unicode_ci,
  `note` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `date` date NOT NULL,
  `bank_id` bigint UNSIGNED DEFAULT NULL,
  `by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expenses`
--

INSERT INTO `expenses` (`id`, `uid`, `note`, `amount`, `date`, `bank_id`, `by`, `created_at`, `updated_at`) VALUES
(3, 'EX003', 'sfsdg', 100.00, '2026-08-30', 4, 1, '2026-08-29 19:29:02', '2026-08-29 19:29:02'),
(4, 'EX004', 'cbxcb', 100.00, '2026-08-29', 4, 1, '2026-08-29 19:34:21', '2026-08-29 19:34:21');

-- --------------------------------------------------------

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` varchar(255) 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` smallint UNSIGNED NOT NULL,
  `reserved_at` int UNSIGNED DEFAULT NULL,
  `available_at` int UNSIGNED NOT NULL,
  `created_at` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(6, '2026_08_28_004950_create_products_table', 3),
(7, '2026_08_28_010855_create_customers_table', 4),
(8, '2026_08_28_014323_create_companies_table', 5),
(9, '2026_08_28_215556_create_banks_table', 6),
(10, '2026_08_28_220119_create_bank_transactions_table', 7),
(11, '2026_08_29_002634_create_purchases_table', 8),
(13, '2026_08_29_025248_create_purchase_transactions_table', 9),
(14, '2026_08_27_154115_create_expenses_table', 10),
(15, '2026_08_29_215652_create_sales_table', 11),
(16, '2026_08_29_225100_create_sales_transactions_table', 12);

-- --------------------------------------------------------

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `stock` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `name`, `price`, `stock`, `created_at`, `updated_at`) VALUES
(1, 'First product', 100.00, 896, '2026-08-27 19:02:58', '2026-08-29 19:46:06'),
(2, 'Pariatur Assumenda', 79.00, 478, '2026-08-27 19:05:38', '2026-08-29 19:34:12');

-- --------------------------------------------------------

--
-- Table structure for table `purchases`
--

CREATE TABLE `purchases` (
  `id` bigint UNSIGNED NOT NULL,
  `company_id` bigint UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `products` json NOT NULL,
  `subtotal` decimal(10,2) NOT NULL DEFAULT '0.00',
  `discount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `payable` decimal(10,2) NOT NULL DEFAULT '0.00',
  `payment` decimal(10,2) NOT NULL DEFAULT '0.00',
  `due` decimal(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchases`
--

INSERT INTO `purchases` (`id`, `company_id`, `date`, `products`, `subtotal`, `discount`, `payable`, `payment`, `due`, `created_at`, `updated_at`) VALUES
(2, 2, '2026-08-28', '[{\"id\": 2, \"qty\": 15, \"name\": \"Pariatur Assumenda\", \"price\": 100, \"stock\": 455}]', 1500.00, 0.00, 1500.00, 100.00, 1400.00, '2026-08-28 20:21:51', '2026-08-28 20:21:51'),
(3, 2, '2026-08-28', '[{\"id\": 2, \"qty\": 30, \"name\": \"Pariatur Assumenda\", \"price\": 79, \"stock\": 470}]', 2370.00, 0.00, 2370.00, 370.00, 2000.00, '2026-08-28 21:03:01', '2026-08-29 14:35:35'),
(4, 3, '2026-08-28', '[{\"id\": 2, \"qty\": 1, \"name\": \"Pariatur Assumenda\", \"price\": 79, \"stock\": 500}]', 79.00, 0.00, 79.00, 79.00, 0.00, '2026-08-28 22:33:58', '2026-08-28 22:33:58');

-- --------------------------------------------------------

--
-- Table structure for table `purchase_transactions`
--

CREATE TABLE `purchase_transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `company_id` bigint UNSIGNED NOT NULL,
  `purchases_id` bigint UNSIGNED NOT NULL,
  `bank_id` bigint UNSIGNED DEFAULT NULL,
  `uid` longtext COLLATE utf8mb4_unicode_ci,
  `date` date NOT NULL,
  `purchases_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchase_transactions`
--

INSERT INTO `purchase_transactions` (`id`, `company_id`, `purchases_id`, `bank_id`, `uid`, `date`, `purchases_amount`, `amount`, `created_at`, `updated_at`) VALUES
(1, 2, 3, 4, 'TRX001', '2026-08-28', 2370.00, 100.00, '2026-08-28 21:03:01', '2026-08-28 21:03:01'),
(2, 3, 4, 4, 'TRX002', '2026-08-28', 79.00, 79.00, '2026-08-28 22:33:58', '2026-08-28 22:33:58'),
(4, 2, 3, 4, 'TRX004', '2026-08-29', 0.00, 270.00, '2026-08-29 14:35:35', '2026-08-29 14:35:35');

-- --------------------------------------------------------

--
-- Table structure for table `sales`
--

CREATE TABLE `sales` (
  `id` bigint UNSIGNED NOT NULL,
  `customer_id` bigint UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `products` json NOT NULL,
  `subtotal` decimal(10,2) NOT NULL DEFAULT '0.00',
  `payable` decimal(10,2) NOT NULL DEFAULT '0.00',
  `payment` decimal(10,2) NOT NULL DEFAULT '0.00',
  `due` decimal(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sales`
--

INSERT INTO `sales` (`id`, `customer_id`, `date`, `products`, `subtotal`, `payable`, `payment`, `due`, `created_at`, `updated_at`) VALUES
(5, 2, '2026-08-30', '[{\"id\": 2, \"qty\": 13, \"name\": \"Pariatur Assumenda\", \"price\": 79, \"stock\": 499}]', 1027.00, 1027.00, 527.00, 500.00, '2026-08-29 19:25:01', '2026-08-29 19:29:47'),
(6, 2, '2026-08-29', '[{\"id\": 2, \"qty\": 8, \"name\": \"Pariatur Assumenda\", \"price\": 79, \"stock\": 486}]', 632.00, 632.00, 600.00, 32.00, '2026-08-29 19:34:12', '2026-08-29 19:34:12'),
(7, 2, '2026-07-01', '[{\"id\": 1, \"qty\": 3, \"name\": \"First product\", \"price\": 100, \"stock\": 899}]', 300.00, 300.00, 100.00, 200.00, '2026-08-29 19:46:06', '2026-08-29 19:46:06');

-- --------------------------------------------------------

--
-- Table structure for table `sales_transactions`
--

CREATE TABLE `sales_transactions` (
  `id` bigint UNSIGNED NOT NULL,
  `customer_id` bigint UNSIGNED NOT NULL,
  `sales_id` bigint UNSIGNED NOT NULL,
  `bank_id` bigint UNSIGNED DEFAULT NULL,
  `uid` longtext COLLATE utf8mb4_unicode_ci,
  `date` date NOT NULL,
  `sales_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sales_transactions`
--

INSERT INTO `sales_transactions` (`id`, `customer_id`, `sales_id`, `bank_id`, `uid`, `date`, `sales_amount`, `amount`, `created_at`, `updated_at`) VALUES
(6, 2, 5, 4, 'TRX006', '2026-08-30', 1027.00, 27.00, '2026-08-29 19:25:01', '2026-08-29 19:25:01'),
(7, 2, 5, 4, 'TRX007', '2026-08-30', 0.00, 500.00, '2026-08-29 19:29:47', '2026-08-29 19:29:47'),
(8, 2, 6, 4, 'TRX008', '2026-08-29', 632.00, 600.00, '2026-08-29 19:34:12', '2026-08-29 19:34:12'),
(9, 2, 7, 4, 'TRX009', '2026-07-01', 300.00, 100.00, '2026-08-29 19:46:06', '2026-08-29 19:46:06');

-- --------------------------------------------------------

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('auUk13hbo6dugtQxiuUK4PyRBP46Gej7OgGaqCHy', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', 'eyJfdG9rZW4iOiJJSzU1RDRpejhyUW5zazhxUlh3ejVyMnd6dGoySTlnTldLN2I3VWJaIiwiX2ZsYXNoIjp7Im9sZCI6W10sIm5ldyI6W119LCJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI6MSwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cL2luc2FuLnRlc3RcL2hvbWUiLCJyb3V0ZSI6ImhvbWUifX0=', 1788034621);

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin@dev.com', '2026-08-27 08:58:09', '$2y$12$HqGDXDH3I8mOwgei3etaHuQSldIQbA2qkXHNOkZJA.GP6gBiEt8uq', 'TyRIegnogu4yDW5e9d2hLny2aoJAaJHbVrdeHyAcu0ngGTZzQEY61VYX3A69', '2026-08-27 08:58:09', '2026-08-29 15:18:22'),
(3, 'Test', 'zeterikaw@mailinator.com', NULL, '$2y$12$34smR6mLpyn2ALRe3A6wo.qYFbw3dESBZBiAVtzsjkTMYMKwHOsm.', NULL, '2026-08-29 15:38:32', '2026-08-29 15:39:24');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `banks`
--
ALTER TABLE `banks`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bank_transactions`
--
ALTER TABLE `bank_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bank_transactions_bank_id_foreign` (`bank_id`);

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_expiration_index` (`expiration`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_locks_expiration_index` (`expiration`);

--
-- Indexes for table `companies`
--
ALTER TABLE `companies`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`),
  ADD KEY `failed_jobs_connection_queue_failed_at_index` (`connection`,`queue`,`failed_at`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indexes for table `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `purchases`
--
ALTER TABLE `purchases`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchases_company_id_foreign` (`company_id`);

--
-- Indexes for table `purchase_transactions`
--
ALTER TABLE `purchase_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_transactions_company_id_foreign` (`company_id`),
  ADD KEY `purchase_transactions_purchases_id_foreign` (`purchases_id`);

--
-- Indexes for table `sales`
--
ALTER TABLE `sales`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sales_customer_id_foreign` (`customer_id`);

--
-- Indexes for table `sales_transactions`
--
ALTER TABLE `sales_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sales_transactions_customer_id_foreign` (`customer_id`),
  ADD KEY `sales_transactions_sales_id_foreign` (`sales_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `banks`
--
ALTER TABLE `banks`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `bank_transactions`
--
ALTER TABLE `bank_transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `companies`
--
ALTER TABLE `companies`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `purchases`
--
ALTER TABLE `purchases`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `purchase_transactions`
--
ALTER TABLE `purchase_transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `sales`
--
ALTER TABLE `sales`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `sales_transactions`
--
ALTER TABLE `sales_transactions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `bank_transactions`
--
ALTER TABLE `bank_transactions`
  ADD CONSTRAINT `bank_transactions_bank_id_foreign` FOREIGN KEY (`bank_id`) REFERENCES `banks` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `purchases`
--
ALTER TABLE `purchases`
  ADD CONSTRAINT `purchases_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `purchase_transactions`
--
ALTER TABLE `purchase_transactions`
  ADD CONSTRAINT `purchase_transactions_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `purchase_transactions_purchases_id_foreign` FOREIGN KEY (`purchases_id`) REFERENCES `purchases` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sales`
--
ALTER TABLE `sales`
  ADD CONSTRAINT `sales_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sales_transactions`
--
ALTER TABLE `sales_transactions`
  ADD CONSTRAINT `sales_transactions_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sales_transactions_sales_id_foreign` FOREIGN KEY (`sales_id`) REFERENCES `sales` (`id`) ON DELETE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
