文件版本管理-初步优化
This commit is contained in:
@@ -24,7 +24,7 @@ export interface LoginResponse {
|
||||
token_type: string;
|
||||
}
|
||||
|
||||
export type UserRole = "PM" | "CRA" | "PV" | "IMP" | "ADMIN";
|
||||
export type UserRole = "PM" | "CRA" | "PV" | "IMP" | "QA" | "ADMIN";
|
||||
export type UserStatus = "PENDING" | "ACTIVE" | "REJECTED" | "DISABLED";
|
||||
|
||||
export interface UserInfo {
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
export type DocumentStatus = "DRAFT" | "ACTIVE" | "ARCHIVED";
|
||||
export type DocumentScopeType = "GLOBAL" | "SITE" | "DERIVED";
|
||||
export type DocumentVersionStatus =
|
||||
| "DRAFT"
|
||||
| "SUBMITTED"
|
||||
| "APPROVED"
|
||||
| "EFFECTIVE"
|
||||
| "SUPERSEDED"
|
||||
| "ARCHIVED"
|
||||
| "WITHDRAWN";
|
||||
|
||||
export interface DocumentVersionSummary {
|
||||
id: string;
|
||||
version_no: string;
|
||||
status: DocumentVersionStatus;
|
||||
effective_at?: string | null;
|
||||
}
|
||||
|
||||
export interface DocumentSummary {
|
||||
id: string;
|
||||
trial_id: string;
|
||||
site_id?: string | null;
|
||||
doc_no: string;
|
||||
doc_type: string;
|
||||
title: string;
|
||||
scope_type: DocumentScopeType;
|
||||
owner_id?: string | null;
|
||||
status: DocumentStatus;
|
||||
current_effective_version_id?: string | null;
|
||||
current_effective_version?: DocumentVersionSummary | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
can_actions?: string[];
|
||||
}
|
||||
|
||||
export interface DocumentVersion {
|
||||
id: string;
|
||||
document_id: string;
|
||||
version_no: string;
|
||||
parent_version_id?: string | null;
|
||||
derived_from_version_id?: string | null;
|
||||
status: DocumentVersionStatus;
|
||||
effective_at?: string | null;
|
||||
superseded_at?: string | null;
|
||||
file_uri: string;
|
||||
file_hash: string;
|
||||
file_size: number;
|
||||
mime_type?: string | null;
|
||||
change_summary?: string | null;
|
||||
created_by?: string | null;
|
||||
submitted_at?: string | null;
|
||||
approved_at?: string | null;
|
||||
withdrawn_at?: string | null;
|
||||
created_at: string;
|
||||
can_actions?: string[];
|
||||
}
|
||||
|
||||
export interface WorkflowNode {
|
||||
id: string;
|
||||
node_order: number;
|
||||
role: string;
|
||||
name?: string | null;
|
||||
is_required: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface WorkflowTemplate {
|
||||
id: string;
|
||||
trial_id?: string | null;
|
||||
name: string;
|
||||
description?: string | null;
|
||||
is_active: boolean;
|
||||
created_by?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
nodes?: WorkflowNode[];
|
||||
}
|
||||
|
||||
export interface DistributionStats {
|
||||
total: number;
|
||||
received: number;
|
||||
read: number;
|
||||
trained: number;
|
||||
overdue: number;
|
||||
}
|
||||
|
||||
export type DistributionTargetType = "SITE" | "ROLE" | "USER";
|
||||
export type DistributionStatus = "ACTIVE" | "CLOSED";
|
||||
|
||||
export interface Distribution {
|
||||
id: string;
|
||||
document_id: string;
|
||||
version_id: string;
|
||||
target_type: DistributionTargetType;
|
||||
target_id: string;
|
||||
status: DistributionStatus;
|
||||
due_at?: string | null;
|
||||
created_by?: string | null;
|
||||
created_at: string;
|
||||
stats?: DistributionStats;
|
||||
}
|
||||
|
||||
export interface Acknowledgement {
|
||||
id: string;
|
||||
distribution_id: string;
|
||||
user_id: string;
|
||||
site_id?: string | null;
|
||||
ack_type: "RECEIVED" | "READ" | "TRAINED";
|
||||
due_at?: string | null;
|
||||
acked_at?: string | null;
|
||||
note?: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface DocumentDetail extends DocumentSummary {
|
||||
description?: string | null;
|
||||
version_timeline: DocumentVersion[];
|
||||
distribution_stats: DistributionStats;
|
||||
owner?: {
|
||||
id: string;
|
||||
email: string;
|
||||
full_name: string;
|
||||
role: string;
|
||||
avatar_url?: string | null;
|
||||
} | null;
|
||||
}
|
||||
Reference in New Issue
Block a user