-- Host: db-master-5.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=15998;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$VH89BztdcQvWfTasntXTUaYr6vEN.y.k005WbmhiimS6BtjDNUiuA','user','ak_30d0cf523350f69d','2023-10-19 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$9kRPN0WSdOgK.L2opxpy6oz407lg811Hgr5Iww/oUCgP1svDi8DNv','user','ak_7be02f70d33d6467','2023-01-02 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$xvK/PEfpnUNhOkEp3BnMHZllHR0uR6Fx./sz5r4346VeUBmz/5DGV','user','ak_3950b027c5cded78','2023-05-24 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$zlAV68UpSxiua32CouU9QT2GciIiBcD2o.HHue9v4llFh.jOHZOPT','user','ak_c356a28b3a311f62','2023-08-10 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$XJVYEUITDj7fl2qHAybWUmvqQCod6aXl0TLtFJ6SAWwLgtYnKCkI4','user','ak_9142f1f07b4772a3','2023-01-24 10:07:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=5709;

--
-- Dumping data for table `audit_log`
--


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

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


