DROP TABLE IF EXISTS `cheque`;
CREATE TABLE `cheque` (
                          `id` int NOT NULL AUTO_INCREMENT,
                          `user_id` int NOT NULL,
                          `customer_id` int NOT NULL,
                          `cheque_name` varchar(150) NOT NULL,
                          `safe_prefix` varchar(50) NOT NULL COMMENT 'A - Alınan, B - Borç',
                          `cheque_date` date DEFAULT NULL,
                          `insert_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
                          `price` decimal(15,6) NOT NULL,
                          `currency_id` int NOT NULL,
                          `serial_no` varchar(70) NOT NULL,
                          `bank_id` int NOT NULL,
                          `status` tinyint(1) NOT NULL DEFAULT '1',
                          `note` text NOT NULL,
                          PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3;