/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.mall.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.common.base.BaseEntity;

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

/**
 * 商品规格表实体类
 *
 * @author BladeX
 * @since 2022-05-07
 */
@Data
@TableName("biz_goods_spec")
@ApiModel(value = "GoodsSpec对象", description = "商品规格表")
public class GoodsSpec extends BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 规格名称
	 */
	@ApiModelProperty(value = "规格名称")
	private String spceName;
	/**
	 * 规格编号
	 */
	@ApiModelProperty(value = "规格编号")
	private String spceNo;
	/**
	 * 商品id
	 */
	@ApiModelProperty(value = "商品id")
	private Long goodsId;
	/**
	 * 封面
	 */
	@ApiModelProperty(value = "封面")
	private String cover;
	/**
	 * 库存
	 */
	@ApiModelProperty(value = "库存")
	private Integer stock;
	/**
	 * 销量
	 */
	@ApiModelProperty(value = "销量")
	private Integer sale;
	/**
	 * 是否默认规格;1-是 0-否
	 */
	@ApiModelProperty(value = "是否默认规格;1-是 0-否")
	private Integer isDefault;
	/**
	 * 市场价
	 */
	@ApiModelProperty(value = "市场价")
	private BigDecimal marketPrice;
	/**
	 * 指导价
	 */
	@ApiModelProperty(value = "指导价")
	private BigDecimal guidePrice;
	/**
	 * 协议价
	 */
	@ApiModelProperty(value = "协议价")
	private BigDecimal agreementPrice;
	/**
	 * 营销价
	 */
	@ApiModelProperty(value = "营销价")
	private BigDecimal activityPrice;
	/**
	 * 销售价
	 */
	@ApiModelProperty(value = "销售价")
	private BigDecimal salePrice;
	/**
	 * 成本价
	 */
	@ApiModelProperty(value = "成本价")
	private BigDecimal costPrice;
	/**
	 * 利润率
	 */
	@ApiModelProperty(value = "利润率")
	private BigDecimal promotionRate;

	/**
	 * 营销利润率
	 */
	@ApiModelProperty(value = "营销利润率")
	private BigDecimal activityRate;
	/**
	 * 是否能积分抵扣;-是  0-否
	 */
	@ApiModelProperty(value = "是否能积分抵扣;1-是  0-否")
	private Integer isIntegralDeduction;
	/**
	 * 抵扣所需积分
	 */
	@ApiModelProperty(value = "抵扣所需积分")
	private BigDecimal needIntegral;
	/**
	 * 购买时获得的积分数
	 */
	@ApiModelProperty(value = "购买时获得的积分数")
	private BigDecimal obtainIntegral;
	/**
	 * 是否上架;0下架1上架
	 */
	@ApiModelProperty(value = "是否上架;0下架1上架")
	private Integer isSale;
	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序")
	private Integer sort;
	/**
	 * 利润百分比
	 */
	@ApiModelProperty(value = "利润百分比")
	private BigDecimal rate;

	/**
	 * 第三方optionId
	 */
	@ApiModelProperty(value = "第三方optionId")
	private String optionId;

	/**
	 * 是否为套装
	 */
	@ApiModelProperty(value = "是否为套装 1-是 0-否")
	private Integer isPackage;

	/**
	 * 秒杀价
	 */
	@ApiModelProperty(value = "秒杀价")
	private BigDecimal seckillPrice;

	/**
	 * 秒杀价
	 */
	@ApiModelProperty(value = "是否参与秒杀")
	private Integer inSeckill;

	/**
	 * 套装商品数量
	 */
	@ApiModelProperty(value = "套装商品数量")
	private Integer packageNum;

	@TableField(exist = false)
	private String goodsNo;

	@TableField(exist = false)
	private Integer zoneType;

	@TableField(exist = false)
	@ApiModelProperty(value = "是否可售")
	private boolean canSale = true;

	@TableField(exist = false)
	@ApiModelProperty(value = "积分兑换时需要扣除的金额")
	private BigDecimal needAmount;

	@TableField(exist = false)
	@ApiModelProperty(value = "积分兑换时需要扣除的金额")
	private BigDecimal exchangeNeedIntegral;

	@TableField(exist = false)
	private BigDecimal greenIntegral;
}
