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
 *文件名: CorpGroupChatView
 *创建者: JavaZou
 *创建时间:2023/8/8 11:50
 */
@Getter
@Setter
@SearchBean(tables = "corp_group_chat cgc left join corp_follow cf on cf.userid = cgc.owner and cgc.wx_corp_id = cf.wx_corp_id" +
		" left join corp_group_chat_member cm on cm.group_chat_id = cgc.id",
		groupBy = "cgc.id,cgc.chat_name,cgc.chat_id,cgc.chat_id,cgc.group_create_time,cf.name")
public class CorpGroupChatView {
	@DbField("cgc.id")
	private Long id;

	/**
	 * 群名
	 */
	@DbField("cgc.chat_name")
	private String chatName;

	/**
	 * 群人数
	 */
	@DbField("count(cm.id)")
	private Integer userNUm;

	/**
	 * 群主
	 */
	@DbField("cf.name")
	private String ownerName;

	@DbField("cgc.chat_id")
	private String chatId;

	@DbField("cgc.group_create_time")
	private Date groupCreatedTime;
}
