add auth and user handling
This commit is contained in:
parent
db057ce342
commit
1fce467571
19 changed files with 356 additions and 32 deletions
|
|
@ -0,0 +1,5 @@
|
|||
export abstract class AbstractDto {
|
||||
id: string;
|
||||
createdAt?: Date;
|
||||
updatedAt?: Date;
|
||||
}
|
||||
9
src/dtos/CreateUserRequestDto.ts
Normal file
9
src/dtos/CreateUserRequestDto.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { UserDto } from "./UserDto";
|
||||
|
||||
/**
|
||||
* DTO used for user creation
|
||||
*/
|
||||
export class CreateUserRequestDto {
|
||||
userData: UserDto;
|
||||
password: string;
|
||||
}
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
export class UserDto {
|
||||
id: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
userName: string;
|
||||
email: string;
|
||||
role: string;
|
||||
import { AbstractDto } from "./AbstractDto";
|
||||
|
||||
export class UserDto extends AbstractDto {
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
userName: string;
|
||||
email: string;
|
||||
role: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue