Cài đặt tính năng thay đổi tên và mô tả tour
This commit is contained in:
Vendored
+1
@@ -330,6 +330,7 @@ let TourController = class TourController {
|
|||||||
where: { id },
|
where: { id },
|
||||||
data: {
|
data: {
|
||||||
title: body.title,
|
title: body.title,
|
||||||
|
description: body.description,
|
||||||
startDate: body.startDate ? new Date(body.startDate) : undefined,
|
startDate: body.startDate ? new Date(body.startDate) : undefined,
|
||||||
endDate: body.endDate ? new Date(body.endDate) : undefined,
|
endDate: body.endDate ? new Date(body.endDate) : undefined,
|
||||||
adultCount: body.adultCount !== undefined ? Number(body.adultCount) : undefined,
|
adultCount: body.adultCount !== undefined ? Number(body.adultCount) : undefined,
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Tour" ADD COLUMN "description" TEXT;
|
||||||
@@ -78,6 +78,7 @@ model User {
|
|||||||
model Tour {
|
model Tour {
|
||||||
id String @id @default(uuid())
|
id String @id @default(uuid())
|
||||||
title String
|
title String
|
||||||
|
description String?
|
||||||
startDate DateTime?
|
startDate DateTime?
|
||||||
endDate DateTime?
|
endDate DateTime?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
|||||||
@@ -324,6 +324,7 @@ class TourController {
|
|||||||
where: { id },
|
where: { id },
|
||||||
data: {
|
data: {
|
||||||
title: body.title,
|
title: body.title,
|
||||||
|
description: body.description,
|
||||||
startDate: body.startDate ? new Date(body.startDate) : undefined,
|
startDate: body.startDate ? new Date(body.startDate) : undefined,
|
||||||
endDate: body.endDate ? new Date(body.endDate) : undefined,
|
endDate: body.endDate ? new Date(body.endDate) : undefined,
|
||||||
adultCount: body.adultCount !== undefined ? Number(body.adultCount) : undefined,
|
adultCount: body.adultCount !== undefined ? Number(body.adultCount) : undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user