mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-03 15:52:03 +00:00
Course and Resource now have prie to determine if paid or not
This commit is contained in:
parent
595c553dd2
commit
6f63062a2e
@ -38,7 +38,7 @@ CREATE TABLE "Course" (
|
||||
"title" TEXT NOT NULL,
|
||||
"description" TEXT NOT NULL,
|
||||
"image" TEXT NOT NULL,
|
||||
"isFree" BOOLEAN NOT NULL DEFAULT false,
|
||||
"price" INTEGER NOT NULL DEFAULT 0,
|
||||
"noteId" TEXT,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
@ -53,6 +53,7 @@ CREATE TABLE "Resource" (
|
||||
"content" TEXT NOT NULL,
|
||||
"image" TEXT,
|
||||
"courseId" INTEGER,
|
||||
"price" INTEGER NOT NULL DEFAULT 0,
|
||||
"noteId" TEXT,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
@ -44,7 +44,7 @@ model Course {
|
||||
title String
|
||||
description String
|
||||
image String
|
||||
isFree Boolean @default(false)
|
||||
price Int @default(0)
|
||||
resources Resource[]
|
||||
purchases Purchase[]
|
||||
noteId String? @unique
|
||||
@ -59,6 +59,7 @@ model Resource {
|
||||
image String?
|
||||
course Course? @relation(fields: [courseId], references: [id])
|
||||
courseId Int?
|
||||
price Int @default(0)
|
||||
purchases Purchase[]
|
||||
noteId String? @unique
|
||||
createdAt DateTime @default(now())
|
||||
|
Loading…
x
Reference in New Issue
Block a user