project setup with core files including configuration, package management, and basic structure. Added .gitignore, README, and various TypeScript types for CMS components. Implemented initial components and layouts for the application.
This commit is contained in:
45
middlelayer/types/user.ts
Normal file
45
middlelayer/types/user.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* User-Rollen für Authorization
|
||||
*/
|
||||
export enum UserRole {
|
||||
ADMIN = "admin",
|
||||
CUSTOMER = "customer",
|
||||
GUEST = "guest",
|
||||
}
|
||||
|
||||
/**
|
||||
* User-Interface
|
||||
*/
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
name: string;
|
||||
role: UserRole;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* JWT Payload
|
||||
*/
|
||||
export interface JWTPayload {
|
||||
userId: string;
|
||||
email: string;
|
||||
role: UserRole;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login Credentials
|
||||
*/
|
||||
export interface LoginCredentials {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register Data
|
||||
*/
|
||||
export interface RegisterData {
|
||||
email: string;
|
||||
password: string;
|
||||
name: string;
|
||||
}
|
||||
Reference in New Issue
Block a user