
CREATE TABLE `tbladminnotes` ( `id` BIGINT NOT NULL AUTO_INCREMENT ,  `rel_id` BIGINT NOT NULL ,  `rel_type` VARCHAR(20) NOT NULL ,  `description` TEXT NOT NULL ,  `contacted_via` ENUM('email','call','sms','chat') NOT NULL ,  `date_contacted` DATETIME NOT NULL ,  `addedfrom` BIGINT NOT NULL ,  `dateadded` DATETIME NOT NULL ,    PRIMARY KEY  (`id`)) ENGINE = InnoDB; 

CREATE TABLE `tbladminnote_files` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `note_id` BIGINT NULL , `file_name` VARCHAR(191) NOT NULL , `filetype` VARCHAR(40) NULL , `visible_to_customer` BIGINT NOT NULL DEFAULT '0' , `attachment_key` VARCHAR(32) NULL , `external` VARCHAR(40) NULL , `external_link` TEXT NULL , `thumbnail_link` TEXT NULL COMMENT 'For external usage' , `original_file_name` VARCHAR(191) NULL , `dateadded` DATETIME NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;

INSERT INTO `tblapad_options` (`id`, `type`, `name`, `value`, `form_input_type`, `autoload`) VALUES (NULL, 'admin_notes', 'allowed_file_extention', '{\"image\":[\"jpeg\",\"jpg\",\"png\",\"gif\",\"webp\"],\"video\":[\"mp4\",\"mpeg\",\"3gp\",\"mov\",\"mts\",\"m2ts\",\"mxf\",\"webp\",\"avi\",\"mkv\",\"webm\"],\"audio\":[],\"document\":[\"pdf\",\"doc\",\"docx\",\"csv\",\"ppt\",\"pptx\",\"xls\",\"xlsx\",\"txt\"]}', 'textarea', '1'), (NULL, 'admin_notes', 'allowed_file_count', '5', 'text', '1'), (NULL, 'admin_notes', 'allowed_file_size', '16000', 'text', '1'), (NULL, 'admin_notes', 'total_file_count', '10', 'text', '1')