1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/common/entities/Photo.ts
2016-05-04 18:34:54 +02:00

13 lines
556 B
TypeScript

import {Utils} from "../Utils";
import {Directory} from "./Directory";
export class Photo {
constructor(public id:number, public name:string, public width:number, public height:number) {
}
public static getThumbnailPath(directory:Directory,photo:Photo){
return Utils.concatUrls("/api/gallery/content/",directory.path,directory.name,photo.name,"thumbnail");
}
public static getPhotoPath(directory:Directory,photo:Photo){
return Utils.concatUrls("/api/gallery/content/",directory.path,directory.name,photo.name);
}
}