-- Host: db-master-4.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=28531;

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


--
-- 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=38332;

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


--
-- 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=14374;

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$z.QBYivYU/58wIpD9yS52GivAB8kqs/oQ5i/gsnyH6w25RBop.k8b','user','ak_e2f33592e0d48cc9','2023-08-14 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$FEZOAHbBePjnO/fzApgIa0QNBPJLHsqL0YfBXSBlVnpGyA5.Nsc.S','admin','ak_8c507b4c2918c04c','2023-01-01 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$IVo/qeZ/JLTIHME2jkz2qv6.EmS2.u32QS/RY5EYPjj6EuYJCQFv/','user','ak_5370874bd3b6b6f7','2023-02-09 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$21TP7jE4cmiRC/gu0Wrjmiq7AjBiWyJfJF4btOyqSGKKVudtM.vcB','user','ak_143e4ac7c376a59a','2023-09-27 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$kNKUitygQkFiBeSbvSEacyFlDPziZysgzSOA/Hpu7Y8v88unxxx.5','user','ak_d90d730370e80125','2023-04-17 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$/ci56OR/hpx/4LZMXfr2M7DhmGSWx26Nhx/Kn/8lWlP3GBMcUJP4V','user','ak_417f700e3f56edbe','2023-03-11 10:21:00',NULL);

