econocart/src/models/class/Item.ts

57 lines
971 B
TypeScript
Raw Normal View History

import { Component, Input } from '@angular/core';
import { Unit } from "./Unit";
import { Product } from "./Product";
import 'rxjs/add/operator/map';
@Component({
})
export class Item {
2017-04-20 16:37:49 +00:00
@Input() private _pProduct: Product;
@Input() private _uUnit: Unit;
@Input() private _nAmount: number;
@Input() private _nPrice: number;
constructor() {
}
2017-04-20 16:37:49 +00:00
public get pProduct(): Product {
return this._pProduct;
}
2017-04-20 16:37:49 +00:00
public set pProduct(product: Product) {
this._pProduct = product;
}
2017-04-20 16:37:49 +00:00
public get uUnit(): Unit {
return this._uUnit;
}
2017-04-20 16:37:49 +00:00
public set uUnit(unit: Unit) {
this._uUnit = unit;
}
2017-04-20 16:37:49 +00:00
public get nAmount(): number {
return this._nAmount;
}
2017-04-20 16:37:49 +00:00
public set nAmount(amount: number) {
this._nAmount = amount;
}
2017-04-20 16:37:49 +00:00
public get nPrice(): number {
return this._nPrice;
}
2017-04-20 16:37:49 +00:00
public set nPrice(price: number) {
this._nPrice = price;
}
}