11 lines
176 B
TypeScript
11 lines
176 B
TypeScript
import { IsBoolean, IsNotEmpty, IsString } from 'class-validator';
|
|
|
|
export class User {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
username: string;
|
|
|
|
@IsBoolean()
|
|
isAdmin: boolean;
|
|
}
|