feat(core): init organize (#7456)

This commit is contained in:
EYHN
2024-07-26 04:35:31 +00:00
parent b26b0c3a22
commit 54da85ec62
140 changed files with 6257 additions and 2804 deletions
@@ -0,0 +1 @@
export { AFFiNE_DB_SCHEMA } from './schema';
@@ -0,0 +1,14 @@
import { nanoid } from 'nanoid';
import { type DBSchemaBuilder, f } from '../../../orm';
export const AFFiNE_DB_SCHEMA = {
folders: {
id: f.string().primaryKey().optional().default(nanoid),
parentId: f.string().optional(),
data: f.string(),
type: f.string(),
index: f.string(),
},
} as const satisfies DBSchemaBuilder;
export type AFFiNE_DB_SCHEMA = typeof AFFiNE_DB_SCHEMA;