package com.ywt.domain.entity.glasses;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 订单详情表
 */
@Table(name = "goods_orders_detail")
@Entity
public class GoodsOrdersDetail implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id", insertable = false, nullable = false)
    private Integer id;

    /**
     * 对应 goods 表主键ID
     */
    @Column(name = "goods_id")
    private Integer goodsId;

    /**
     * 对应 goods_orders 表主键ID
     */
    @Column(name = "goods_orders_id")
    private Integer goodsOrdersId;

    /**
     * 眼镜名称，商品表name
     */
    @Column(name = "goods_name", nullable = false)
    private String goodsName;

    /**
     * 购买该眼镜的数量
     */
    @Column(name = "goods_number")
    private Integer goodsNumber;

    /**
     * 单价，单价 * 折扣 /100.0，单位：分
     */
    @Column(name = "goods_price")
    private Integer goodsPrice;

    /**
     * 商品图片
     */
    @Column(name = "goods_pic")
    private String goodsPic;

    /**
     * 商品规格
     */
    @Column(name = "goods_spec")
    private String goodsSpec;

    /**
     * 原购买价格，单位：分
     */
    @Column(name = "old_price")
    private Integer oldPrice;

    /**
     * 折扣，单位: % || 0
     */
    @Column(name = "discount")
    private Integer discount;

    /**
     * 真正购买价格，单价* 数量 *折扣/100.0，单位：分
     */
    @Column(name = "pay_amount")
    private Integer payAmount;

    /**
     * 类型ID，对应dict_type表主键id
     */
    @Column(name = "type_id", nullable = false)
    private Integer typeId;

    /**
     * 类型名称
     */
    @Column(name = "type_name", nullable = false)
    private String typeName = "";

    /**
     * 是否删除
     */
    @Column(name = "deleted", nullable = false)
    private Integer deleted = 0;

    /**
     * 创建时间
     */
    @Column(name = "create_time", nullable = false)
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time", nullable = false)
    private Date updateTime;


    /**
     * 商品注意事项
     */
    @Column(name = "remark")
    private String remark;


    public Integer getId() {
        return id;
    }

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

    /**
     * 对应 goods 表主键ID
     */
    public Integer getGoodsId() {
        return goodsId;
    }

    /**
     * 对应 goods 表主键ID
     */
    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    /**
     * 对应 goods_orders 表主键ID
     */
    public Integer getGoodsOrdersId() {
        return goodsOrdersId;
    }

    /**
     * 对应 goods_orders 表主键ID
     */
    public void setGoodsOrdersId(Integer goodsOrdersId) {
        this.goodsOrdersId = goodsOrdersId;
    }

    /**
     * 眼镜名称，眼镜表name
     */
    public String getGoodsName() {
        return goodsName;
    }

    /**
     * 眼镜名称，眼镜表name
     */
    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    /**
     * 购买该眼镜的数量
     */
    public Integer getGoodsNumber() {
        return goodsNumber;
    }

    /**
     * 购买该眼镜的数量
     */
    public void setGoodsNumber(Integer goodsNumber) {
        this.goodsNumber = goodsNumber;
    }

    /**
     * 单价，单位：分
     */
    public Integer getGoodsPrice() {
        return goodsPrice;
    }

    /**
     * 单价，单位：分
     */
    public void setGoodsPrice(Integer goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    /**
     * 商品图片
     */
    public String getGoodsPic() {
        return goodsPic;
    }

    /**
     * 商品图片
     */
    public void setGoodsPic(String goodsPic) {
        this.goodsPic = goodsPic;
    }

    public String getGoodsSpec() {
        return goodsSpec;
    }

    public void setGoodsSpec(String goodsSpec) {
        this.goodsSpec = goodsSpec;
    }

    /**
     * 原购买价格，单位：分
     */
    public Integer getOldPrice() {
        return oldPrice;
    }

    /**
     * 原购买价格，单位：分
     */
    public void setOldPrice(Integer oldPrice) {
        this.oldPrice = oldPrice;
    }

    /**
     * 折扣，单位: % || 0
     */
    public Integer getDiscount() {
        return discount;
    }

    /**
     * 折扣，单位: % || 0
     */
    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    /**
     * 真正购买价格，单价* 数量 *折扣/100.0，单位：分
     */
    public Integer getPayAmount() {
        return payAmount;
    }

    /**
     * 真正购买价格，单价* 数量 *折扣/100.0，单位：分
     */
    public void setPayAmount(Integer payAmount) {
        this.payAmount = payAmount;
    }

    /**
     * 类型ID，对应dict_type表主键id
     */
    public Integer getTypeId() {
        return typeId;
    }

    /**
     * 类型ID，对应dict_type表主键id
     */
    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    /**
     * 类型名称
     */
    public String getTypeName() {
        return typeName;
    }

    /**
     * 类型名称
     */
    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    /**
     * 是否删除
     */
    public Integer getDeleted() {
        return deleted;
    }

    /**
     * 是否删除
     */
    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String toString() {
        return "GoodsOrdersDetail{id=" + id +
                ", goodsId=" + goodsId +
                ", goodsOrdersId=" + goodsOrdersId +
                ", goodsName=" + goodsName +
                ", goodsNumber=" + goodsNumber +
                ", goodsPrice=" + goodsPrice +
                ", goodsPic=" + goodsPic +
                ", oldPrice=" + oldPrice +
                ", discount=" + discount +
                ", payAmount=" + payAmount +
                ", typeId=" + typeId +
                ", typeName=" + typeName +
                ", deleted=" + deleted +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                "}";
    }
}