Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
feat: add flag product schema and dto
Browse files Browse the repository at this point in the history
  • Loading branch information
EjembiEmmanuel committed Nov 27, 2024
1 parent c029707 commit 637108e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ model manufacturer {
isVerified Boolean @default(false)
createdAt DateTime @default(now())
}

model flaggedProduct {
id String @id @default(uuid())
name String
image String
reason String
}
15 changes: 15 additions & 0 deletions backend/src/product/dto/flag-product.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { IsNotEmpty, IsString } from '@nestjs/class-validator';

export class FlagProductDto {
@IsNotEmpty()
@IsString()
name: string;

@IsNotEmpty()
@IsString()
image: string;

@IsNotEmpty()
@IsString()
reason: string;
}

0 comments on commit 637108e

Please sign in to comment.