package com.cyksj.model.manage.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Data;

/**
 * 企微工具会话列表
 * @author chan
 * @date 2024/1/24 13:43
 */
@SearchBean(tables = " qy_msg_content q, " +
        " corp_user c, " +
        " corp_user_auth cu, " +
        " corp_follow cf ",
        where = "q.external_userid = cu.external_userid " +
                " AND cu.corp_user_id = c.id  " +
                " AND q.follow_id = cf.userid ",
        groupBy = "c.name,c.avatar,cu.external_userid ,cf.name,cf.userid,cf.avatar "
)
@Data
public class CorpQyMsgAuditChatView {
    /**
     * 外部联系人的名称
     */
    @DbField("c.name")
    private String name;

    /**
     * 外部联系人头像，代开发自建应用需要管理员授权才可以获取，第三方不可获取，上游企业不可获取下游企业客户该字段
     */
    @DbField("c.avatar")
    private String avatar;

    @DbField("cu.external_userid")
    private String externalUserid;

    /**
     * 成员名称
     */
    @DbField("cf.name")
    private String followName;

    /**
     * 成员userid
     */
    @DbField("cf.userid")
    private String followId;

    /**
     * 成员头像
     */
    @DbField("cf.avatar")
    private String followAvatar;
}
