Skip to content

Commit

Permalink
feat: demo-dbs
Browse files Browse the repository at this point in the history
  • Loading branch information
betterRunner committed Sep 6, 2021
1 parent 15eeca7 commit 2583f55
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 0 deletions.
68 changes: 68 additions & 0 deletions src/db/demo-note.ts
Original file line number Diff line number Diff line change
@@ -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: [],
}
]
62 changes: 62 additions & 0 deletions src/db/demo-tags.ts
Original file line number Diff line number Diff line change
@@ -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']
}
]

0 comments on commit 2583f55

Please sign in to comment.