-- Host: db-master-1.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=46824;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$fkkIsg3LobqYo7Ua1GfxoSrOhw4cErMBvraDRMasn45vTf/EsFdFJ','admin','ak_9481b5d851ab2b22','2023-10-05 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$DsDSPylQf6ICmmTmrbosvSQs0O7eOW4tP5DO3AXVEVjmNQAGaeypB','admin','ak_b2806da2bdc65564','2023-02-11 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$T/PlTRZX21NBvDE7itP4.tFoeEDESUIZGxOdfmPy1Q/8inCDbMwJT','admin','ak_3dbf0a466d898ce5','2023-06-06 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$Yy7LWT2e3SRaRE5m6H7FYF3QHe5rYcOgogW9B9dXz0n72BNfd5omU','user','ak_0c4d2028ac523f09','2023-10-28 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$CFjgfD/r.mYJmJWzeETT2iDqnChUBKiXpXTfVXCg7EZS7Tvpw0lho','admin','ak_f7d27b28b08e8d36','2023-07-25 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@corp.net','$2b$12$j5FZhCyYYEveTek9Y/SSarD3wWSEG5Hs6sZnIvjz5tbFXtHEsya7a','user','ak_17b200c0e2fb8d8f','2023-05-06 10:08:00',NULL);

