Commit 29429fec authored by Laurent's avatar Laurent

add item model

parent 387f0698
import {Record} from '../models/';
export class Item {
protected _barcode: string;
protected _record: Record;
public constructor(barcode: string) {
this._barcode = barcode;
this._record = new Record();
}
public getBarcode(): string {
return this._barcode;
}
public setRecordId(id: string): this {
this._record.setId(id);
return this;
}
public setThumbnailUrl(url: string): this {
this._record.setThumbnailUrl(url);
return this;
}
public setTitle(title: string): this {
this._record.setTitle(title);
return this;
}
public setAuthor(author: string): this {
this._record.setAuthor(author);
return this;
}
public getThumbnailUrl(): string {
return this._record.getThumbnailUrl();
}
get thumbnail_url(): string {
return this.getThumbnailUrl();
}
get barcode(): string {
return this._barcode;
}
public getTitle(): string {
return this._record.getTitle();
}
get title(): string {
return this.getTitle();
}
public getAuthor(): string {
return this._record.getAuthor();
}
get author(): string {
return this.getAuthor();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment