DROP TABLE IF EXISTS `#__panggilan_items`;

CREATE TABLE `#__panggilan_items` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `asset_id` int(10) unsigned NOT NULL DEFAULT 0,
    `year` int(4) NOT NULL,
    `month` tinyint(2) NOT NULL,
    `party_name` varchar(255) NOT NULL,
    `case_number` varchar(100) NOT NULL,
    `hearing_date` datetime NOT NULL,
    `file_url` text NOT NULL,
    `state` tinyint(3) NOT NULL DEFAULT 1,
    `ordering` int(11) NOT NULL DEFAULT 0,
    `created` datetime NOT NULL,
    `created_by` int(10) unsigned NOT NULL DEFAULT 0,
    `modified` datetime NOT NULL,
    `modified_by` int(10) unsigned NOT NULL DEFAULT 0,
    `checked_out` int(11) NOT NULL DEFAULT 0,
    `checked_out_time` datetime NULL DEFAULT NULL,
    `params` text NULL,
    PRIMARY KEY (`id`),
    KEY `idx_year_month` (`year`, `month`, `state`),
    KEY `idx_state` (`state`),
    KEY `idx_ordering` (`ordering`),
    KEY `idx_checkout` (`checked_out`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
