CREATE TABLE `psi_repayments_payments` (
  `pay_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `pay_year` int(10) unsigned DEFAULT '2015',
  `pay_month` int(10) unsigned DEFAULT '1',
  `pay_count` int(10) unsigned DEFAULT '1',
  `pay_level` int(10) unsigned DEFAULT '1',
  `pay_amount_due` decimal(65,3) DEFAULT '0.000',
  `pay_amount_paid` decimal(65,3) unsigned DEFAULT '0.000',
  `pay_amount_date_paid` date DEFAULT NULL,
  `pay_check_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `pay_check_date` date DEFAULT NULL,
  `pay_receipt_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `pay_type_id` bigint(20) unsigned DEFAULT '0',
  `pay_otb` tinyint(1) unsigned DEFAULT '0',
  `pay_penalty_amount_due` decimal(65,3) unsigned DEFAULT '0.000',
  `pay_penalty_amount_paid` decimal(65,3) unsigned DEFAULT '0.000',
  `pay_penalty_date_paid` date DEFAULT NULL,
  `pay_remarks` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `pay_overdue_amount_due` decimal(65,3) unsigned DEFAULT '0.000',
  `pay_overdue_amount_paid` decimal(65,3) unsigned DEFAULT '0.000',
  `pay_overdue_date_paid` date DEFAULT NULL,
  `rep_id` bigint(20) unsigned DEFAULT '0',
  `encoder` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `date_encoded` datetime DEFAULT NULL,
  `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `last_updated` datetime DEFAULT NULL,
  `region_id` bigint(20) unsigned DEFAULT '6',
  `synched` tinyint(1) unsigned DEFAULT '0',
  `sync_date` datetime DEFAULT NULL,
  PRIMARY KEY (`pay_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6439 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

