/*
 Navicat Premium Data Transfer

 Source Server         : dbtest
 Source Server Type    : MySQL
 Source Server Version : 50733 (5.7.33)
 Source Host           : 127.0.0.1:3306
 Source Schema         : dbsimrs

 Target Server Type    : MySQL
 Target Server Version : 50733 (5.7.33)
 File Encoding         : 65001

 Date: 27/04/2025 20:47:27
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for failed_jobs
-- ----------------------------
DROP TABLE IF EXISTS `failed_jobs`;
CREATE TABLE `failed_jobs`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `failed_jobs_uuid_unique`(`uuid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of failed_jobs
-- ----------------------------

-- ----------------------------
-- Table structure for migrations
-- ----------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES (1, '2014_10_12_000000_create_users_table', 1);
INSERT INTO `migrations` VALUES (2, '2014_10_12_100000_create_password_resets_table', 1);
INSERT INTO `migrations` VALUES (3, '2019_08_19_000000_create_failed_jobs_table', 1);
INSERT INTO `migrations` VALUES (4, '2019_12_14_000001_create_personal_access_tokens_table', 1);
INSERT INTO `migrations` VALUES (5, '2025_04_25_073943_create_ms__pasiens_table', 1);
INSERT INTO `migrations` VALUES (6, '2025_04_25_074018_create_ms__asuransis_table', 1);
INSERT INTO `migrations` VALUES (7, '2025_04_25_074027_create_ms__pegawais_table', 1);
INSERT INTO `migrations` VALUES (8, '2025_04_25_074036_create_ms__ruang_pelayanans_table', 1);
INSERT INTO `migrations` VALUES (9, '2025_04_25_092313_create_ms__jenis_pegawais_table', 1);
INSERT INTO `migrations` VALUES (10, '2025_04_25_100724_create_ms__departemens_table', 1);
INSERT INTO `migrations` VALUES (11, '2025_04_25_105052_create_ms__kelas_table', 1);
INSERT INTO `migrations` VALUES (12, '2025_04_25_105150_create_ms__kamars_table', 1);
INSERT INTO `migrations` VALUES (13, '2025_04_25_115924_create_tr_registrasis_table', 1);
INSERT INTO `migrations` VALUES (14, '2025_04_25_140107_create_ms__tindakans_table', 1);
INSERT INTO `migrations` VALUES (15, '2025_04_25_145301_create_tr__transaksis_table', 1);
INSERT INTO `migrations` VALUES (16, '2025_04_27_080445_create_ms__tempat_tidurs_table', 2);
INSERT INTO `migrations` VALUES (17, '2025_04_27_085306_add_fields_to_ms_kamars_ms_tempat_tidurs_tr_registrasis', 3);
INSERT INTO `migrations` VALUES (18, '2025_04_27_094406_add_jenis_rawat_to_tr_registrasis', 4);
INSERT INTO `migrations` VALUES (19, '2025_04_27_121639_add_total_to_tr_transaksis_table', 5);

-- ----------------------------
-- Table structure for ms__asuransis
-- ----------------------------
DROP TABLE IF EXISTS `ms__asuransis`;
CREATE TABLE `ms__asuransis`  (
  `IdAsuransi` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `NamaAsuransi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`IdAsuransi`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__asuransis
-- ----------------------------
INSERT INTO `ms__asuransis` VALUES (1, 'BPJS Kesehatan', 1, '2025-04-26 18:44:42', '2025-04-27 06:35:50');
INSERT INTO `ms__asuransis` VALUES (2, 'Asuransi Swasta ABC', 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__asuransis` VALUES (3, 'Umum / Pribadi', 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__asuransis` VALUES (4, 'Jasa Rahaja', 0, '2025-04-27 06:36:11', '2025-04-27 06:38:57');

-- ----------------------------
-- Table structure for ms__departemens
-- ----------------------------
DROP TABLE IF EXISTS `ms__departemens`;
CREATE TABLE `ms__departemens`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama_departemen` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__departemens
-- ----------------------------
INSERT INTO `ms__departemens` VALUES (1, 'Rajal', 1, NULL, NULL);
INSERT INTO `ms__departemens` VALUES (2, 'Ranap', 1, NULL, NULL);
INSERT INTO `ms__departemens` VALUES (3, 'IGD', 1, NULL, '2025-04-27 06:43:08');

-- ----------------------------
-- Table structure for ms__jenis_pegawais
-- ----------------------------
DROP TABLE IF EXISTS `ms__jenis_pegawais`;
CREATE TABLE `ms__jenis_pegawais`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama_jenis` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__jenis_pegawais
-- ----------------------------
INSERT INTO `ms__jenis_pegawais` VALUES (1, 'Admin', 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__jenis_pegawais` VALUES (2, 'Dokter', 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__jenis_pegawais` VALUES (3, 'Farmasi', 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__jenis_pegawais` VALUES (4, 'Kasir Indomaret', 0, '2025-04-26 18:44:42', '2025-04-27 07:09:48');

-- ----------------------------
-- Table structure for ms__kamars
-- ----------------------------
DROP TABLE IF EXISTS `ms__kamars`;
CREATE TABLE `ms__kamars`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama_kamar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kode_kamar` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `ruangan_id` bigint(20) UNSIGNED NOT NULL,
  `kelas_id` bigint(20) UNSIGNED NOT NULL,
  `jumlah_tempat_tidur` int(11) NULL DEFAULT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__kamars
-- ----------------------------
INSERT INTO `ms__kamars` VALUES (1, 'Kemuning', NULL, 9, 2, 10, 0, '2025-04-27 07:28:13', '2025-04-27 09:25:55');
INSERT INTO `ms__kamars` VALUES (2, 'Aster 2', NULL, 8, 3, 10, 0, '2025-04-27 07:43:38', '2025-04-27 09:25:31');
INSERT INTO `ms__kamars` VALUES (3, 'Aster 2', NULL, 8, 3, NULL, 0, '2025-04-27 07:58:04', '2025-04-27 07:58:09');
INSERT INTO `ms__kamars` VALUES (4, 'Aster 2', 'KMR-04', 8, 3, 10, 1, '2025-04-27 09:26:09', '2025-04-27 09:26:09');

-- ----------------------------
-- Table structure for ms__kelas
-- ----------------------------
DROP TABLE IF EXISTS `ms__kelas`;
CREATE TABLE `ms__kelas`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama_kelas` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__kelas
-- ----------------------------
INSERT INTO `ms__kelas` VALUES (1, 'VIP', 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__kelas` VALUES (2, 'Kelas 1', 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__kelas` VALUES (3, 'Kelas 2', 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__kelas` VALUES (4, 'Kelas 3', 1, '2025-04-26 18:44:42', '2025-04-27 08:01:42');
INSERT INTO `ms__kelas` VALUES (5, 'ISO', 0, '2025-04-27 08:01:51', '2025-04-27 08:01:54');

-- ----------------------------
-- Table structure for ms__pasiens
-- ----------------------------
DROP TABLE IF EXISTS `ms__pasiens`;
CREATE TABLE `ms__pasiens`  (
  `MRPasien` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `NoRM` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `NamaPasien` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `TanggalLahir` date NOT NULL,
  `JenisKelamin` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `Alamat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `NoHP` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`MRPasien`) USING BTREE,
  UNIQUE INDEX `ms__pasiens_norm_unique`(`NoRM`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__pasiens
-- ----------------------------
INSERT INTO `ms__pasiens` VALUES ('RSABHK1', '00001', 'Test', '2002-03-21', 'Perempuan', 'Jakarta', '12', 1, '2025-04-27 08:42:00', '2025-04-27 08:42:00');

-- ----------------------------
-- Table structure for ms__pegawais
-- ----------------------------
DROP TABLE IF EXISTS `ms__pegawais`;
CREATE TABLE `ms__pegawais`  (
  `IdPegawai` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `NamaPegawai` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `id_jenis_pegawai` bigint(20) UNSIGNED NOT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`IdPegawai`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__pegawais
-- ----------------------------
INSERT INTO `ms__pegawais` VALUES (1, 'Test', 2, 1, '2025-04-27 08:19:11', '2025-04-27 08:19:11');

-- ----------------------------
-- Table structure for ms__ruang_pelayanans
-- ----------------------------
DROP TABLE IF EXISTS `ms__ruang_pelayanans`;
CREATE TABLE `ms__ruang_pelayanans`  (
  `IdRuangPelayanan` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `NamaRuangPelayanan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `departemen_id` bigint(20) UNSIGNED NOT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`IdRuangPelayanan`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__ruang_pelayanans
-- ----------------------------
INSERT INTO `ms__ruang_pelayanans` VALUES (1, 'Poli Anak', 1, 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__ruang_pelayanans` VALUES (2, 'Poli Umum', 1, 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__ruang_pelayanans` VALUES (3, 'Poli Gigi', 1, 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__ruang_pelayanans` VALUES (4, 'Kamar Inap A', 2, 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__ruang_pelayanans` VALUES (5, 'Kamar Inap B', 2, 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__ruang_pelayanans` VALUES (6, 'Kamar Inap VIP', 2, 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__ruang_pelayanans` VALUES (7, 'Instalasi Gawat Darurat (IGD)', 3, 1, '2025-04-26 18:44:42', '2025-04-26 18:44:42');
INSERT INTO `ms__ruang_pelayanans` VALUES (8, 'Aster', 2, 1, '2025-04-27 07:13:00', '2025-04-27 07:13:00');
INSERT INTO `ms__ruang_pelayanans` VALUES (9, 'Kemuning', 2, 1, '2025-04-27 07:50:51', '2025-04-27 07:50:51');
INSERT INTO `ms__ruang_pelayanans` VALUES (10, 'Instalasi Gawat Darurat', 3, 1, '2025-04-27 10:28:44', '2025-04-27 10:28:44');

-- ----------------------------
-- Table structure for ms__tempat_tidurs
-- ----------------------------
DROP TABLE IF EXISTS `ms__tempat_tidurs`;
CREATE TABLE `ms__tempat_tidurs`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama_tempat_tidur` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kode_tempat_tidur` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `status` enum('kosong','isi') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'kosong',
  `aktif` tinyint(1) NOT NULL DEFAULT 1,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `kamar_id` bigint(20) UNSIGNED NOT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ms__tempat_tidurs_kamar_id_foreign`(`kamar_id`) USING BTREE,
  CONSTRAINT `ms__tempat_tidurs_kamar_id_foreign` FOREIGN KEY (`kamar_id`) REFERENCES `ms__kamars` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__tempat_tidurs
-- ----------------------------
INSERT INTO `ms__tempat_tidurs` VALUES (1, '1', NULL, 'kosong', 1, NULL, 2, 0, '2025-04-27 08:07:23', '2025-04-27 09:35:45');
INSERT INTO `ms__tempat_tidurs` VALUES (2, 'Aster 2', 'TT-680DFA83A5463', 'kosong', 1, NULL, 4, 1, '2025-04-27 09:36:03', '2025-04-27 09:36:03');
INSERT INTO `ms__tempat_tidurs` VALUES (3, 'Aster 3', 'TT-003', 'kosong', 1, NULL, 4, 1, '2025-04-27 09:37:27', '2025-04-27 09:37:27');

-- ----------------------------
-- Table structure for ms__tindakans
-- ----------------------------
DROP TABLE IF EXISTS `ms__tindakans`;
CREATE TABLE `ms__tindakans`  (
  `IdTindakan` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `NamaTindakan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `TarifTindakan` decimal(12, 2) NOT NULL DEFAULT 0.00,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`IdTindakan`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ms__tindakans
-- ----------------------------
INSERT INTO `ms__tindakans` VALUES (1, 'Copot gigi', 2222222.00, 1, '2025-04-27 06:57:06', '2025-04-27 07:05:05');
INSERT INTO `ms__tindakans` VALUES (2, 're', 123.00, 0, '2025-04-27 07:01:36', '2025-04-27 07:04:56');

-- ----------------------------
-- Table structure for password_resets
-- ----------------------------
DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE `password_resets`  (
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  INDEX `password_resets_email_index`(`email`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of password_resets
-- ----------------------------

-- ----------------------------
-- Table structure for personal_access_tokens
-- ----------------------------
DROP TABLE IF EXISTS `personal_access_tokens`;
CREATE TABLE `personal_access_tokens`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `personal_access_tokens_token_unique`(`token`) USING BTREE,
  INDEX `personal_access_tokens_tokenable_type_tokenable_id_index`(`tokenable_type`, `tokenable_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of personal_access_tokens
-- ----------------------------

-- ----------------------------
-- Table structure for tr__transaksis
-- ----------------------------
DROP TABLE IF EXISTS `tr__transaksis`;
CREATE TABLE `tr__transaksis`  (
  `IdTransaksi` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `IdRegistrasi` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `IdTindakan` bigint(20) UNSIGNED NOT NULL,
  `JmlTindakan` int(10) UNSIGNED NOT NULL,
  `Total` decimal(15, 2) NULL DEFAULT NULL,
  `IdPegawai` bigint(20) UNSIGNED NOT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`IdTransaksi`) USING BTREE,
  INDEX `tr__transaksis_idregistrasi_foreign`(`IdRegistrasi`) USING BTREE,
  INDEX `tr__transaksis_idtindakan_foreign`(`IdTindakan`) USING BTREE,
  INDEX `tr__transaksis_idpegawai_foreign`(`IdPegawai`) USING BTREE,
  CONSTRAINT `tr__transaksis_idpegawai_foreign` FOREIGN KEY (`IdPegawai`) REFERENCES `ms__pegawais` (`IdPegawai`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tr__transaksis_idregistrasi_foreign` FOREIGN KEY (`IdRegistrasi`) REFERENCES `tr_registrasis` (`IdRegistrasi`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tr__transaksis_idtindakan_foreign` FOREIGN KEY (`IdTindakan`) REFERENCES `ms__tindakans` (`IdTindakan`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tr__transaksis
-- ----------------------------
INSERT INTO `tr__transaksis` VALUES (1, 'b6d12e5c-19a2-41b6-b4e0-7c9ad2b9cd9a', 1, 2, 40000.00, 1, 1, '2025-04-27 11:18:48', '2025-04-27 12:12:08');
INSERT INTO `tr__transaksis` VALUES (2, 'b6d12e5c-19a2-41b6-b4e0-7c9ad2b9cd9a', 1, 3, 0.00, 1, 1, '2025-04-27 12:31:43', '2025-04-27 12:31:43');

-- ----------------------------
-- Table structure for tr_registrasis
-- ----------------------------
DROP TABLE IF EXISTS `tr_registrasis`;
CREATE TABLE `tr_registrasis`  (
  `IdRegistrasi` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `NoRegistrasi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `TanggalRegistrasi` date NOT NULL,
  `MRPasien` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `NomorKartuAsuransi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `IdAsuransi` bigint(20) UNSIGNED NOT NULL,
  `IdPegawai` bigint(20) UNSIGNED NOT NULL,
  `IdRuangPelayanan` bigint(20) UNSIGNED NOT NULL,
  `IdKamar` bigint(20) UNSIGNED NULL DEFAULT NULL,
  `IdTempatTidur` bigint(20) UNSIGNED NULL DEFAULT NULL,
  `statusenabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `JenisRawat` enum('rawat_jalan','rawat_inap') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'rawat_jalan',
  PRIMARY KEY (`IdRegistrasi`) USING BTREE,
  UNIQUE INDEX `tr_registrasis_noregistrasi_unique`(`NoRegistrasi`) USING BTREE,
  INDEX `tr_registrasis_mrpasien_foreign`(`MRPasien`) USING BTREE,
  INDEX `tr_registrasis_idasuransi_foreign`(`IdAsuransi`) USING BTREE,
  INDEX `tr_registrasis_idpegawai_foreign`(`IdPegawai`) USING BTREE,
  INDEX `tr_registrasis_idruangpelayanan_foreign`(`IdRuangPelayanan`) USING BTREE,
  INDEX `tr_registrasis_idkamar_foreign`(`IdKamar`) USING BTREE,
  INDEX `tr_registrasis_idtempattidur_foreign`(`IdTempatTidur`) USING BTREE,
  CONSTRAINT `tr_registrasis_idasuransi_foreign` FOREIGN KEY (`IdAsuransi`) REFERENCES `ms__asuransis` (`IdAsuransi`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tr_registrasis_idkamar_foreign` FOREIGN KEY (`IdKamar`) REFERENCES `ms__kamars` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tr_registrasis_idpegawai_foreign` FOREIGN KEY (`IdPegawai`) REFERENCES `ms__pegawais` (`IdPegawai`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tr_registrasis_idruangpelayanan_foreign` FOREIGN KEY (`IdRuangPelayanan`) REFERENCES `ms__ruang_pelayanans` (`IdRuangPelayanan`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tr_registrasis_idtempattidur_foreign` FOREIGN KEY (`IdTempatTidur`) REFERENCES `ms__tempat_tidurs` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tr_registrasis_mrpasien_foreign` FOREIGN KEY (`MRPasien`) REFERENCES `ms__pasiens` (`MRPasien`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tr_registrasis
-- ----------------------------
INSERT INTO `tr_registrasis` VALUES ('b6d12e5c-19a2-41b6-b4e0-7c9ad2b9cd9a', '27042025001', '2025-04-27', 'RSABHK1', NULL, 1, 1, 1, NULL, NULL, 1, '2025-04-27 10:44:55', '2025-04-27 10:44:55', 'rawat_jalan');

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `id_pegawai` bigint(20) UNSIGNED NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `users_email_unique`(`email`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of users
-- ----------------------------

SET FOREIGN_KEY_CHECKS = 1;
