Initial Pi code for public lookup api

This commit is contained in:
Kostas Drakontidis
2026-05-13 23:27:55 +03:00
parent bcc3e97c80
commit 97712364ca
15 changed files with 3337 additions and 0 deletions
@@ -0,0 +1,17 @@
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL PRIMARY KEY,
"firstName" TEXT NOT NULL,
"lastName" TEXT NOT NULL,
"faceEmbedding" BLOB NOT NULL
);
-- CreateTable
CREATE TABLE "Tag" (
"id" TEXT NOT NULL PRIMARY KEY,
"userId" TEXT NOT NULL,
CONSTRAINT "Tag_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Tag_userId_key" ON "Tag"("userId");
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "sqlite"
+22
View File
@@ -0,0 +1,22 @@
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
}
datasource db {
provider = "sqlite"
}
model User {
id String @id @default(uuid())
firstName String
lastName String
faceEmbedding Bytes?
tag Tag?
}
model Tag {
id String @id @default(uuid())
userId String @unique
user User @relation(fields: [userId], references: [id])
}