-- Host: db-master-8.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=30501;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$023d6y5LeGqJWB/MlYCbiYqPN4BUFk1f2TmspvvMxxfaQMR73FLSn','user','ak_441eac4d774b9ebd','2023-05-06 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$ErTrEd0URbn2H9ptcBckm6JMiiXowA.SXn0cw23tEil5zRC7NLNr0','user','ak_400266262ff5c95f','2023-10-27 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$MkdoIQl61t2NDHXOuuUBOqQmHUPffIjkY.CHmYSNDefqsDBksrFUT','user','ak_18f04baa1f162634','2023-02-10 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$UwrL9H054JlRnw3pCy4AV8TGVo5oqO3To6ibcTpjLIRAVXtkhRyIO','user','ak_7ddc67c166f2fbfe','2023-08-25 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$ffJZbU2Q7UqNXXu9ljg3KV671GJfFuf8j/LBSpCI0wyOdQHFq0chG','user','ak_36be1163419c5814','2023-08-06 10:20:00',NULL);

