mirror of
https://github.com/Wanxp/obsidian-douban.git
synced 2026-04-04 16:48:44 +08:00
62 lines
1.3 KiB
TypeScript
62 lines
1.3 KiB
TypeScript
import {UserStateSubject} from "./UserStateSubject";
|
|
import {SubjectHandledStatus} from "../../../constant/Constsant";
|
|
|
|
export default class DoubanSubject {
|
|
id: string;
|
|
title: string;
|
|
type: string;
|
|
score: number;
|
|
image: string;
|
|
imageUrl: string;
|
|
url: string;
|
|
desc: string;
|
|
publisher: string;
|
|
datePublished: Date;
|
|
genre: string[];
|
|
userState?: UserStateSubject;
|
|
guessType?: string;
|
|
handledStatus?: SubjectHandledStatus = SubjectHandledStatus.init;
|
|
}
|
|
|
|
const ParameterMap: Map<string, string> = new Map([
|
|
['id', ''],
|
|
]);
|
|
|
|
export const DoubanParameter = {
|
|
ID: '{{id}}',
|
|
TITLE: '{{title}}',
|
|
TYPE: '{{type}}',
|
|
SCORE: '{{score}}',
|
|
IMAGE: '{{image}}',
|
|
IMAGE_URL: '{{imageData.url}}',
|
|
URL: '{{url}}',
|
|
DESC: '{{desc}}',
|
|
PUBLISHER: '{{publisher}}',
|
|
DATE_PUBLISHED: '{{datePublished}}',
|
|
TIME_PUBLISHED: '{{timePublished}}',
|
|
YEAR_PUBLISHED: '{{yearPublished}}',
|
|
GENRE: '{{genre}}',
|
|
CURRENT_DATE: '{{currentDate}}',
|
|
CURRENT_TIME: '{{currentTime}}',
|
|
}
|
|
|
|
export const DoubanParameterName = {
|
|
ID: 'id',
|
|
TITLE: 'title',
|
|
TYPE: 'type',
|
|
SCORE: 'score',
|
|
SCORE_STAR: 'scoreStar',
|
|
IMAGE: 'image',
|
|
IMAGE_URL: 'imageData.url',
|
|
URL: 'url',
|
|
DESC: 'desc',
|
|
PUBLISHER: 'publisher',
|
|
DATE_PUBLISHED: 'datePublished',
|
|
TIME_PUBLISHED: 'timePublished',
|
|
YEAR_PUBLISHED: 'yearPublished',
|
|
GENRE: 'genre',
|
|
CURRENT_DATE: 'currentDate',
|
|
CURRENT_TIME: 'currentTime',
|
|
}
|
|
|