first commit

This commit is contained in:
2026-04-30 18:22:10 +02:00
commit c3e98af5b6
36 changed files with 4779 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import crypto from "node:crypto";
import { eq } from "drizzle-orm";
import { db } from "../client.js";
import { projects } from "../schema/projects.js";
export class ProjectRepository {
async list() {
return db.select().from(projects);
}
async create(name: string) {
const id = crypto.randomUUID();
await db.insert(projects).values({ id, name });
return { id, name };
}
async delete(projectId: string) {
await db.delete(projects).where(eq(projects.id, projectId));
}
}