feat: add banner field to the restaurant model.
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Restaurant" ADD COLUMN "banner" TEXT;
|
||||||
@@ -84,6 +84,7 @@ model Restaurant {
|
|||||||
slug String @unique // used as /domain.com/slug
|
slug String @unique // used as /domain.com/slug
|
||||||
description String?
|
description String?
|
||||||
logo String? // image URL
|
logo String? // image URL
|
||||||
|
banner String?
|
||||||
ownerId String
|
ownerId String
|
||||||
owner User @relation(fields: [ownerId], references: [id])
|
owner User @relation(fields: [ownerId], references: [id])
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ export class CreateRestaurantDto {
|
|||||||
@IsString()
|
@IsString()
|
||||||
logo?: string;
|
logo?: string;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
banner?: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
template?: string;
|
template?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export class RestaurantService {
|
|||||||
slug: dto.slug,
|
slug: dto.slug,
|
||||||
description: dto.description,
|
description: dto.description,
|
||||||
logo: dto.logo,
|
logo: dto.logo,
|
||||||
|
banner: dto.banner,
|
||||||
ownerId,
|
ownerId,
|
||||||
template: dto.template ?? null,
|
template: dto.template ?? null,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user