| 1234567891011121314151617181920212223242526272829303132 |
- -- ******************************************************************
- -- 表 kku_pet_steal_logs 的创建SQL
- -- 对应的Model: App\Module\Pet\Models\PetStealLog
- -- 警告: 此文件由系统自动生成,禁止修改!
- -- ******************************************************************
- CREATE TABLE `kku_pet_steal_logs` (
- `id` bigint NOT NULL AUTO_INCREMENT,
- `stealer_user_id` int NOT NULL COMMENT '偷菜者用户ID',
- `stealer_pet_id` bigint DEFAULT NULL COMMENT '偷菜者宠物ID',
- `target_user_id` int NOT NULL COMMENT '被偷者用户ID',
- `target_pet_id` bigint DEFAULT NULL COMMENT '被偷者宠物ID',
- `land_id` int NOT NULL COMMENT '土地ID',
- `crop_id` int DEFAULT NULL COMMENT '作物ID',
- `success` tinyint(1) NOT NULL COMMENT '是否偷取成功',
- `defended` tinyint(1) DEFAULT '0' COMMENT '是否被防御',
- `steal_amount` int DEFAULT '0' COMMENT '偷取数量',
- `stealer_stamina_cost` int DEFAULT '20' COMMENT '偷菜者体力消耗',
- `target_stamina_cost` int DEFAULT '0' COMMENT '被偷者体力消耗',
- `pick_log_id` bigint DEFAULT NULL COMMENT '关联的Farm模块摘取日志ID',
- `fail_reason` varchar(255) DEFAULT NULL COMMENT '失败原因',
- `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- KEY `idx_stealer_user_id` (`stealer_user_id`),
- KEY `idx_target_user_id` (`target_user_id`),
- KEY `idx_land_id` (`land_id`),
- KEY `idx_crop_id` (`crop_id`),
- KEY `idx_pick_log_id` (`pick_log_id`),
- KEY `idx_created_at` (`created_at`),
- KEY `idx_success` (`success`),
- KEY `idx_defended` (`defended`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='宠物偷菜日志表';
|