Files
gaoYuJournal/miniprogram/types/Attachment.ts
2025-12-09 18:02:23 +08:00

56 lines
796 B
TypeScript

import { Model } from "./Model";
/** 附件 */
export type Attachment = {
/** 业务类型 */
bizType: string;
/** 业务 ID */
bizId: number;
/** 附件类型 */
attachType?: MediaAttachType;
/** 文件名 */
name: string;
/** 文件 MD5 */
md5: string;
/** 访问 mongoId */
mongoId: string;
/** 大小 */
size: number;
/** 扩展数据 */
ext?: string | MediaAttachExt;
} & Model;
/** 媒体附件类型 */
export enum MediaAttachType {
/** 原图 */
SOURCE = "SOURCE",
/** 缩略图 */
THUMB = "THUMB"
}
/** 媒体附件扩展数据 */
export type MediaAttachExt = {
/** 原文件附件 ID */
sourceId: number;
/** 原文件访问 mongoId */
sourceMongoId: string;
/** true 为图片 */
isImage: boolean;
/** true 为视频 */
isVideo: boolean;
}