PUT /admin/notifications/preferences/{user_id}

管理员为指定用户设置通知渠道偏好(邮件/短信/Push等)

通知服务 `bearerAuth` application/json

请求参数

名称位置类型必填默认值示例约束描述
user_id path string 是 用户ID

请求体

Schema: service-notification/internal/handler/dto.NotificationPreferencesRequest

字段类型必填示例约束描述
user_id string 是 usr_abc123 用户ID
channels object 否 渠道设置
email_enabled boolean 否 True 邮件启用
push_enabled boolean 否 True 推送启用
sms_enabled boolean 否 False 短信启用

响应

引用的 Schema

dto.DataResponse-service-notification/internal/handler/dto/NotificationPreferencesResponse

字段类型必填示例约束描述
code integer 否
data service-notification/internal/handler/dto.NotificationPreferencesResponse 否
message string 否
timestamp string 否

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-notification/internal/handler/dto.NotificationPreferencesResponse

用户通知偏好设置

字段类型必填示例约束描述
channels object 否 渠道设置
email_enabled boolean 否 True 邮件启用
push_enabled boolean 否 True 推送启用
quiet_hours object 否 免打扰时段
sms_enabled boolean 否 False 短信启用
type_prefs object 否 通知类型偏好
updated_at string 否 2026-04-15T10:30:00Z 更新时间
user_id string 否 usr_abc123 用户ID