merge: combine all features from both codebases - mobile dashboard + layer panel + notifications + shares + all fixes
This commit is contained in:
@@ -7,10 +7,19 @@ export interface DBProject {
|
||||
name: string;
|
||||
description: string | null;
|
||||
owner_id: string;
|
||||
folder_id: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface DBProjectFolder {
|
||||
id: string;
|
||||
name: string;
|
||||
parent_id: string | null;
|
||||
owner_id: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface DBDrawing {
|
||||
id: string;
|
||||
project_id: string;
|
||||
@@ -99,6 +108,23 @@ export interface DBProjectShare {
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface DBGlobalBlockFolder {
|
||||
id: string;
|
||||
name: string;
|
||||
parent_id: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface DBGlobalBlock {
|
||||
id: string;
|
||||
folder_id: string | null;
|
||||
name: string;
|
||||
block_data: string;
|
||||
svg_data: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface DatabaseInterface {
|
||||
init(): Promise<void>;
|
||||
close(): void;
|
||||
@@ -112,11 +138,19 @@ export interface DatabaseInterface {
|
||||
listUsers(): DBUser[];
|
||||
|
||||
// Projects
|
||||
listProjects(): DBProject[];
|
||||
listProjects(ownerId?: string, folderId?: string | null): DBProject[];
|
||||
getProject(id: string): DBProject | null;
|
||||
createProject(data: Partial<DBProject>): DBProject;
|
||||
updateProject(id: string, data: Partial<DBProject>): DBProject | null;
|
||||
deleteProject(id: string): boolean;
|
||||
moveProjectToFolder(projectId: string, folderId: string | null): DBProject | null;
|
||||
|
||||
// Project Folders
|
||||
listProjectFolders(ownerId: string): DBProjectFolder[];
|
||||
getProjectFolder(id: string): DBProjectFolder | null;
|
||||
createProjectFolder(data: Partial<DBProjectFolder>): DBProjectFolder;
|
||||
updateProjectFolder(id: string, data: Partial<DBProjectFolder>): DBProjectFolder | null;
|
||||
deleteProjectFolder(id: string): boolean;
|
||||
|
||||
// Drawings
|
||||
listDrawings(projectId: string): DBDrawing[];
|
||||
@@ -165,4 +199,18 @@ export interface DatabaseInterface {
|
||||
getProjectShare(id: string): DBProjectShare | null;
|
||||
createProjectShare(data: Partial<DBProjectShare>): DBProjectShare;
|
||||
deleteProjectShare(id: string): boolean;
|
||||
|
||||
// Global Block Folders
|
||||
listGlobalFolders(parentId?: string | null): DBGlobalBlockFolder[];
|
||||
getGlobalFolder(id: string): DBGlobalBlockFolder | null;
|
||||
createGlobalFolder(data: Partial<DBGlobalBlockFolder>): DBGlobalBlockFolder;
|
||||
updateGlobalFolder(id: string, data: Partial<DBGlobalBlockFolder>): DBGlobalBlockFolder | null;
|
||||
deleteGlobalFolder(id: string): boolean;
|
||||
|
||||
// Global Blocks
|
||||
listGlobalBlocks(folderId?: string | null): DBGlobalBlock[];
|
||||
getGlobalBlock(id: string): DBGlobalBlock | null;
|
||||
createGlobalBlock(data: Partial<DBGlobalBlock>): DBGlobalBlock;
|
||||
updateGlobalBlock(id: string, data: Partial<DBGlobalBlock>): DBGlobalBlock | null;
|
||||
deleteGlobalBlock(id: string): boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user