feat(review): 重构项目级单方案验收协作
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export type ReviewStatus = 'draft' | 'pending' | 'changes_requested' | 'approved';
|
||||
export type CandidateStatus = 'draft' | 'pending' | 'changes_requested' | 'selected' | 'not_selected';
|
||||
export type ReviewRoundStatus = 'draft' | 'reviewing' | 'completed';
|
||||
export type CollectionStatus = 'draft' | 'reviewing' | 'completed' | 'archived';
|
||||
export type ProjectReviewStatus = 'draft' | 'reviewing' | 'completed' | 'archived';
|
||||
export type UserRole = 'platform_admin' | 'group_admin' | 'operator';
|
||||
|
||||
export interface CurrentUser {
|
||||
@@ -96,11 +96,16 @@ export interface Project {
|
||||
slug: string;
|
||||
client_description: string;
|
||||
status: 'active' | 'closed' | 'archived';
|
||||
review_status: ProjectReviewStatus;
|
||||
review_completed_at: string | null;
|
||||
customer_access_enabled: boolean;
|
||||
access_expires_at: string | null;
|
||||
has_access_password: boolean;
|
||||
collection_count: number;
|
||||
work_count: number;
|
||||
pending_count: number;
|
||||
changes_requested_count: number;
|
||||
approved_count: number;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -127,6 +132,7 @@ export interface WorkCollection {
|
||||
|
||||
export interface Note {
|
||||
id: number;
|
||||
project_id: number;
|
||||
collection_id: number;
|
||||
external_id: string | null;
|
||||
title: string;
|
||||
@@ -161,17 +167,23 @@ export interface Annotation {
|
||||
y: number;
|
||||
content: string;
|
||||
author_name: string;
|
||||
author_role: 'client' | 'operator';
|
||||
status: 'open' | 'resolved' | 'confirmed';
|
||||
closure_reason: string;
|
||||
withdrawn_at: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface WorkComment {
|
||||
id: number;
|
||||
note_id: number;
|
||||
version_number: number;
|
||||
content: string;
|
||||
author_name: string;
|
||||
author_role: 'client' | 'operator';
|
||||
status: 'open' | 'resolved' | 'confirmed';
|
||||
closure_reason: string;
|
||||
withdrawn_at: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -179,10 +191,33 @@ export interface TextAnnotation {
|
||||
id: number;
|
||||
note_id: number;
|
||||
version_number: number;
|
||||
target: 'title' | 'description';
|
||||
target: 'title' | 'description' | 'tags';
|
||||
start_offset: number;
|
||||
end_offset: number;
|
||||
selected_text: string;
|
||||
prefix_text: string;
|
||||
suffix_text: string;
|
||||
content: string;
|
||||
author_name: string;
|
||||
author_role: 'client' | 'operator';
|
||||
status: 'open' | 'resolved' | 'confirmed';
|
||||
closure_reason: string;
|
||||
withdrawn_at: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type FeedbackType = 'image_annotation' | 'text_annotation' | 'comment';
|
||||
|
||||
export interface FeedbackReply {
|
||||
id: number;
|
||||
note_id: number;
|
||||
version_number: number;
|
||||
feedback_type: FeedbackType;
|
||||
feedback_id: number;
|
||||
content: string;
|
||||
author_name: string;
|
||||
author_role: 'client' | 'operator';
|
||||
withdrawn_at: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -194,20 +229,18 @@ export interface NoteDetail extends Note {
|
||||
images: ImageWithAnnotations[];
|
||||
text_annotations: TextAnnotation[];
|
||||
comments: WorkComment[];
|
||||
project: Pick<Project, 'id' | 'name' | 'slug'>;
|
||||
collection: Pick<WorkCollection, 'id' | 'name' | 'status'>;
|
||||
versions: WorkVersion[];
|
||||
feedback_replies: FeedbackReply[];
|
||||
project: Pick<Project, 'id' | 'name' | 'slug' | 'status' | 'review_status'>;
|
||||
rounds: WorkRound[];
|
||||
review_events: ReviewEvent[];
|
||||
}
|
||||
|
||||
export interface WorkVersion {
|
||||
export interface WorkRound {
|
||||
version_number: number;
|
||||
review_round_id: number;
|
||||
round_number: number;
|
||||
candidate_name: string;
|
||||
candidate_status: CandidateStatus;
|
||||
round_status: ReviewRoundStatus;
|
||||
selected_version_number: number | null;
|
||||
completion_reason: string;
|
||||
title: string;
|
||||
description: string;
|
||||
tags: string[];
|
||||
@@ -222,6 +255,7 @@ export interface ReviewRound {
|
||||
status: ReviewRoundStatus;
|
||||
selected_version_number: number | null;
|
||||
completed_at: string | null;
|
||||
completion_reason: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -242,6 +276,20 @@ export interface CreateAnnotationRequest {
|
||||
y: number;
|
||||
content: string;
|
||||
author_name?: string;
|
||||
author_role?: 'client' | 'operator';
|
||||
}
|
||||
|
||||
export interface WorkFeedbackBundle {
|
||||
work_id: number;
|
||||
rounds: Array<{
|
||||
round_number: number;
|
||||
version_number: number;
|
||||
image_annotations: Array<Annotation & { image_id: number; image_url: string }>;
|
||||
text_annotations: TextAnnotation[];
|
||||
comments: WorkComment[];
|
||||
feedback_replies: FeedbackReply[];
|
||||
review_events: ReviewEvent[];
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface NoteListQuery {
|
||||
|
||||
Reference in New Issue
Block a user