mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-11 10:27:01 +02:00
23 lines
395 B
TypeScript
23 lines
395 B
TypeScript
import { Expose, plainToClass } from "class-transformer";
|
|
import { ShareDTO } from "src/share/dto/share.dto";
|
|
|
|
export class FileDTO {
|
|
@Expose()
|
|
id: string;
|
|
|
|
@Expose()
|
|
name: string;
|
|
|
|
@Expose()
|
|
size: string;
|
|
|
|
@Expose()
|
|
url: boolean;
|
|
|
|
share: ShareDTO;
|
|
|
|
constructor(partial: Partial<FileDTO>) {
|
|
return plainToClass(FileDTO, partial, { excludeExtraneousValues: true });
|
|
}
|
|
}
|