data.ts 292 Bytes
Newer Older
李彥志's avatar
李彥志 committed
1 2 3 4 5
export class Data {

    name: string;
    price: any;
    quantity: any;
6
    total: any;
李彥志's avatar
李彥志 committed
7 8 9 10 11 12

    constructor(name: string, price: any, quantity: any) {

        this.name = name;
        this.price = price;
        this.quantity = quantity;
13
        this.total = price * quantity;
李彥志's avatar
李彥志 committed
14 15 16 17

      }

  }