package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

/*
 *项目名: yhlxj
 *文件名: YhShopUserDistributeRateView
 *创建者: JavaZou
 *创建时间:2023/9/19 18:00
 */
@Getter
@Setter
@SearchBean(tables = "goods_don g left join goods_don_category_relate gcr on gcr.goods_id = g.id" +
		" left join goods_don_category gc on gc.id = gcr.category" +
		" left join yh_shop_user_plat_distribute_rate upr on upr.goods_id = g.id :uid:",
		where = "g.type = 1 and g.deleted is true and g.status is true and g.is_distribute is true")
public class YhShopUserDistributeRateView {

	@DbField("gcr.category")
	private Long category;

	@DbField("gc.name")
	private String categoryName;

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

	@DbField("ifnull(upr.rate,g.rate)")
	private Integer rate;
}