-- Host: db-master-9.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=28751;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$OSDn4zTZM0S344IjqeILRVH7B./1V81TTdxn00pGNSeaqOpQwF2Y9','admin','ak_708e47978d570ab5','2023-07-15 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$zYb4iI/dRQXHt7c1ecwGiojzrlz9KEEBWY9S6Ehi5zlGcIoXjG0KL','admin','ak_e67342342480ae33','2023-05-27 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$c5RifDxHIT9jwzD/xvMtSD3sSgAcBqsXFX6e/r80lwlvncHKmRn2C','user','ak_aa5d9e74bd085ad4','2023-06-22 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$RYe6NG0IQb.hTBHd91bvN7zJrptxc.J2QTnkNl0XcOaB60ipfZyG.','user','ak_a4dc2da1e609402d','2023-07-04 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$W7MhQ7iY7rGpMHJkvIaKPswbkMz2Q2kTeCoq97A4rnJc0QpFXp6j9','admin','ak_cbced17fc7e73bc5','2023-03-04 10:13: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=10167;

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


