CREATE TABLE `leave_count_for_users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `leave_type_id` bigint(20) unsigned NOT NULL,
  `financialyear_id` bigint(20) unsigned NOT NULL,
  `number_of_days` int(11) NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `leave_count_for_users_user_id_foreign` (`user_id`),
  KEY `leave_count_for_users_leave_type_id_foreign` (`leave_type_id`),
  KEY `leave_count_for_users_financialyear_id_foreign` (`financialyear_id`),
  CONSTRAINT `leave_count_for_users_financialyear_id_foreign` FOREIGN KEY (`financialyear_id`) REFERENCES `financialyears` (`id`),
  CONSTRAINT `leave_count_for_users_leave_type_id_foreign` FOREIGN KEY (`leave_type_id`) REFERENCES `leave_type_names` (`id`),
  CONSTRAINT `leave_count_for_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci