package com.cyksj.model.views;

/**
 * 项目名: yhlxj
 * 文件名: UserDistributeBusinessGeneralRateView
 * 创建者: JavaZou
 * 创建时间:2023/11/8 14:47
 */

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

/*
 *项目名: netflix
 *文件名: UserDistributeBusinessRateRecordView
 *创建者: JavaZou
 *创建时间:2023/3/27 15:53
 */
@Getter
@Setter
@SearchBean(tables = "goods_don g left join goods_don_sku gdk on gdk.goods_id = g.id" +
		" left join user_distribute_business_general_rate ur on ur.sku_id = gdk.id",
		where = "g.deleted is true and g.status is true and g.is_distribute is true and gdk.status is true")
public class UserDistributeBusinessGeneralRateView {
	@DbField("ur.id")
	private Long id;

	/**
	 * 平台id
	 */
	@DbField("g.id")
	private Long goodsId;

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

	/**
	 * 规格id
	 */
	@DbField("gdk.id")
	private Long skuId;

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

	/**
	 * 首单提成比例
	 */
	@DbField("ifnull(ur.first_order_rate,0)")
	private Integer firstOrderRate;

	/**
	 * 首单续费提成比例
	 */
	@DbField("ifnull(ur.renew_order_rate,0)")
	private Integer renewOrderRate;

	@DbField("g.type")
	private Integer type;
}

