-- Host: db-master-0.internal    Database: ecommerce


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

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=12459;

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


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

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=38404;

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$z0Z1sRg.ckhL2PgrLbTVeROXATRoXiJPU9Nmz05CwExU42wDdpX/K','user','ak_42bf874b0069436d','2023-09-18 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$wAOM9o3Ddhiv2ha8FL2oyte4SCq3NyJH9XzyPXN.tztjcE6KCPoIX','user','ak_2a69d863ec5fc2e5','2023-04-22 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$7k1HfOHL0QVke5wUYPDyI6m11sQscek2OTwofEqHe3otoDxzxTjyD','admin','ak_b7dc027c31189861','2023-06-22 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$x8fU1BfraGybe0Y4FgMF6KuudNG5xhrJE4JEpU7cVtS98qKwr/kKm','user','ak_17ec3c0d877f451f','2023-11-03 10:06:00',NULL);

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=16014;

--
-- Dumping data for table `payments`
--


