package com.cyksj.model.views;

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

/*
 *项目名: netflix
 *文件名: UserDistributeRateView
 *创建者: JavaZou
 *创建时间:2023/5/15 10:02
 */
@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 user_plat_distribute_rate upr on upr.goods_id = g.id :distribute_id:" +
		" left join business_distribute_default_rate_config bddr on bddr.goods_id = g.id",
		where = "g.type = 1 and g.deleted is true and g.status is true and g.is_distribute is true")
public class UserDistributeRateView {

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

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

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

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