π οΈInstallation
Database
CREATE TABLE IF NOT EXISTS `court_applications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_identifier` varchar(50) NOT NULL,
`exam_type` varchar(50) NOT NULL,
`status` enum('pending','approved','denied') DEFAULT 'pending',
`exam_score` int(11) DEFAULT NULL,
`votes` int(11) DEFAULT 0,
`license_number` varchar(50) DEFAULT NULL,
`date_issued` datetime DEFAULT NULL,
`date_expired` datetime DEFAULT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
`notes` text DEFAULT NULL,
`approved_by` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_appointments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_identifier` varchar(50) NOT NULL,
`staff_identifier` varchar(50) DEFAULT NULL,
`staff_name` varchar(50) DEFAULT NULL,
`appointment_type` enum('license','name_change','court_case','consultation','filing','hearing') NOT NULL,
`scheduled_at` datetime NOT NULL,
`status` enum('pending','approved','rejected','completed') DEFAULT 'pending',
`case_ref` varchar(255) DEFAULT NULL,
`reason` text DEFAULT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_attorneys` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_identifier` varchar(50) NOT NULL,
`name` varchar(100) NOT NULL,
`hourly_rate` decimal(10,2) DEFAULT 100.00,
`specialization` varchar(100) DEFAULT NULL,
`status` enum('available','busy') DEFAULT 'busy',
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
UNIQUE KEY `player_identifier` (`player_identifier`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_attorney_appointments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_identifier` varchar(50) NOT NULL,
`attorney_identifier` varchar(50) NOT NULL,
`scheduled_at` datetime NOT NULL,
`status` enum('pending','confirmed','denied','completed') DEFAULT 'pending',
`reason` text DEFAULT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `attorney_identifier` (`attorney_identifier`),
CONSTRAINT `court_attorney_appointments_ibfk_1` FOREIGN KEY (`attorney_identifier`) REFERENCES `court_attorneys` (`player_identifier`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_businesses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`owner_identifier` varchar(60) NOT NULL,
`owner_name` varchar(100) DEFAULT NULL,
`approved` tinyint(1) DEFAULT 0,
`tax_rate` decimal(5,2) DEFAULT 0.00,
`total_tax_collected` decimal(10,2) DEFAULT 0.00,
`last_tax_pay` datetime DEFAULT NULL,
`date_created` timestamp NULL DEFAULT current_timestamp(),
`date_updated` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_cases` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`case_name` varchar(255) NOT NULL,
`judge_identifier` varchar(50) DEFAULT NULL,
`defendant_identifier` varchar(50) DEFAULT NULL,
`defence_identifier` varchar(50) DEFAULT NULL,
`jury_members` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`jury_members`)),
`lawyers` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`lawyers`)),
`evidence` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`evidence`)),
`date_time` datetime NOT NULL,
`settlement_fee` decimal(10,2) DEFAULT NULL,
`status` enum('private','public','closed') DEFAULT 'private',
`verdict` varchar(255) DEFAULT NULL,
`appeal_requested` tinyint(1) DEFAULT 0,
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_case_evidence` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`court_case_id` int(11) NOT NULL,
`uploader_identifier` varchar(50) DEFAULT NULL,
`evidence_type` enum('image','video','document','audio') NOT NULL,
`url` text NOT NULL,
`description` text DEFAULT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `court_case_id` (`court_case_id`),
CONSTRAINT `court_case_evidence_ibfk_1` FOREIGN KEY (`court_case_id`) REFERENCES `court_cases` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_criminal_records` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_identifier` varchar(50) NOT NULL,
`case_id` int(11) DEFAULT NULL,
`reason` text NOT NULL,
`points` int(11) DEFAULT 0,
`date_created` datetime DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `case_id` (`case_id`),
CONSTRAINT `court_criminal_records_ibfk_1` FOREIGN KEY (`case_id`) REFERENCES `court_cases` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_fines` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_identifier` varchar(50) NOT NULL,
`issued_by` varchar(50) DEFAULT NULL,
`amount` decimal(10,2) NOT NULL,
`reason` text NOT NULL,
`paid` tinyint(1) DEFAULT 0,
`date_issued` datetime DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_jail` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_identifier` varchar(60) NOT NULL,
`player_name` varchar(100) DEFAULT NULL,
`jail_time` int(11) NOT NULL,
`jail_reason` varchar(255) DEFAULT NULL,
`jailed_by` varchar(60) DEFAULT NULL,
`jailed_at` datetime DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_taxes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(50) NOT NULL,
`rate` decimal(5,2) NOT NULL,
`description` text DEFAULT NULL,
`date_updated` datetime NOT NULL DEFAULT current_timestamp(),
`updated_by` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_votes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`voter_identifier` varchar(50) NOT NULL,
`candidate_identifier` varchar(50) NOT NULL,
`vote_date` datetime DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_witnesses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`court_case_id` int(11) NOT NULL,
`player_identifier` varchar(50) NOT NULL,
`witness_type` enum('observer','witness') DEFAULT 'observer',
`notes` text DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `court_case_id` (`court_case_id`),
CONSTRAINT `court_witnesses_ibfk_1` FOREIGN KEY (`court_case_id`) REFERENCES `court_cases` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE IF NOT EXISTS `court_organization` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`owner_identifier` varchar(64) DEFAULT NULL,
`balance` decimal(15,2) NOT NULL DEFAULT 0.00,
`employees` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`employees`)),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;Items Installation
Job Installation
Last updated