- Externalize all @tamagui/* and tamagui subpaths so dist no longer vendors Tamagui. - Emit TypeScript declarations with vite-plugin-dts; fix package exports types for ui/*. - Align initEnv with profiles: displayName, brandLogo, api.baseURL, themeColor, uiShell. - Stabilize tests with Node localStorage file; env tests pass. - Update README and component docs for services, menus, API client, and development.
16 lines
613 B
JavaScript
16 lines
613 B
JavaScript
export class User {
|
|
constructor(data = {}) {
|
|
this.id = data.id || null;
|
|
this.username = data.username || '';
|
|
this.display_name = data.display_name || data.displayName || '';
|
|
this.email = data.email || '';
|
|
this.image_url = data.image_url || '';
|
|
this.realm_id = data.realm_id || 'local';
|
|
this.role_ids = Array.isArray(data.role_ids) ? [...data.role_ids] : [];
|
|
this.status = data.status || 'active';
|
|
this.password_hash = data.password_hash || '';
|
|
this.created_on = data.created_on || new Date().toISOString();
|
|
this.updated_on = data.updated_on || this.created_on;
|
|
}
|
|
}
|