27 lines
825 B
TypeScript
27 lines
825 B
TypeScript
import InventoryItem from "@/store/classes/InventoryItem";
|
|
|
|
export default class Camera extends InventoryItem {
|
|
|
|
private ADD_FIELDS = ['_light_measure_method', 'mount_key',
|
|
'buildtype_key', 'media_key', 'year_manufactured_from', 'year_manufactured_to']
|
|
|
|
private _light_measure_method: string;
|
|
private _mount_key: string;
|
|
private _buildtype_key: string;
|
|
private _media_key: string;
|
|
|
|
|
|
private _year_manufactured_from: string;
|
|
private _year_manufactured_to: string;
|
|
|
|
constructor(id:string, name:string, values?:Object) {
|
|
super(id, name, values);
|
|
this._item_type = "camera";
|
|
|
|
if(typeof values != "undefined") {
|
|
for (const field of this.ADD_FIELDS) {
|
|
if(field in values) this["_" + field] = values[field];
|
|
}
|
|
}
|
|
}
|
|
} |