0.1.3 • Published 6 months ago

prisma-nest-dto v0.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Screenshot

prisma-nest-dto

Live Playground

A live playground is hosted on GitHub Pages.

How to install

npm install prisma-nest-dto
yarn add prisma-nest-dto

How to use

Step1 (cli generate code)

npx pnd
yarn pnd

Step2 (import DTO)

import { Controller, Get, Query, Post, Body } from "@nestjs/common";
import { YourModel as YourModelDto } from "prisma-nest-dto/dto";

@Controller("/")
export class AppController {
  constructor() {}

  @Get("foo")
  public async foo(@Query() query: YourModelDto) {
    return {};
  }

  @Post("bar")
  public async bar(@Body() body: YourModelDto) {
    return {};
  }
}

Todo list

  • Generate class-validator annotations using comment
0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago

0.0.10

6 months ago