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 -- CreateTable
CREATE TABLE "Course" ( CREATE TABLE "Course" (
"id" SERIAL NOT NULL, "id" SERIAL NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT NOT NULL,
"image" TEXT NOT NULL,
"price" INTEGER NOT NULL DEFAULT 0, "price" INTEGER NOT NULL DEFAULT 0,
"noteId" TEXT, "noteId" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
@ -49,9 +46,6 @@ CREATE TABLE "Course" (
-- CreateTable -- CreateTable
CREATE TABLE "Resource" ( CREATE TABLE "Resource" (
"id" SERIAL NOT NULL, "id" SERIAL NOT NULL,
"title" TEXT NOT NULL,
"content" TEXT NOT NULL,
"image" TEXT,
"courseId" INTEGER, "courseId" INTEGER,
"price" INTEGER NOT NULL DEFAULT 0, "price" INTEGER NOT NULL DEFAULT 0,
"noteId" TEXT, "noteId" TEXT,

View File

@ -41,9 +41,6 @@ model Purchase {
model Course { model Course {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
title String
description String
image String
price Int @default(0) price Int @default(0)
resources Resource[] resources Resource[]
purchases Purchase[] purchases Purchase[]
@ -54,9 +51,6 @@ model Course {
model Resource { model Resource {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
title String
content String // Markdown content
image String?
course Course? @relation(fields: [courseId], references: [id]) course Course? @relation(fields: [courseId], references: [id])
courseId Int? courseId Int?
price Int @default(0) price Int @default(0)