mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
feat(core): new favorite (#7590)
This commit is contained in:
@@ -1 +1 @@
|
||||
export { AFFiNE_DB_SCHEMA } from './schema';
|
||||
export { AFFiNE_WORKSPACE_DB_SCHEMA } from './schema';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { nanoid } from 'nanoid';
|
||||
|
||||
import { type DBSchemaBuilder, f } from '../../../orm';
|
||||
|
||||
export const AFFiNE_DB_SCHEMA = {
|
||||
export const AFFiNE_WORKSPACE_DB_SCHEMA = {
|
||||
folders: {
|
||||
id: f.string().primaryKey().optional().default(nanoid),
|
||||
parentId: f.string().optional(),
|
||||
@@ -11,4 +11,13 @@ export const AFFiNE_DB_SCHEMA = {
|
||||
index: f.string(),
|
||||
},
|
||||
} as const satisfies DBSchemaBuilder;
|
||||
export type AFFiNE_DB_SCHEMA = typeof AFFiNE_DB_SCHEMA;
|
||||
export type AFFiNE_WORKSPACE_DB_SCHEMA = typeof AFFiNE_WORKSPACE_DB_SCHEMA;
|
||||
|
||||
export const AFFiNE_WORKSPACE_USERDATA_DB_SCHEMA = {
|
||||
favorite: {
|
||||
key: f.string().primaryKey(),
|
||||
index: f.string(),
|
||||
},
|
||||
} as const satisfies DBSchemaBuilder;
|
||||
export type AFFiNE_WORKSPACE_USERDATA_DB_SCHEMA =
|
||||
typeof AFFiNE_WORKSPACE_USERDATA_DB_SCHEMA;
|
||||
|
||||
Reference in New Issue
Block a user