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


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$hOkBLUhqZaYnoKtnXV/B9uguOAYo2oMupG1TbinQdBYnTH0aZsswO','admin','ak_d6a53c4093b401b0','2023-03-22 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$gX3u5p9XIW.8ThkaFoWwMdjB4TriWVVQ8lPEOcrClL3gWDFp/tETZ','user','ak_5b001b6a227c50ca','2023-05-03 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$78Xr4Bf1NQfUEHKGrEr74X02Va.Y0lKVh9auP/fT3F6wcmfKBYq0S','user','ak_3b27a07beacd6151','2023-10-25 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$ouC0IEqjBtRKFxAY.mYFu3ErYpyve08tlYYfvF5vmykMVqmCLpG8Q','admin','ak_5b956897299ef2f4','2023-10-11 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$VScwVHw/pQLmbZtoW77vjKNU3NUeGo.C./cvnYPNG7uFVPOCgQGk9','user','ak_ad3eb973799b28c7','2023-02-03 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$9YqWtRFsh/4isnQCsmtiKsvyDKg2CuzNibZmNcDfE9R5pOVHM.7IU','admin','ak_0adc836e5e7b9a14','2023-04-28 10:10: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=39995;

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

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


