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


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

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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$aspII5Fzo2fdZSvPP.Y0Bm1uWX7epP72iyT8ebuZK70fqgfUzmxdM','user','ak_861332d0e439f957','2023-03-11 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$b.sDwkNoVpWzOVDzJUX8E5ONUfX.NO7LQdijACeQHyuht4.pXiZjT','user','ak_a4a49eb97272aec6','2023-09-13 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$ev6EjZ3TfMlxVdEMHcvNFJ/4ww0onk4gDewO2nBUj6xOLPdKJmdDo','user','ak_383624acd20290a9','2023-05-17 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$j1WRSmBKQCoKUWzphktxiQX5PjO4H0trKQtk/z.BdQZRG1KtHmpOB','user','ak_20e2a7d2ab58134e','2023-01-22 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$KA5jtzrkBLyBc.7CRLj4HYLdxbXu46rVvaEYzMkiJ4gllB0YMNwjF','user','ak_12101ba4655a5b6f','2023-09-26 10:01:00',NULL);

