package com.cyksj.model.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ejlchina.searcher.bean.DbIgnore;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.List;

/**
 * 项目名: yhlxj
 * 文件名: GoodsWholesale
 * 创建者: JavaZou
 * 创建时间:2024/8/21 15:48
 */
@Getter
@Setter
public class GoodsWholesale extends BaseEntity{
	private Long goodsId;

	private Long skuId;

	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private String skuName;

	private String config;

	@DbIgnore
	@TableField(exist = false)
	private List<GoodsWholesaleConfig> wholesaleConfig;

	/**
	 * 返差价
	 */
	private Boolean isReturn;

	/**
	 * 图片
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private String picture;

	private Integer sorted;

	private Boolean status;

	private Boolean deleted;

	@Getter
	@Setter
	public static class GoodsWholesaleConfig {
		/**
		 * 开始个数
		 */
		private Integer start;

		/**
		 * 结束个数
		 * 填999就代表无穷大
		 */
		private Integer end;

		/**
		 * 每个单价
		 */
		private BigDecimal single;
	}
}
