Simplify prisma schema, only store needed fields from nostr events

This commit is contained in:
austinkelsay 2024-03-14 12:40:12 -05:00
parent 2b92986964
commit 6f398f2026
2 changed files with 0 additions and 12 deletions

View File

@ -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,

View File

@ -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)