INSERT INTO `tblapad_options`
  VALUES (NULL, 'payment_image_files', 'allowed_file_extention', '{"image": ["jpeg","jpg","png","gif","webp"]}', 1),
  (NULL, 'payment_image_files', 'allowed_file_size', '16000', 1),
  (NULL, 'payment_image_files', 'allowed_file_count', '5', 1);
  
CREATE TABLE `tblpayment_image_files` (
  `tenant_id`           BIGINT UNSIGNED NULL DEFAULT NULL,
  `id`                  BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
  `invoice_id`          BIGINT UNSIGNED NULL DEFAULT NULL,
  `payment_id`          BIGINT UNSIGNED NULL DEFAULT NULL,
  `file_name`           VARCHAR(191),
  `filetype`            VARCHAR(40),
  `original_file_name`  VARCHAR(191) NULL DEFAULT NULL,
  `dateadded`           DATETIME DEFAULT NOW(),
  FOREIGN KEY (`tenant_id`) REFERENCES `tbltenants` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,
  FOREIGN KEY (`invoice_id`) REFERENCES `tblinvoices` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,
  FOREIGN KEY (`payment_id`) REFERENCES `tblinvoicepaymentrecords` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
);