49 lines
888 B
TypeScript
49 lines
888 B
TypeScript
import { Model } from "./Model";
|
|
|
|
export type Attachment = {
|
|
bizType?: AttachmentBizType;
|
|
bizId?: string;
|
|
attachType?: string;
|
|
mongoId?: string;
|
|
title?: string;
|
|
name?: string;
|
|
mimeType?: string;
|
|
metadata?: Record<string, any>;
|
|
accessKey?: AttachmentAccessKey;
|
|
size?: number;
|
|
md5?: string;
|
|
uploaderIp?: string;
|
|
isDestroyed?: boolean;
|
|
destroyAt?: number;
|
|
tempFileId?: string;
|
|
} & Model;
|
|
|
|
export type TempFile = {
|
|
id: string;
|
|
expireAt?: number;
|
|
};
|
|
|
|
export type BizIdUpdate = {
|
|
bizType: AttachmentBizType;
|
|
bizId: string;
|
|
items: Partial<Attachment>[];
|
|
};
|
|
|
|
export type AttachmentBizType =
|
|
| "ARTICLE"
|
|
| "USER"
|
|
| "GAO_CUSTOMER"
|
|
| "GAO_EVENT_RECORD"
|
|
| "GAO_REGISTER_RECORD"
|
|
| "TEMP_FILE"
|
|
| "MIRROR";
|
|
|
|
/** 附件访问密钥 */
|
|
export type AttachmentAccessKey = {
|
|
value: string;
|
|
attachmentId: string;
|
|
isDisposable: boolean;
|
|
expiredAt: number;
|
|
createdAt: number;
|
|
};
|