ruch
Version:
Revolutionary React TypeScript CLI with hexagonal architecture & AI-powered development assistance. Create maintainable, scalable applications with domain-driven design and integrated AI tooling.
59 lines (51 loc) • 1.08 kB
text/typescript
/**
* User domain entities
*/
export interface User {
id: string;
email: string;
firstName: string;
lastName: string;
role: 'customer' | 'admin' | 'vendor';
isActive: boolean;
createdAt: string;
updatedAt: string;
profile?: UserProfile;
}
export interface UserProfile {
avatar?: string;
phone?: string;
dateOfBirth?: string;
preferences: UserPreferences;
}
export interface UserPreferences {
newsletter: boolean;
notifications: boolean;
language: 'en' | 'fr' | 'es';
currency: 'USD' | 'EUR' | 'GBP';
}
export interface UserCreationData {
email: string;
firstName: string;
lastName: string;
password: string;
role?: 'customer' | 'admin' | 'vendor';
}
export interface UserUpdateData {
firstName?: string;
lastName?: string;
profile?: Partial<UserProfile>;
}
/**
* Authentication related entities
*/
export interface AuthUser {
user: User;
token: string;
refreshToken: string;
}
export interface LoginCredentials {
email: string;
password: string;
}
export interface RegisterData extends UserCreationData {}