refactor(Post, PostMapper, PostRepository, CreatePostScreen, HomeScreen): update communityId to channelId for improved clarity
- 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:
@@ -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个
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ export interface CreatePostInput {
|
||||
title: string;
|
||||
content: string;
|
||||
images?: string[]; // 本地图片路径或 base64
|
||||
channel_id?: string;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
|
||||
Reference in New Issue
Block a user