Files
Navius/frontend/lib/features/home/domain/models/submit_site_draft.dart
T
CNWei 1c98340fc5 feat: 实现导航页基础功能
- 添加导航条目和分类数据模型
- 实现导航卡片网格展示
- 支持点击卡片打开链接
- 添加主题样式(渐变色、卡片阴影)
- 区分系统默认和自定义条目
- 添加分类统计信息"
2026-09-19 21:53:15 +08:00

43 lines
1.0 KiB
Dart
Raw 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.
/// 提交一个网站时填的内容。
///
/// 和后端 `POST /api/sites` 的入参一一对应。**没有 `categoryId`**:
/// 提交方只能给分组名,由后端在用户分组里查找或新建。
class SubmitSiteDraft {
const SubmitSiteDraft({
required this.title,
required this.url,
required this.group,
this.description = '',
this.subGroup = '',
this.submittedBy = '',
});
/// 网站名称。
final String title;
/// 网站地址。
final String url;
/// 一级分组名。
final String group;
/// 一句话描述。
final String description;
/// 子分组名,可为空。
final String subGroup;
/// 提交者的称呼或邮箱。
final String submittedBy;
/// 序列化成后端要的 JSON(camelCase,和后端 `CreateSiteRequest` 对齐)。
Map<String, dynamic> toJson() => <String, dynamic>{
'title': title,
'url': url,
'description': description,
'group': group,
'subGroup': subGroup,
'submittedBy': submittedBy,
};
}