package com.zm.order.tool.server.model;

import com.alibaba.fastjson.JSON;
import org.springframework.util.StringUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;

/**
 * @Description 内部订单商品-用于冗余到数据库
 * @Author: ph
 * @Date: 2020/1/14 18:54
 */
public class InnerOrderItem {

    private Integer isTimeDiscount;

    private Long activityId;

    private Long goodsId;

    private Long id;

    private String itemId;

    private String itemName;

    private String itemImage;

    private String itemSpec;

    private String itemUnit;

    private String itemBarcode;

    private String itemSign;

    private Integer discountAmount;

    private Integer packAmount;

    private String brandSign;

    private Integer marketPrice;

    private Integer costPrice;

    private Integer memberPrice;

    private Integer itemPrice;

    private BigDecimal num;

    private String fCode;

    private Map<String, Object> extraMap;

    private Date orderAt;

    private String productNo;

    private Integer isGift;

    /**
     * 商品类型
     * 0:普通商品 1:套餐商品 2:套餐子商品
     */
    private Integer itemType;

    /**
     * 归属商品ID
     */
    private Long ownerId;

    /**
     * 加料信息
     */
    private String batchingInfo;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 单个商品行下，商家实收金额 单位：分
     */
    private Integer incomeAmount;

    /**
     * 单个商品行下，商家承担的金额 单位：分
     */
    private Integer sellerBearAmount;

    /**
     * 单个商品行下，商家承担的手续费/服务费 单位：分
     */
    private Integer commissionAmount;

    public Integer getIncomeAmount() {
        return incomeAmount;
    }

    public void setIncomeAmount(Integer incomeAmount) {
        this.incomeAmount = incomeAmount;
    }

    public Integer getSellerBearAmount() {
        return sellerBearAmount;
    }

    public void setSellerBearAmount(Integer sellerBearAmount) {
        this.sellerBearAmount = sellerBearAmount;
    }

    public Integer getCommissionAmount() {
        return commissionAmount;
    }

    public void setCommissionAmount(Integer commissionAmount) {
        this.commissionAmount = commissionAmount;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getBatchingInfo() {
        return batchingInfo;
    }

    public void setBatchingInfo(String batchingInfo) {
        this.batchingInfo = batchingInfo;
    }

    public Integer getItemType() {
        return itemType;
    }

    public void setItemType(Integer itemType) {
        this.itemType = itemType;
    }

    public Long getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(Long ownerId) {
        this.ownerId = ownerId;
    }

    public Integer getIsTimeDiscount() {
        return isTimeDiscount;
    }

    public void setIsTimeDiscount(Integer isTimeDiscount) {
        this.isTimeDiscount = isTimeDiscount;
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public Long getId() {
        return id;
    }

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

    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        if (!StringUtils.isEmpty(itemId)) {
            this.itemId = itemId;
        }
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        if (!StringUtils.isEmpty(itemName)) {
            this.itemName = itemName;
        }
    }

    public String getItemImage() {
        return itemImage;
    }

    public void setItemImage(String itemImage) {
        if (!StringUtils.isEmpty(itemImage)) {
            this.itemImage = itemImage;
        }
    }

    public String getItemSpec() {
        return itemSpec;
    }

    public void setItemSpec(String itemSpec) {
        if (!StringUtils.isEmpty(itemSpec)) {
            this.itemSpec = itemSpec;
        }
    }

    public String getItemUnit() {
        return itemUnit;
    }

    public void setItemUnit(String itemUnit) {
        if (!StringUtils.isEmpty(itemUnit)) {
            this.itemUnit = itemUnit;
        }
    }

    public String getItemBarcode() {
        return itemBarcode;
    }

    public void setItemBarcode(String itemBarcode) {
        if (!StringUtils.isEmpty(itemBarcode)) {
            this.itemBarcode = itemBarcode;
        }
    }

    public String getItemSign() {
        return itemSign;
    }

    public void setItemSign(String itemSign) {
        if (!StringUtils.isEmpty(itemSign)) {
            this.itemSign = itemSign;
        }
    }

    public Integer getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(Integer discountAmount) {
        this.discountAmount = discountAmount;
    }

    public Integer getPackAmount() {
        return packAmount;
    }

    public void setPackAmount(Integer packAmount) {
        this.packAmount = packAmount;
    }

    public String getBrandSign() {
        return brandSign;
    }

    public void setBrandSign(String brandSign) {
        if (!StringUtils.isEmpty(brandSign)) {
            this.brandSign = brandSign;
        }
    }

    public Integer getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(Integer marketPrice) {
        this.marketPrice = marketPrice;
    }

    public Integer getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(Integer costPrice) {
        this.costPrice = costPrice;
    }

    public Integer getMemberPrice() {
        return memberPrice;
    }

    public void setMemberPrice(Integer memberPrice) {
        this.memberPrice = memberPrice;
    }

    public Integer getItemPrice() {
        return itemPrice;
    }

    public void setItemPrice(Integer itemPrice) {
        this.itemPrice = itemPrice;
    }

    public BigDecimal getNum() {
        return num;
    }

    public void setNum(BigDecimal num) {
        this.num = num;
    }

    public String getfCode() {
        return fCode;
    }

    public void setfCode(String fCode) {
        if (!StringUtils.isEmpty(fCode)) {
            this.fCode = fCode;
        }
    }

    public Map<String, Object> getExtraMap() {
        return extraMap;
    }

    public void setExtraMap(Map<String, Object> extraMap) {
        this.extraMap = extraMap;
    }

    public Date getOrderAt() {
        return orderAt;
    }

    public void setOrderAt(Date orderAt) {
        this.orderAt = orderAt;
    }

    public String getProductNo() {
        return productNo;
    }

    public void setProductNo(String productNo) {
        if (!StringUtils.isEmpty(productNo)) {
            this.productNo = productNo;
        }
    }

    public Integer getIsGift() {
        return isGift;
    }

    public void setIsGift(Integer isGift) {
        this.isGift = isGift;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
