package com.cyksj.model.views;

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.util.List;

/**
 * 项目名: yhlxj2
 * 文件名: CorpKfAccountChildView
 * 创建者: JavaZou
 * 创建时间:2025/1/13 17:42
 */
@Getter
@Setter
@SearchBean(tables = "corp_kf_account cf")
public class CorpKfAccountChildView {
	@DbField("cf.open_kf_id")
	private String openKfId;

	@DbField("cf.name")
	private String name;

	@DbIgnore
	private List<CorpKfFollowView> child;

	@Getter
	@Setter
	@SearchBean(tables = "corp_follow cf left join sys_corp_follow_relate sfr on sfr.follow_id = cf.userid" +
			" left join sys_corp_follow sf on sf.id = sfr.mid")
	public static class CorpKfFollowView{
		@DbField("cf.userid")
		private String followId;

		@DbField("cf.name")
		private String followName;

		@DbField("concat(sf.name,'(',cf.name,')')")
		private String showName;
	}
}
