SpartanX1 / nestjs-files

Visual Studio code extension to quickly create NestJS Files
https://marketplace.visualstudio.com/items?itemName=AbhijoyBasak.nestjs-files
MIT License
14 stars 7 forks source link

Add More Files #5

Closed denniarems closed 2 years ago

denniarems commented 4 years ago

like repository,dto,entity......

SpartanX1 commented 4 years ago

Hi @denniarems can you give examples of what the files would look like as these type of files vary according to different databases

darthgogy commented 3 years ago

It will be great to wrap entire Nest CLI. It has generate command for creating libraries, etc.

bulolo commented 3 years ago

create-role.dto.ts

import { ApiProperty } from '@nestjs/swagger'
import { IsEmail, IsMobilePhone, IsNotEmpty, IsNumber, IsOptional, IsPhoneNumber, IsString, MaxLength, MinLength } from 'class-validator'

export class CreateRoleDto {

  @ApiProperty({ description: '名称', required: true })
  @IsString()
  name: string

  @ApiProperty({ description: '部门ID', required: false })
  @IsNumber()
  dept_id: number

  @ApiProperty({ description: '备注', required: false })
  @IsString()
  remark: string

}