mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
refactor(nestjs): Implement users module
This commit is contained in:
16
packages/server/src/modules/UsersModule/dtos/EditUser.dto.ts
Normal file
16
packages/server/src/modules/UsersModule/dtos/EditUser.dto.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { IsEmail, IsNotEmpty } from 'class-validator';
|
||||
|
||||
export class EditUserDto {
|
||||
@IsNotEmpty()
|
||||
firstName: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
lastName: string;
|
||||
|
||||
@IsEmail()
|
||||
@IsNotEmpty()
|
||||
email: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
roleId: number;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { IsNotEmpty, IsNumber, IsString } from 'class-validator';
|
||||
|
||||
export class InviteUserDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
firstName: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
lastName: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
password: string;
|
||||
}
|
||||
|
||||
|
||||
export class SendInviteUserDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
email: string;
|
||||
|
||||
@IsNumber()
|
||||
@IsNotEmpty()
|
||||
roleId: number;
|
||||
}
|
||||
Reference in New Issue
Block a user