diff --git a/src/db/demo-note.ts b/src/db/demo-note.ts new file mode 100644 index 0000000..b8bcd7e --- /dev/null +++ b/src/db/demo-note.ts @@ -0,0 +1,68 @@ +import dayjs from 'dayjs' +import { Note } from '../types/note' + +export const notes: Note[] = [ + { + id: '1', + createTime: dayjs().unix(), + updateTime: dayjs().unix(), + link: 'https://github.com/betterRunner', + content: '1123123', + tags: [ + 'color', + 'random', + '标签1', + '。标点', + '.标点2', + '中文', + 'qwe中文+英文', + '.letter' + ], + rects: [], + }, + { + id: '2', + createTime: dayjs().unix(), + updateTime: dayjs().unix(), + link: 'https://github.com/betterRunner', + content: '1123123', + tags: ['random'], + rects: [], + }, + { + id: '3', + createTime: dayjs().unix(), + updateTime: dayjs().unix(), + link: 'https://github.com/betterRunner', + content: '1123123', + tags: [], + rects: [], + }, + { + id: '4', + createTime: dayjs().unix(), + updateTime: dayjs().unix(), + link: 'https://github.com/betterRunner', + content: '1123123', + tags: [], + rects: [], + }, + { + id: '5', + createTime: dayjs().unix(), + updateTime: dayjs().unix(), + link: 'https://github.com/betterRunner', + content: '1123123', + tags: [], + rects: [], + }, + { + id: '6', + createTime: dayjs().unix(), + updateTime: dayjs().unix(), + link: 'https://github.com/betterRunner', + content: '1123123', + tags: [], + rects: [], + } +] diff --git a/src/db/demo-tags.ts b/src/db/demo-tags.ts new file mode 100644 index 0000000..ef44268 --- /dev/null +++ b/src/db/demo-tags.ts @@ -0,0 +1,62 @@ +import { Tag } from '../types/tag' +import randomColor from 'randomcolor' +import dayjs from 'dayjs' + +export const tags: Tag[] = [ + { + id: 'color', + name: 'color', + color: randomColor(), + updateTime: dayjs().unix(), + noteIds: ['1'], + }, + { + id: 'random', + name: 'random', + color: randomColor(), + updateTime: dayjs().unix(), + noteIds: ['1', '2'] + }, + { + id: '标签1', + name: '标签1', + color: randomColor(), + updateTime: dayjs().unix(), + noteIds: ['1'] + }, + { + id: '。标点', + name: '。标点', + color: randomColor(), + updateTime: dayjs().unix(), + noteIds: ['1'] + }, + { + id: '.标点2', + name: '.标点2', + color: randomColor(), + updateTime: dayjs().unix(), + noteIds: ['1'] + }, + { + id: '中文', + name: '中文', + color: randomColor(), + updateTime: dayjs().unix(), + noteIds: ['1'] + }, + { + id: 'qwe中文+英文', + name: 'qwe中文+英文', + color: randomColor(), + updateTime: dayjs().unix(), + noteIds: ['1'] + }, + { + id: '.letter', + name: '.letter', + color: randomColor(), + updateTime: dayjs().unix(), + noteIds: ['1'] + } +] \ No newline at end of file