/*
 *      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 org.springblade.common.param.RangeParam;

import javax.validation.constraints.Min;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

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

	private static final long serialVersionUID = 1L;

	/**
	 * 商品编号
	 */
	@ApiModelProperty(value = "商品编号")
	private String goodsNo;
	/**
	 * 商品名称
	 */
	@ApiModelProperty(value = "商品名称")
	private String goodsName;
	/**
	 * 商品封面
	 */
	@ApiModelProperty(value = "商品封面")
	private String goodsCover;
	/**
	 * 商品标签
	 */
	@ApiModelProperty(value = "商品标签")
	private String goodsLable;
	/**
	 * 产地
	 */
	@ApiModelProperty(value = "产地")
	private String origin;
	/**
	 * 分类ID
	 */
	@ApiModelProperty(value = "分类ID，多个逗号分割")
	private String goodsCategoryId;
	/**
	 * 品牌ID
	 */
	@ApiModelProperty(value = "品牌ID")
	private Long brandId;
	/**
	 * 是否上架;1-是  0-否
	 */
	@ApiModelProperty(value = "是否上架;1-是  0-否")
	private Integer isSale;
	/**
	 * 上架时间
	 */
	@ApiModelProperty(value = "上架时间")
	private LocalDateTime saleTime;
	/**
	 * 是否推荐;1-是  0-否
	 */
	@ApiModelProperty(value = "是否推荐;1-是  0-否")
	private Integer isRecom;
	/**
	 * 是否热销;1-是  0-否
	 */
	@ApiModelProperty(value = "是否热销;1-是  0-否")
	private Integer isHot;
	/**
	 * 是否参加活动;1-是  0-否
	 */
	@ApiModelProperty(value = "是否参加活动;1-是  0-否")
	private Integer isActivity;
	/**
	 * 是否新品;1-是  0-否
	 */
	@ApiModelProperty(value = "是否新品;1-是  0-否")
	private Integer isNew;
	/**
	 * 是否包邮;1-是  0-否
	 */
	@ApiModelProperty(value = "是否包邮;1-是  0-否")
	private Integer isFreeShipping;
	/**
	 * 运费
	 */
	@ApiModelProperty(value = "运费")
	private BigDecimal freePrice;
	/**
	 * 总库存
	 */
	@Min(value = 0, message = "总库存不能为负数")
	@ApiModelProperty(value = "总库存")
	private Integer totalStock;
	/**
	 * 总销量
	 */
	@ApiModelProperty(value = "总销量")
	private Integer totalSales;
	/**
	 * 总浏览量
	 */
	@ApiModelProperty(value = "总浏览量")
	private Integer totalViews;
	/**
	 * 单位
	 */
	@ApiModelProperty(value = "单位")
	private String unit;
	/**
	 * 营业类型;1-自营 2-他营
	 */
	@ApiModelProperty(value = "营业类型;1-自营 2-他营")
	private Integer businessType;

	/**
	 * 专区类型;1-绿色积分专区 2-积分兑换专区 3-红色积分专区
	 */
	@ApiModelProperty(value = "专区类型;1-绿色积分专区 2-积分兑换专区 3-红色积分专区")
	private Integer zoneType;

	/**
	 * 第三方商品ID
	 */
	@ApiModelProperty(value = "第三方商品ID")
	private String thirdId;
	/**
	 * 第三方商品来源
	 */
	@ApiModelProperty(value = "第三方商品来源 1-胜天半子 2-唯品尚")
	private String source;

	/**
	 * 市场价
	 */
	@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 seckillPrice;
	/**
	 * 成本价
	 */
	@ApiModelProperty(value = "成本价")
	private BigDecimal costPrice;

	/**
	 * 折扣价
	 */
	@ApiModelProperty(value = "折扣价")
	private BigDecimal discountPrice;

	/**
	 * 利润率
	 */
	@ApiModelProperty(value = "利润率")
	private BigDecimal promotionRate;

	/**
	 * 营销利润率
	 */
	@ApiModelProperty(value = "营销利润率")
	private BigDecimal activityRate;

	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序")
	private Integer sort;

	@ApiModelProperty(value = "审核状态 0-待审核 1-通过 2-未通过")
	private Integer auditStatus;

	@ApiModelProperty(value = "审核描述")
	private String auditMessage;

	@ApiModelProperty(value = "供应商Id")
	private Long supplierId;

	@ApiModelProperty(value = "规格")
	private String goodsSpec;

	@ApiModelProperty(value = "轮播图")
	@TableField(exist = false)
	private List<String> slideshowList;

	@ApiModelProperty(value = "详情图片")
	@TableField(exist = false)
	private List<String> detailImgUrlList;

	@ApiModelProperty(value = "视频地址")
	@TableField(exist = false)
	private String videoUrl;

	@ApiModelProperty("折扣")
	private Double discount;

	@TableField(exist = false)
	@ApiModelProperty("折扣")
	private String discountRange;

	@TableField(exist = false)
	private String cid;

	@TableField(exist = false)
	private List<Long> brandIds;

	@TableField(exist = false)
	private String detailContent;
}
