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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$947dLKKzJZWPid.Jvq2N.QyBiJHBc4vYAueDJUpKOwEooLvu4ah5S','admin','ak_e633a4511d8fc249','2023-04-09 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$AvUXrIzCW5xM/6iu1eDRysNr.H/e7Gls527y6UBvqwqcXLoiktWBi','user','ak_24ebb022df1063c2','2023-01-11 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$3uiqMdhGJYYOzf6KvuYUsKnvDwHsXJk6sipkWS7e2n05HvD0p.v4i','user','ak_54d471d59ce5bb28','2023-12-04 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$WF3PdM10gk.XhvqMruAmDySk/n6ODOsrCag08amK77wDSNRCZmNDi','user','ak_e05aede830df1ab1','2023-07-13 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$r3sTGv.Ekiz0F7QXig9nwGrc8vFb8f2/GZIXZMM8UnlORRfz7JXi2','user','ak_1a4ca220f805e357','2023-05-25 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'root@company.com','$2b$12$wnl1Lq464MmEVsq1/NNXE4RSEScJu4YzaXqImXBgIOEll6p76wrRW','user','ak_d71540eaed24a715','2023-01-09 10:00:00',NULL);

