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

CREATE TABLE `kku_app_message_recipients` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `message_id` bigint unsigned NOT NULL COMMENT '消息ID',
  `user_id` bigint unsigned NOT NULL COMMENT '用户ID',
  `is_read` tinyint NOT NULL DEFAULT '0' COMMENT '是否已读：0未读 1已读',
  `read_at` timestamp NULL DEFAULT NULL COMMENT '阅读时间',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态：0删除 1正常',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `kku_app_message_recipients_message_user_unique` (`message_id`,`user_id`) USING BTREE,
  KEY `kku_app_message_recipients_user_id_index` (`user_id`) USING BTREE,
  KEY `kku_app_message_recipients_is_read_index` (`is_read`) USING BTREE,
  KEY `kku_app_message_recipients_status_index` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='站内信群发接收表';
