-- Host: db-master-0.internal    Database: analytics


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=18877;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$szOpew1DNgUf7vmcoQ51/ikGavJfJWYFOwvhXNgq.tgtWZhkRAPTc','user','ak_40fda4114196013c','2023-02-27 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$Ir85CNmiKOem1f49ir8XTVVouDGu6FQQZjQsTySHH1zTVJL3utliD','admin','ak_80b7bf3f0aae55df','2023-04-15 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$dPI1nfOxxRmXwfth7E5SjL7qdp/8AnMMYwoR3BmtkpHUvN6Hd3IPc','user','ak_2869297372f031b3','2023-12-19 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$reXv8x7dZLLLdDFll1h17pRn2XjEuFebDi.vt6S88lXnsQToToani','user','ak_61df59ff64fb02b6','2023-11-02 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$Gvryj.aCJz7KV3Q3Pps6Ou2IbCzZY2wvkcgx6CY7OyZVAO.0MPqOJ','user','ak_464a0426f88997f8','2023-02-20 10:18: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=30308;

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


