-- Host: db-master-4.internal    Database: customers


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$LIq8EUPnYogwTeagKQ9hyxuYQXYh6qh/sf3Y8ca02z.MwQMoO76JB','user','ak_a669529cfdc8ffb2','2023-05-26 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$qGLxZcJTM7DISxND/a0bu4Loy9xdlh4oW81E9A27HIN16hPE7J/xM','user','ak_1817117cab654c3f','2023-10-01 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$hsmYr1cwrd36DKY/IhLfG07P5QWInGMgP2bdqLrOv2/ozbGAyF7e8','user','ak_6322f8993b63229b','2023-10-08 10:17: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=45530;

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


