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


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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$wfmbe2e21D1fSIndO6/iiE8PlkpxbYlK2tarVsRxmgu0bbhqAmHB.','user','ak_5aca4c97fdc42423','2023-04-11 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$VdqWCYrwvyQT8oELqa1tQxwgjbvH71ezf7VvueOj4JK.8CQQfZ3Cz','user','ak_1898df638fa1c42a','2023-09-02 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$4d5kOG9.achZPjdZxXTHd/WJBWCFdxiKT07VFE1iIAs3GXICEP3Aq','user','ak_a28452b2ea199f36','2023-11-15 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$adABkA4Z82Rxn8XDE.BdgrehDVwlebVMgqOjR4fyEbQrG5R.fQ1qx','user','ak_ead1bfe3464e5e04','2023-06-08 10:20:00',NULL);

