mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-28 19:44:23 +01:00
42 lines
1.0 KiB
Plaintext
42 lines
1.0 KiB
Plaintext
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
model Category {
|
|
id Int @id @default(autoincrement())
|
|
title String
|
|
project Project[]
|
|
}
|
|
|
|
model Project {
|
|
id Int @id @default(autoincrement())
|
|
title String
|
|
description String
|
|
website String
|
|
thumbnail_image String?
|
|
cover_image String?
|
|
lightning_address String?
|
|
lnurl_callback_url String?
|
|
category Category @relation(fields: [category_id], references: [id])
|
|
category_id Int
|
|
votes_count Int @default(0)
|
|
vote Vote[]
|
|
created_at DateTime @default(now())
|
|
}
|
|
|
|
model Vote {
|
|
id Int @id @default(autoincrement())
|
|
project Project @relation(fields: [project_id], references: [id])
|
|
project_id Int
|
|
amount_in_sat Int
|
|
payment_request String?
|
|
payment_hash String?
|
|
preimage String?
|
|
paid Boolean @default(false)
|
|
}
|