package com.cyksj.model.views;

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

import java.util.Date;

/*
 *项目名: yhlxj
 *文件名: YhShopView
 *创建者: JavaZou
 *创建时间:2023/9/18 10:21
 */
@Getter
@Setter
@SearchBean(tables = "yh_shop_apply_record ys left join user u on u.id = ys.user_id" +
		" left join cms_user cu on cu.id = ys.business_id")
public class YhShopView {
	@DbField("ys.id")
	private Long id;

	@DbField("ys.user_id")
	private Long userId;


	@DbField("u.nickname")
	private String nickname;

	/**
	 * 店铺名称
	 */
	@DbField("ys.name")
	private String name;

	/**
	 * 自定义id
	 */
	@DbField("ys.custom_id")
	private String customId;

	@DbField("ys.business_id")
	private Long businessId;

	@DbField("cu.nickname")
	private String businessName;

	/**
	 * 是否审核通过
	 */
	@DbField("ys.verify_status")
	private YhShopApplyRecord.Status verifyStatus;

	/**
	 * 审核失败原因
	 */
	@DbField("ys.reason")
	private String reason;

	/**
	 * 分销订单数
	 */
	@DbField("select count(*) from distribute_waiting_send_points where shared_id = ys.user_id")
	private Integer dsOrder;

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

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