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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$9Hkcd5OB.zKUXgVYq70mY95J4w.ZKdeqtEWqwsS8BuzEgRTCqm8Qe','user','ak_d8c3619bbfa2b412','2023-04-01 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$YH1tfhrBsU/6bLGztcTsp6IDRjtyHqjRW/05KHtTv6.qQVd2rJWs5','user','ak_cb0b92bbf945d5a1','2023-04-02 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$ZTTydHZp.TtpqdcY.Nxd6.dpsy65yR.4td0JzMEK3orGnM.PnJ.wJ','user','ak_543e3b0d769f1215','2023-08-20 10:05:00',NULL);

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

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


