POST /internal/notification/event-mappings

内部 API:以 (tenant_id, app_id, event_type, channel) 为唯一键幂等 upsert 映射, 供 seed/运维脚本收敛"某事件应使用哪个模板"。受 InternalAPIKeyMulti 保护。

通知服务 - 内部接口 None application/json

请求参数

名称位置类型必填默认值示例约束描述
X-Tenant-ID header string 是 租户ID

请求体

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

字段类型必填示例约束描述
event_type string 是 user.registered
template_code string 是 welcome
channel string 否 in_app 空 → in_app
is_enabled boolean 否 空 → true
priority string 否 medium 空 → medium

响应

引用的 Schema

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

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

service-core/base/dto.SimpleResponse

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

service-notification/internal/handler/dto.EventMappingResponse

字段类型必填示例约束描述
app_id string 否
channel string 否
event_type string 否
id string 否
is_enabled boolean 否
priority string 否
template_code string 否
tenant_id string 否