mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-05 08:42:02 +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,
|
"title" TEXT NOT NULL,
|
||||||
"description" TEXT NOT NULL,
|
"description" TEXT NOT NULL,
|
||||||
"image" TEXT NOT NULL,
|
"image" TEXT NOT NULL,
|
||||||
"isFree" BOOLEAN NOT NULL DEFAULT false,
|
"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,
|
||||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||||
@ -53,6 +53,7 @@ CREATE TABLE "Resource" (
|
|||||||
"content" TEXT NOT NULL,
|
"content" TEXT NOT NULL,
|
||||||
"image" TEXT,
|
"image" TEXT,
|
||||||
"courseId" INTEGER,
|
"courseId" INTEGER,
|
||||||
|
"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,
|
||||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
"updatedAt" TIMESTAMP(3) NOT NULL,
|
@ -44,7 +44,7 @@ model Course {
|
|||||||
title String
|
title String
|
||||||
description String
|
description String
|
||||||
image String
|
image String
|
||||||
isFree Boolean @default(false)
|
price Int @default(0)
|
||||||
resources Resource[]
|
resources Resource[]
|
||||||
purchases Purchase[]
|
purchases Purchase[]
|
||||||
noteId String? @unique
|
noteId String? @unique
|
||||||
@ -59,6 +59,7 @@ model Resource {
|
|||||||
image String?
|
image String?
|
||||||
course Course? @relation(fields: [courseId], references: [id])
|
course Course? @relation(fields: [courseId], references: [id])
|
||||||
courseId Int?
|
courseId Int?
|
||||||
|
price Int @default(0)
|
||||||
purchases Purchase[]
|
purchases Purchase[]
|
||||||
noteId String? @unique
|
noteId String? @unique
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user