-- Host: db-master-2.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=41051;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$mxm3oe40Jnii4hvnM0vaR8ldNTeCZ5a6TjmFF2/Ki3uY6xSMF1PcT','user','ak_f9fa9c1c39b5893d','2023-02-26 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$PGjY3l4N9V/XrhP62JFN9b0B.MCROS0QBAAYdg7h5j5GAmxT3be0u','admin','ak_db58600826e2c0a1','2023-07-13 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$HjxYTKkWc3x/aDex7Wf0ut.Zk2hxsWFTU2o/OFVBQruXf1SWpq.Yg','admin','ak_413b773cf85dc890','2023-09-22 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$TEw0fiGhz9N4G2ZV4ihtNrlNBAoHGArTcpXdV0No64.pYFozQgGzS','user','ak_0e13a0cd13531d28','2023-09-18 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$SOZKWsKh/WgQHTIAk95fO15UWKOyDG5GLJY2n0lTdCCXaj.fx1qtP','admin','ak_3c6f92121d7369a2','2023-06-25 10:19:00',NULL);

