package com.cyksj.model.views;

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

import java.util.Date;

/*
 *项目名: netflix
 *文件名: CorpGroupChatDetailView
 *创建者: JavaZou
 *创建时间:2023/8/8 11:59
 */
@Getter
@Setter
@SearchBean(tables = "corp_group_chat_member cm left join corp_user_follow_relation cfr on cfr.corp_user_id = cm.corp_user_id and cfr.wx_corp_id = cm.wx_corp_id" +
		" left join corp_user_tag ct on ct.relation_id = cfr.id",
		where = ":condition:",
		groupBy = "cm.user_id,group_chat_id,cm.corp_user_id,cm.group_nickname,cm.join_time")
public class CorpGroupChatDetailView {
	@DbField("cm.group_chat_id")
	private Long groupChatId;

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

	@DbField("cm.corp_user_id")
	private String corpUserId;

	@DbField("group_concat(ct.tag_name)")
	private String tagNames;

	/**
	 * 用户群里昵称
	 */
	@DbField("cm.group_nickname")
	private String groupNickname;

	@DbField("FROM_UNIXTIME(cm.join_time)")
	private Date joinTime;
}
