package com.cyksj.model.views;

import com.cyksj.model.entity.GoodsWholesale;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

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

/**
 * 项目名: yhlxj
 * 文件名: GoodsWholesaleView
 * 创建者: JavaZou
 * 创建时间:2024/8/29 12:07
 */
@Getter
@Setter
@SearchBean(tables = "goods_wholesale gw left join goods_don g on g.id = gw.goods_id" +
		" left join goods_don_sku sku on sku.id = gw.sku_id",
		where = "gw.deleted is true")
public class GoodsWholesaleView {
	@DbField("gw.id")
	private Long id;

	@DbField("g.id")
	private Long goodsId;

	@DbField("g.title")
	private String title;

	@DbField("sku.id")
	private Long skuId;

	@DbField("sku.spec_val")
	private String specVal;

	@DbField("gw.sku_name")
	private String skuName;

	@DbField("sku.price")
	private BigDecimal price;

	@DbField("gw.status")
	private Boolean status;

	@DbField("gw.sorted")
	private Integer sorted;

	@DbField("gw.config")
	private String config;

	@DbIgnore
	private List<GoodsWholesale.GoodsWholesaleConfig> wholesaleConfig;

	/**
	 * 返差价
	 */
	@DbField("gw.is_return")
	private Boolean isReturn;

	/**
	 * 图片
	 */
	@DbField("gw.picture")
	private String picture;

	@DbField("gw.created_time")
	private Date createdTime;

	@DbField("gw.update_time")
	private Date updateTime;
}
