BEGIN;

CREATE TABLE `finance_financesettlement` (
    `id` char(32) NOT NULL PRIMARY KEY,
    `settle_date` date,
    `created_at` datetime(6) NOT NULL,
    `updated_at` datetime(6) NOT NULL,
    `amount` integer NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `finance_mechantsettlement` (
    `id` char(32) NOT NULL PRIMARY KEY,
    `settle_id` varchar(50) NOT NULL,
    `doctor_id` varchar(100) NOT NULL,
    `amount` integer NOT NULL,
    `is_black` bool NOT NULL,
    `status` integer NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `finance_mechantsettlement` ADD CONSTRAINT `doctor_id_refs_id_db5ebbf3` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);

COMMIT;
