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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$FCHAjVqcTGBE1e1eyuEIEAeTDmQWVJWGrU8FNiKCdpO.bRFnRBGDR','admin','ak_6f1a49e6913f68b8','2023-05-02 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$BUb7T9T8e0X5UZY5WkwLQEDrG4i3av2uGZjXGLyJ2FBwYwqNkbX7Y','user','ak_f1bd4e268ea91fd5','2023-09-06 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$AqApsA2VQ6OB15CGppKrD0UWREjxRGye.qCuUBVHiJqxvVQFkGFQc','user','ak_f8377c805af5a003','2023-02-24 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$R7xuGRk5F07Ar738v7m4fdwrmI0NJsQFphHz4IWO01ldHIkoaBz9B','user','ak_0d60b1c1efff6862','2023-01-25 10:18:00',NULL);

