feat: add Prisma schema with User, Project, Module, Endpoint models
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
// Shared types — will be populated as we build features
|
||||
import type { User, Project, Module, Endpoint, ModuleSource } from '@prisma/client';
|
||||
|
||||
export type { User, Project, Module, Endpoint, ModuleSource };
|
||||
|
||||
export type ApiResponse<T = unknown> = {
|
||||
success: boolean;
|
||||
data?: T;
|
||||
@@ -7,3 +10,23 @@ export type ApiResponse<T = unknown> = {
|
||||
message: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type ProjectWithStats = Project & {
|
||||
_count: { endpoints: number; modules: number };
|
||||
};
|
||||
|
||||
export type ModuleWithCount = Module & {
|
||||
_count: { endpoints: number };
|
||||
};
|
||||
|
||||
export type EndpointSummary = {
|
||||
id: string;
|
||||
method: string;
|
||||
path: string;
|
||||
summary: string | null;
|
||||
deprecated: boolean;
|
||||
};
|
||||
|
||||
export type EndpointDetail = Endpoint & {
|
||||
moduleName: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user