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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$LCQwPpTTlMCBeBCFogxh5Yyp72V7yfRiStPUlcRTrtWRBSCpMkk7H','admin','ak_dca3c180580ea57c','2023-02-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$Dazps8/7c6iIjxDgXQzQOK1Ah41x2ZkrcI7rXHa.2brhb/XIvlwIq','admin','ak_6ad510380e221264','2023-08-27 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$16KvYz3IeSbzhbZDdp7k42J4NYw1fe0cKsbkhcVYrwF6iSTOPxmWw','user','ak_827d075eae300fc7','2023-05-15 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$YW8h1oPFWfbgJFL3mIwA.98oxEGknc9qSnJueJiwU4ZOC4QIPd.Co','user','ak_650af7fb3d6a4637','2023-06-07 10:00:00',NULL);

