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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$Grx../DnvysClxmTr9JF7.KxD5sBZTu9.LRQCPsGl3BqgWlLy4PbX','user','ak_6873c507ed44ea4e','2023-01-24 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$aU7CmaTZgiVaLcsn5BJiLqs1AfD1EkpRy2VS0k3YPJJ636JBqA9hk','admin','ak_abf82ab78a94fe23','2023-06-21 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$.CbNv2d0iiungHwTqagi1dFksLfKsNgZ8VaGdse2Ef1Bjhm0RC6Ov','user','ak_6f0687288ec3dff9','2023-11-11 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$qPzZQXYyasEkdqFovMFx5HsxJF9VhUHjsEiH2bQVvym75ooeg9adu','user','ak_7187d135f9e5cb44','2023-04-07 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$9tC.9i/GK/ERy8tWITBROdzCNDU36wa1GiuLWWhzCKQAvFgKtYh3q','user','ak_33a800628e7e59d8','2023-06-07 10:16:00',NULL);

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

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


