Reviewed-on: #15 Co-authored-by: jinyaqiu <jinyaqiu@fairclip.cn> Co-committed-by: jinyaqiu <jinyaqiu@fairclip.cn>
100 lines
2.1 KiB
TypeScript
100 lines
2.1 KiB
TypeScript
export interface PersonalCount {
|
|
total: number,
|
|
image_count: number,
|
|
video_count: number,
|
|
used_bytes: number,
|
|
total_bytes: number
|
|
}
|
|
|
|
export interface FileInfo {
|
|
id: string;
|
|
file_name: string;
|
|
url: string;
|
|
metadata?: {
|
|
duration?: string;
|
|
};
|
|
}
|
|
|
|
export interface MaterialItem {
|
|
id: string;
|
|
name: string | null;
|
|
description: string | null;
|
|
file_info: FileInfo;
|
|
preview_file_info: FileInfo;
|
|
user_id: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
// 任务状态类型
|
|
export type TaskStatus = 'Pending' | 'Processing' | 'Completed' | 'Failed';
|
|
export interface CreateItem {
|
|
task_id: string;
|
|
user_id: string;
|
|
status: TaskStatus;
|
|
created_at: string; // 可以使用更严格的日期时间类型如 Date 或 string
|
|
started_at: string | null;
|
|
completed_at: string | null;
|
|
failure_reason: string | null;
|
|
template_id: number;
|
|
source_files: FileInfo[];
|
|
output_video_file: FileInfo;
|
|
// 如果有其他可能存在的字段
|
|
[key: string]: any;
|
|
}
|
|
|
|
|
|
// 协议
|
|
export interface Policy {
|
|
id: number,
|
|
code: string,
|
|
content: string,
|
|
created_at: string,
|
|
updated_at: string
|
|
}
|
|
|
|
|
|
// 订单
|
|
export interface Amount {
|
|
amount: string;
|
|
currency: string;
|
|
}
|
|
|
|
export interface OrderItem {
|
|
discount_amount: Amount;
|
|
id: string;
|
|
product_code: string;
|
|
product_id: number;
|
|
product_name: string;
|
|
product_type: string;
|
|
quantity: number;
|
|
total_price: Amount;
|
|
unit_price: Amount;
|
|
}
|
|
|
|
// 订单
|
|
export interface CreateOrder {
|
|
created_at: string;
|
|
expired_at: string;
|
|
id: string;
|
|
items: OrderItem[];
|
|
payment_info: any | null; // 使用 any 或更具体的类型
|
|
status: string;
|
|
total_amount: Amount;
|
|
updated_at: string;
|
|
user_id: string;
|
|
}
|
|
|
|
// 创建订单
|
|
export interface PayOrder {
|
|
created_at: string;
|
|
id: string;
|
|
paid_at: string;
|
|
payment_amount: Amount;
|
|
payment_method: string;
|
|
payment_status: string;
|
|
third_party_transaction_id: string;
|
|
transaction_id: string;
|
|
updated_at: string;
|
|
}
|