-- ******************************************************************
-- 表 kku_pet_remould_logs 的创建SQL
-- 对应的Model: App\Module\Pet\Models\PetRemouldLog
-- 警告: 此文件由系统自动生成，禁止修改！
-- ******************************************************************

CREATE TABLE `kku_pet_remould_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `pet_id` bigint(20) unsigned NOT NULL,
  `old_grade` enum('FIRST','SECOND','THIRD','FOURTH') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `new_grade` enum('FIRST','SECOND','THIRD','FOURTH') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `remould_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_pet` (`pet_id`) USING BTREE,
  CONSTRAINT `kku_pet_remould_logs_ibfk_1` FOREIGN KEY (`pet_id`) REFERENCES `kku_pet_users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='洗髓记录';
