Added first app template
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { AuthUserDTO } from "./auth-user.dto";
|
||||
|
||||
export interface AdminUpdateUserDTO {
|
||||
authUserDTO: AuthUserDTO;
|
||||
newAuthUserDTO: AuthUserDTO;
|
||||
changePassword: boolean;
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
export enum AuthErrorMessages {
|
||||
UserIsEmpty = "User is empty",
|
||||
UserNotFound = "User not found",
|
||||
WrongPassword = "Wrong password",
|
||||
UserAlreadyExists = "User already exists",
|
||||
EMailNotConfirmed = "E-Mail not confirmed"
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
export enum AuthRoles {
|
||||
Normal = 0,
|
||||
Admin = 1
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
export class AuthUserAtrErrors {
|
||||
firstName: AuthUserAtrErrorType = new AuthUserAtrErrorType();
|
||||
lastName: AuthUserAtrErrorType = new AuthUserAtrErrorType();
|
||||
email: AuthUserAtrErrorType = new AuthUserAtrErrorType();
|
||||
password: AuthUserAtrErrorType = new AuthUserAtrErrorType();
|
||||
}
|
||||
|
||||
export class AuthUserAtrErrorType {
|
||||
wrongData: boolean = false;
|
||||
required: boolean = false;
|
||||
notConfirmed: boolean = false;
|
||||
}
|
11
frontend/login-counter/src/app/models/auth/auth-user.dto.ts
Normal file
11
frontend/login-counter/src/app/models/auth/auth-user.dto.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { AuthRoles } from "./auth-roles.enum";
|
||||
|
||||
export interface AuthUserDTO {
|
||||
id?: number;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
eMail: string;
|
||||
password: string;
|
||||
isConfirmed?: boolean
|
||||
authRole?: AuthRoles;
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
export interface EMailStringDTO {
|
||||
email: string;
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
export enum RegisterErrorMessages {
|
||||
InvalidEMail = "Invalid E-Mail",
|
||||
UserAlreadyExists = "User already exists",
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
import { AuthUserDTO } from "./auth-user.dto";
|
||||
|
||||
export interface ResetPasswordDTO {
|
||||
id: string;
|
||||
password: string;
|
||||
}
|
4
frontend/login-counter/src/app/models/auth/token.dto.ts
Normal file
4
frontend/login-counter/src/app/models/auth/token.dto.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface TokenDTO {
|
||||
token: string;
|
||||
refreshToken: string;
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
import { AuthUserDTO } from "./auth-user.dto";
|
||||
|
||||
export interface UpdateUserDTO {
|
||||
authUserDTO: AuthUserDTO;
|
||||
newAuthUserDTO: AuthUserDTO;
|
||||
}
|
Reference in New Issue
Block a user