package com.ym.mec.education.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 商品订单项
 * </p>
 *
 * @author lemeng
 * @since 2019-09-25
 */
@TableName("goods_order_item")
public class GoodsOrderItem extends Model<GoodsOrderItem> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    @TableField("goods_order_id_")
    private Long goodsOrderId;
    @TableField("goods_id_")
    private Integer goodsId;
    /**
     * 市场价
     */
    @TableField("market_price_")
    private BigDecimal marketPrice;
    /**
     * 折扣价
     */
    @TableField("discount_price_")
    private BigDecimal discountPrice;
    /**
     * 商品数量
     */
    @TableField("goods_quantity_")
    private Integer goodsQuantity;
    @TableField("create_time_")
    private Date createTime;
    @TableField("update_time_")
    private Date updateTime;


    public Long getId() {
        return id;
    }

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

    public Long getGoodsOrderId() {
        return goodsOrderId;
    }

    public GoodsOrderItem setGoodsOrderId(Long goodsOrderId) {
        this.goodsOrderId = goodsOrderId;
        return this;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public GoodsOrderItem setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
        return this;
    }

    public BigDecimal getMarketPrice() {
        return marketPrice;
    }

    public GoodsOrderItem setMarketPrice(BigDecimal marketPrice) {
        this.marketPrice = marketPrice;
        return this;
    }

    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public GoodsOrderItem setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
        return this;
    }

    public Integer getGoodsQuantity() {
        return goodsQuantity;
    }

    public GoodsOrderItem setGoodsQuantity(Integer goodsQuantity) {
        this.goodsQuantity = goodsQuantity;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public GoodsOrderItem setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public GoodsOrderItem setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "GoodsOrderItem{" +
        ", id=" + id +
        ", goodsOrderId=" + goodsOrderId +
        ", goodsId=" + goodsId +
        ", marketPrice=" + marketPrice +
        ", discountPrice=" + discountPrice +
        ", goodsQuantity=" + goodsQuantity +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
