2025-01-14 21:37:31 +00:00
|
|
|
// This is your Prisma schema file,
|
|
|
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
|
|
|
|
|
|
generator client {
|
|
|
|
|
provider = "prisma-client-js"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
datasource db {
|
|
|
|
|
provider = "sqlite"
|
|
|
|
|
url = env("DATABASE_URL")
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 23:44:42 +00:00
|
|
|
enum RepoIndexingStatus {
|
|
|
|
|
NEW
|
|
|
|
|
IN_INDEX_QUEUE
|
|
|
|
|
INDEXING
|
|
|
|
|
INDEXED
|
|
|
|
|
FAILED
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-14 21:37:31 +00:00
|
|
|
model Repo {
|
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
|
name String
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
|
|
|
|
indexedAt DateTime?
|
|
|
|
|
isFork Boolean
|
|
|
|
|
isArchived Boolean
|
|
|
|
|
metadata Json
|
|
|
|
|
cloneUrl String
|
2025-01-15 00:46:36 +00:00
|
|
|
tenantId Int
|
2025-01-14 21:37:31 +00:00
|
|
|
|
2025-01-15 23:44:42 +00:00
|
|
|
repoIndexingStatus RepoIndexingStatus @default(NEW)
|
|
|
|
|
|
2025-01-14 21:37:31 +00:00
|
|
|
// The id of the repo in the external service
|
|
|
|
|
external_id String
|
|
|
|
|
// The type of the external service (e.g., github, gitlab, etc.)
|
|
|
|
|
external_codeHostType String
|
|
|
|
|
// The base url of the external service (e.g., https://github.com)
|
|
|
|
|
external_codeHostUrl String
|
|
|
|
|
|
|
|
|
|
@@unique([external_id, external_codeHostUrl])
|
|
|
|
|
}
|