liuyun 35028a69d2
Some checks are pending
CI / backend (push) Waiting to run
CI / frontend (push) Waiting to run
docs(spec): 归档 in-app-notification + 同步通知主 spec
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 22:26:15 +08:00

30 lines
1003 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Notice Specification
## Purpose
定义站内通知/公告域的行为:管理员发布公告,用户查看并追踪已读/未读。
## Requirements
### Requirement: 公告管理
系统 SHALL 支持管理员对通知做分页查询、新增、编辑、删除(软删回收唯一键)。
#### Scenario: 发布公告
- **WHEN** 管理员新增一条通知
- **THEN** 通知写入,status=enabled 时对本租户所有用户可见
### Requirement: 用户通知与已读
系统 SHALL 支持当前用户分页查看可见通知(含已读状态)、查询未读数、标记单条/全部已读。
#### Scenario: 查看通知列表
- **WHEN** 用户查看通知
- **THEN** 返回其可见通知(status=enabled),未读的 readAt 为空
#### Scenario: 未读数
- **WHEN** 用户请求未读数
- **THEN** 返回 status=enabled 且当前用户未读的通知数
#### Scenario: 标记已读
- **WHEN** 用户标记某条或全部通知已读
- **THEN** 对应 notice_read 记录其 read_at