package com.ihaoin.hooloo.device.data;

import com.ihaoin.hooloo.device.data.vo.Pics;
import com.ihaoin.hooloo.device.data.vo.SkuRule;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

public class TrolleyGoods implements Serializable {
    /**
     * 自动生成id
     */
    private Long id;
    /**
     * 是否选中
     */
    private Boolean checked = true;

    /** 商品信息 */
    /**
     * 商品id
     */
    private Integer goodId;
    /**
     * 名称
     */
    private String name;
    /**
     * 介绍
     */
    private String desc;
    /**
     * 图片信息
     */
    private Pics pics;
    /**
     * 标签
     */
    private List<String> tags;

    /** 购买sku信息 */
    /**
     * sku id
     */
    private Integer skuId;
    /**
     * 状态：0-售罄，1-可售
     */
    private Integer state;
    /**
     * 默认状态：0-否，1-是
     */
    private Integer isDefault;
    /**
     * 原价
     */
    private BigDecimal price;
    /**
     * 折扣价
     */
    private BigDecimal discount;
    /**
     * SKU规格
     */
    private List<SkuRule> rules;

    /**
     * 数量
     */
    private Integer count;

    @Override
    public boolean equals(Object o) {
        if (o == null) {
            return false;
        }
        if (((TrolleyGoods) o).getId() == null) {
            return false;
        }
        return this.getId().equals(((TrolleyGoods) o).getId());
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public Integer getGoodId() {
        return goodId;
    }

    public void setGoodId(Integer goodId) {
        this.goodId = goodId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Pics getPics() {
        return pics;
    }

    public void setPics(Pics pics) {
        this.pics = pics;
    }

    public List<String> getTags() {
        return tags;
    }

    public void setTags(List<String> tags) {
        this.tags = tags;
    }

    public Integer getSkuId() {
        return skuId;
    }

    public void setSkuId(Integer skuId) {
        this.skuId = skuId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public List<SkuRule> getRules() {
        return rules;
    }

    public void setRules(List<SkuRule> rules) {
        this.rules = rules;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }
}
