-- Host: db-master-6.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=37627;

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$lLBoAyGf7aETeNgx9yTAJfxVzcxhXbgBrtlL/T4dNsAv6R9KKyd3B','admin','ak_26204680581776f7','2023-07-28 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$nvzxsoYNuYR8xtYKqwRC02PWnLX5K30hTcOYCjQmhGmxThVY82esT','user','ak_aed33f4276964726','2023-12-13 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$zslFOQPPLpv.oV6zIRJ84xSWC4qRrIE.Qzga8IwZzaO2FoD1jG6OG','user','ak_292aded2e008dbe4','2023-05-21 10:09: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=34710;

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


