This commit is contained in:
2025-12-05 00:09:32 +08:00
parent bb3d22eabf
commit 3d1dbb3f97
214 changed files with 113060 additions and 1232 deletions
+63
View File
@@ -0,0 +1,63 @@
/**
* 合同起草相关类型定义
*/
// 占位符字段类型
export type FieldType = 'text' | 'number' | 'date' | 'tel' | 'email' | 'textarea';
// 占位符字段配置
export interface PlaceholderField {
key: string; // 字段键名(也是占位符名称)
label: string; // 显示标签
type: FieldType; // 字段类型
required: boolean; // 是否必填
group: string; // 分组名称
placeholder?: string; // 输入提示
defaultValue?: string; // 默认值
}
// 占位符配置Schema
export interface PlaceholderSchema {
fields: PlaceholderField[];
}
// 起草合同状态
export type DraftStatus = 'draft' | 'completed' | 'archived';
// 起草合同记录
export interface DraftedContract {
id: number;
template_id: number;
file_path: string;
title: string;
placeholder_values: Record<string, string>;
status: DraftStatus;
created_by: number | null;
created_at: string;
updated_at: string;
}
// 创建起草合同请求
export interface CreateDraftRequest {
templateId: number;
title: string;
draftFilePath?: string; // 可选:草稿文件路径(如果需要使用复制后的文件)
}
// 创建起草合同响应
export interface CreateDraftResponse {
id: number;
filePath: string;
title: string;
templateId: number;
}
// 更新占位符值请求
export interface UpdatePlaceholdersRequest {
placeholders: Record<string, string>;
}
// 完成起草请求
export interface CompleteDraftRequest {
// 可选的额外参数
}