Files
sell/middlelayer/types/user.ts

46 lines
594 B
TypeScript

/**
* 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;
}