refactor(Post, PostMapper, PostRepository, CreatePostScreen, HomeScreen): update communityId to channelId for improved clarity
Some checks failed
Frontend CI / build-and-push-web (push) Successful in 2m48s
Frontend CI / ota-android (push) Successful in 11m3s
Frontend CI / build-android-apk (push) Has been cancelled

- Renamed communityId to channelId across Post entity, PostMapper, and PostRepository for consistency and clarity.
- Updated CreatePostScreen to include channel selection functionality, enhancing user experience when creating posts.
- Adjusted HomeScreen to support filtering posts by channel, improving content organization.
- Refactored related interfaces and services to align with the new channelId terminology, ensuring a cohesive codebase.
This commit is contained in:
lafay
2026-03-24 22:27:33 +08:00
parent b49cc0f3bd
commit 126e204592
15 changed files with 439 additions and 260 deletions

View File

@@ -80,7 +80,7 @@ export interface PostDTO {
is_liked: boolean;
is_favorited: boolean;
// 额外字段
community_id?: string;
channel_id?: string;
top_comment?: CommentDTO | null;
}
@@ -780,7 +780,7 @@ export interface VoteResultDTO {
export interface CreateVotePostRequest {
title: string;
content?: string;
community_id?: string;
channel_id?: string;
images?: string[];
vote_options: string[]; // 至少2个最多10个
}

View File

@@ -102,6 +102,7 @@ export interface CreatePostInput {
title: string;
content: string;
images?: string[]; // 本地图片路径或 base64
channel_id?: string;
}
// ============================================