2018-01-24 17:33:15 +01:00
|
|
|
import { View } from './view';
|
|
|
|
|
2018-02-19 19:07:19 +01:00
|
|
|
import { Attachment } from '../domain/attachment';
|
2018-01-24 17:33:15 +01:00
|
|
|
|
|
|
|
export class AttachmentView implements View {
|
|
|
|
id: string;
|
|
|
|
url: string;
|
|
|
|
size: number;
|
|
|
|
sizeName: string;
|
|
|
|
fileName: string;
|
|
|
|
|
2018-05-17 19:25:03 +02:00
|
|
|
constructor(a?: Attachment) {
|
|
|
|
if (!a) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-01-24 17:33:15 +01:00
|
|
|
this.id = a.id;
|
|
|
|
this.url = a.url;
|
|
|
|
this.size = a.size;
|
|
|
|
this.sizeName = a.sizeName;
|
|
|
|
}
|
|
|
|
}
|