add pg vector and embed

This commit is contained in:
2025-08-22 19:34:54 +07:00
parent 21567a0a7c
commit b77beb2d85
27 changed files with 5273 additions and 216 deletions

View File

@@ -1,12 +1,5 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
output = "../generated/prisma"
}
datasource db {
@@ -15,13 +8,18 @@ datasource db {
}
model IcdCode {
id String @id @default(uuid())
code String @unique
id String @id @default(uuid())
code String @unique
display String
version String
category String // "ICD9" or "ICD10"
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
category String
embedding Unsupported("vector")?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
metadata Json?
content String?
@@index([embedding])
@@index([metadata], type: Gin)
@@map("icd_codes")
}