更新文档,添加小红书模块描述;重构数据库模式,增加笔记和用户信息字段;优化核心逻辑,增加记录超时处理;更新示例数据。
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';
|
||||
|
||||
import { randomUUID } from 'node:crypto';
|
||||
export const cache = sqliteTable('cache', {
|
||||
key: text('key').primaryKey(),
|
||||
value: text('value').notNull(),
|
||||
@@ -9,16 +9,55 @@ export const cache = sqliteTable('cache', {
|
||||
|
||||
export const xhsNote = sqliteTable('xhs_note', {
|
||||
id: text('id').primaryKey(),
|
||||
content: text('content').notNull(),
|
||||
|
||||
title: text('title'),
|
||||
summary: text('summary'),
|
||||
description: text('description'),
|
||||
tags: text('tags').notNull(),
|
||||
noteUrl: text('note_url'),
|
||||
link: text('link'),
|
||||
data: text('data'),
|
||||
tags: text('tags'),
|
||||
|
||||
status: text('status'),
|
||||
authorUrl: text('author_url'),
|
||||
cover: text('cover'),
|
||||
|
||||
syncStatus: integer('sync_status').notNull(),
|
||||
syncAt: integer('sync_at').notNull(),
|
||||
|
||||
star: integer('star'),
|
||||
|
||||
pushedAt: integer('pushed_at'),
|
||||
createdAt: integer('created_at').notNull(),
|
||||
updatedAt: integer('updated_at').notNull(),
|
||||
deletedAt: integer('deleted_at'),
|
||||
});
|
||||
|
||||
export const xhsUser = sqliteTable('xhs_user', {
|
||||
id: text('id').primaryKey().$defaultFn(() => randomUUID()),
|
||||
user_id: text('user_id').notNull(),
|
||||
|
||||
username: text('username'),
|
||||
nickname: text('nickname'),
|
||||
avatar: text('avatar'),
|
||||
|
||||
title: text('title'),
|
||||
summary: text('summary'),
|
||||
description: text('description'),
|
||||
link: text('link'),
|
||||
data: text('data'),
|
||||
tags: text('tags'),
|
||||
|
||||
followersCount: integer('followers_count'),
|
||||
followingCount: integer('following_count'),
|
||||
|
||||
status: text('status'),
|
||||
|
||||
syncStatus: integer('sync_status').notNull(),
|
||||
syncAt: integer('sync_at').notNull(),
|
||||
|
||||
star: integer('star'),
|
||||
|
||||
createdAt: integer('created_at').notNull(),
|
||||
updatedAt: integer('updated_at').notNull(),
|
||||
deletedAt: integer('deleted_at'),
|
||||
});
|
||||
Reference in New Issue
Block a user