mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-30 04:24:26 +01:00
40 lines
965 B
Plaintext
40 lines
965 B
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?
|
|
category Category @relation(fields: [category_id], references: [id])
|
|
category_id Int
|
|
votes_count Int @default(0)
|
|
Vote Vote[]
|
|
}
|
|
|
|
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)
|
|
}
|