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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=30164;

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$hhmsrQoPOHRu4eUbYiMoZ3FhgjROjY8lIZj2ask2l8ffMUrhryaxa','admin','ak_cb1773be2c2cb4c2','2023-11-14 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$3ITlt/GEj//bG0CXZEk0DmnBYevif6ryy0hnQNgzGlUKs8QzN9ZwJ','user','ak_ac05b77659370234','2023-08-10 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$u36miIvkSBte2or2wzIhhJmzdzhqVe5RPUNUKVeZwdplcK4YWEwai','admin','ak_bf3cc569d8a1c24e','2023-03-24 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$AsQnStf3SOFfaEHhyhJb65S6CcHyZKljmJSHlOXGKuP/Pq8i8NH49','user','ak_7a15439bb5a3a483','2023-07-10 10:15:00',NULL);

