Files
gaoYuJournal/miniprogram/types/Journal.ts
2025-12-13 18:44:37 +08:00

73 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Attachment } from "./Attachment";
import { Model, QueryPage } from "./Model";
import { MediaItem } from "./UI";
/** 日记 */
export type Journal = {
/** 类型 */
type: JournalType;
/** 想法、说明 */
idea?: string;
/** 维度 */
lat?: number;
/** 经度 */
lng?: number;
/** 位置 */
location?: string;
/** 天气 */
weatcher?: string;
// ---------- 视图属性 ----------
/** 日期 */
date?: string;
/** 时间 */
time?: string;
/** 详细时间 */
datetime?: string;
/** 附件(照片、视频等) */
items?: Attachment[];
/** 分列后的 items用于瀑布流展示 */
columnedItems?: MediaItem[][];
/** 媒体项(由附件转) */
mediaItems?: MediaItem[];
} & Model;
/** 日记类型 */
export enum JournalType {
/** 正常 */
NORMAL = "NORMAL",
/** 专业拍摄 */
PORTFOLIO = "PORTFOLIO"
}
/** 日记页面查询对象 */
export type JournalPage = {
/** 查询类型 */
type: JournalPageType;
} & QueryPage;
/** 日记页面查询类型 */
export enum JournalPageType {
/** 正常查询所有附件 */
NORMAL = "NORMAL",
/** 仅查询第一个附件用于预览 */
PREVIEW = "PREVIEW"
}