import Item from "./item"
class Shop {
    public _list: Array<Item>
    constructor() {
        this._list = [];
    }
    parse(list: any) {
        if (!list) return;
        this._list = list.map(li => {
            return new Item(li);
        })
    }

    get list() {
        return this._list;
    }
    getListByType(type: number) {
        return this._list.filter(li => li.type == type)
    }
}
const shop = new Shop();
export default shop;
