Files
gift-planner/prisma/schema.prisma

47 lines
763 B
Plaintext

// 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"
}
model Year {
year Int @id
people Person[]
}
model Person {
id Int @id @default(autoincrement())
name String
yearId Int
year Year @relation(fields: [yearId], references: [year])
gifts Gift[]
}
model Gift {
id Int @id @default(autoincrement())
name String
url String?
description String?
price Float?
status GiftStatus @default(PLANNED)
personId Int
person Person @relation(fields: [personId], references: [id])
}
enum GiftStatus {
PLANNED
BUY
BOUGHT
WRAPPED
GIVEN
}