mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +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
|
-- 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,
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user