mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-03 15:52:03 +00:00
Simplify prisma schema, only store needed fields from nostr events
This commit is contained in:
parent
2b92986964
commit
6f398f2026
@ -35,9 +35,6 @@ CREATE TABLE "Purchase" (
|
||||
-- CreateTable
|
||||
CREATE TABLE "Course" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"description" TEXT NOT NULL,
|
||||
"image" TEXT NOT NULL,
|
||||
"price" INTEGER NOT NULL DEFAULT 0,
|
||||
"noteId" TEXT,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
@ -49,9 +46,6 @@ CREATE TABLE "Course" (
|
||||
-- CreateTable
|
||||
CREATE TABLE "Resource" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"content" TEXT NOT NULL,
|
||||
"image" TEXT,
|
||||
"courseId" INTEGER,
|
||||
"price" INTEGER NOT NULL DEFAULT 0,
|
||||
"noteId" TEXT,
|
@ -41,9 +41,6 @@ model Purchase {
|
||||
|
||||
model Course {
|
||||
id Int @id @default(autoincrement())
|
||||
title String
|
||||
description String
|
||||
image String
|
||||
price Int @default(0)
|
||||
resources Resource[]
|
||||
purchases Purchase[]
|
||||
@ -54,9 +51,6 @@ model Course {
|
||||
|
||||
model Resource {
|
||||
id Int @id @default(autoincrement())
|
||||
title String
|
||||
content String // Markdown content
|
||||
image String?
|
||||
course Course? @relation(fields: [courseId], references: [id])
|
||||
courseId Int?
|
||||
price Int @default(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user