import { IsNotEmpty, MaxLength } from 'class-validator'; import { Column, PrimaryGeneratedColumn } from 'typeorm'; import { ApiProperty } from '@nestjs/swagger'; export class User { @PrimaryGeneratedColumn() @ApiProperty({ example: 1 }) id!: number; @IsNotEmpty() @MaxLength(16) @Column() @ApiProperty({ example: 'alice07' }) displayId!: string; @IsNotEmpty() @MaxLength(16) @Column() @ApiProperty({
