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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$RlHlYRg0r6vKB/h0GI3VbwHKXfMbQqYx4PjiZX/cuAu6WPYMYJ4.z','user','ak_a9b88d097db37577','2023-10-23 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$.aN3M4Vw5XhQKh0eKqA.Z9hscN9tMjFoJVgUrjyTZd3dzq/89L22A','admin','ak_8c333a63544d4832','2023-10-21 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$5RaturIMcq.UWqePQgSlKMaqnO8crEnnSRN7yPo9xFaqluo0b6OUF','user','ak_4778c2a6b110dfde','2023-01-20 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$/DN.pONRtBIfhDllPYLHTqeyoaeChrR/3rGD3hhZjE9QfI1WUGBvU','admin','ak_39446cc57ad6f320','2023-11-28 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$23KdU7FcR4tYiVeMEgCiZHcPBKfWtKe7f0V3iUaj8ZCSbHBjd9l24','admin','ak_d069cdbd960f0aa0','2023-07-01 10:15: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=47302;

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


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

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


