mirror of
https://github.com/Art051/immich.git
synced 2025-08-11 19:29:00 +00:00
38 lines
996 B
TypeScript
38 lines
996 B
TypeScript
import { UserEntity } from '@app/infra/entities';
|
|
|
|
export class UserResponseDto {
|
|
id!: string;
|
|
email!: string;
|
|
firstName!: string;
|
|
lastName!: string;
|
|
storageLabel!: string | null;
|
|
externalPath!: string | null;
|
|
profileImagePath!: string;
|
|
shouldChangePassword!: boolean;
|
|
isAdmin!: boolean;
|
|
createdAt!: Date;
|
|
deletedAt!: Date | null;
|
|
updatedAt!: Date;
|
|
oauthId!: string;
|
|
memoriesEnabled?: boolean;
|
|
}
|
|
|
|
export function mapUser(entity: UserEntity): UserResponseDto {
|
|
return {
|
|
id: entity.id,
|
|
email: entity.email,
|
|
firstName: entity.firstName,
|
|
lastName: entity.lastName,
|
|
storageLabel: entity.storageLabel,
|
|
externalPath: entity.externalPath,
|
|
profileImagePath: entity.profileImagePath,
|
|
shouldChangePassword: entity.shouldChangePassword,
|
|
isAdmin: entity.isAdmin,
|
|
createdAt: entity.createdAt,
|
|
deletedAt: entity.deletedAt,
|
|
updatedAt: entity.updatedAt,
|
|
oauthId: entity.oauthId,
|
|
memoriesEnabled: entity.memoriesEnabled,
|
|
};
|
|
}
|