/admin/announcements
创建新的公告,支持草稿/定时发布,可指定目标租户和角色 参考:CAN-SPAM Act (15 U.S.C. §7701) — Commercial Email Compliance。
Request Body
Schema: dto.CreateAnnouncementRequest
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
content |
string |
Yes | 系统将于2026-05-15进行升级维护 |
||
title |
string |
Yes | 系统升级公告 |
||
expire_at |
string |
No | 2026-05-20T12:00:00Z |
||
publish_at |
string |
No | 2026-05-10T12:00:00Z |
||
target_roles |
array of string |
No |
Responses
| Status | Description | Schema |
|---|---|---|
| 201 | 创建成功 | dto.AnnouncementDetailResponse |
| 400 | 请求参数错误 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 401 | 未认证 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 403 | 权限不足 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 404 | 资源未找到 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 500 | 服务内部错误 | gitee_com_linmes_authms_base_dto.SimpleResponse |
Referenced Schemas
dto.AnnouncementDetailResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
data |
dto.AnnouncementResponse |
No | |||
message |
string |
No | |||
timestamp |
string |
No |
dto.AnnouncementResponse
公告信息响应
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
content |
string |
No | 系统将于2026-05-15进行升级维护 |
||
created_at |
string |
No | 2026-05-09T12:00:00Z |
||
dismissals |
integer |
No | 5 |
||
expire_at |
string |
No | 2026-05-20T12:00:00Z |
||
id |
string |
No | ann_abc123 |
||
publish_at |
string |
No | 2026-05-10T12:00:00Z |
||
status |
string |
No | published |
||
target_roles |
array of string |
No | |||
tenant_id |
string |
No | tnt_xyz789 |
||
title |
string |
No | 系统升级公告 |
||
updated_at |
string |
No | 2026-05-09T12:00:00Z |
||
views |
integer |
No | 100 |
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
message |
string |
No | |||
timestamp |
string |
No |