-- Host: db-master-8.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=2857;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$BiINXi.DeWlq5UyRl6iQQHpdNBq1lxPqWKfDeiSIjBF7wK3Gcz/.8','user','ak_9782451ca02185e5','2023-07-11 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$FB8sDLb2vKn/qChYJHMPIkipe1P9nZLuBnLh.ppuGyMt8tyzR5tbl','admin','ak_d1aacbeea8810dfe','2023-09-19 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$1lxoS0jqGjMJzAn/gshkCSwclJjKPDWGmrmtdMTMgh9geDe.88pff','user','ak_2695226cb546d829','2023-01-26 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$2fXpqE8L1VkaK9sWc8hTFSooXTsJgxgzh7f8ZIVYs5Hu1iVpsBE0D','user','ak_df99aef285a821b4','2023-07-18 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$uow4rC/BH96rxNCGxNISeR0hJv84DILmMtttNhL098l3IHu3ffEb3','user','ak_e18486023729171f','2023-06-06 10:18:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=17027;

--
-- Dumping data for table `audit_log`
--


