-- Host: db-master-1.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=10244;

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$5qVgCZiEw5Y0XSFRq7BMfVIS4VVZF53zvGNF7.0fHHhGE9CzBBgps','user','ak_f92f4e484f919bc4','2023-04-02 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$QG1bWRzjwVSvaOabXC87pA6izly7BUcTFG3hIu/jpdO/4/Ci9PP3K','user','ak_6ee4f6ae20d55b14','2023-08-08 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$iSSy.kyIkBDS0n0rwPeNvAEaSKgg4vXYvw4/i7sKAwG0wTXmakPbu','user','ak_cbbe02b861cc8215','2023-03-10 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$5sgpKfwUn8zttiP9W9KP6gJigMTxiLcFmYie6sZx/4XsaxYEw9qSB','user','ak_6d3fccc33ae8925c','2023-08-20 10:19: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=5360;

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

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


