package org.springblade.modules.finance.entity;

import java.math.BigDecimal;

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

/**
 * 团购商品订单表实体类
 *
 * @author zzyd
 * @since 2023-06-06
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("t_order_groupon_goods")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "OrderGrouponGoods对象", description = "团购商品订单表")
public class OrderGrouponGoods extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 订单id
	*/
	@ApiModelProperty(value = "订单id")
	private Long orderId;
	/**
	* 商品ID
	*/
	@ApiModelProperty(value = "商品ID")
	private Long goodsId;
	/**
	* 商品数量
	*/
	@ApiModelProperty(value = "商品数量")
	private Integer goodsNum;

	/**
	* 商品金额
	*/
	@ApiModelProperty(value = "商品金额")
	private BigDecimal goodsPrice;
	/**
	* 商品名称
	*/
	@ApiModelProperty(value = "商品名称")
	private String goodsName;
	/**
	* 商品图片
	*/
	@ApiModelProperty(value = "商品图片")
	private String goodsImage;
	/**
	* 供应商ID
	*/
	@ApiModelProperty(value = "供应商ID")
	private Long supplierId;

	@ApiModelProperty(value = "是否售后")
	private Integer isAfterSales;

	@ApiModelProperty(value = "售后商品数量")
	private Integer afterSalesGoodsNum;

	@ApiModelProperty(value = "退款商品总数量")
	private Integer refundGoodsNumTotal;

	@ApiModelProperty(value = "是否退款")
	private Integer isRefund;

	/**
	 * 商品规格
	 */
	@ApiModelProperty(value = "商品规格")
	private String goodsSpec;
	/**
	 * 商品编号
	 */
	@ApiModelProperty(value = "商品编号")
	private String goodsNo;

	@TableField(exist = false)
	private Integer refundGoodsNum;

	public OrderGrouponGoods(Long orderId, Long goodsId, Integer goodsNum, BigDecimal goodsPrice, String goodsName, String goodsImage, Long supplierId, Integer isAfterSales, Integer afterSalesGoodsNum, Integer isRefund, String goodsSpec, String goodsNo) {
		this.orderId = orderId;
		this.goodsId = goodsId;
		this.goodsNum = goodsNum;
		this.goodsPrice = goodsPrice;
		this.goodsName = goodsName;
		this.goodsImage = goodsImage;
		this.supplierId = supplierId;
		this.isAfterSales = isAfterSales;
		this.afterSalesGoodsNum = afterSalesGoodsNum;
		this.isRefund = isRefund;
		this.goodsSpec = goodsSpec;
		this.goodsNo = goodsNo;
	}
}
