package com.cyksj.model.views;

import com.cyksj.model.entity.MiniPopularizeUserConversationChat;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 项目名: yhlxj2
 * 文件名: MiniPopularizeUserConversationImgRecordsView
 * 创建者: JavaZou
 * 创建时间:2025/4/11 17:26
 */
@Getter
@Setter
@SearchBean(tables = "mini_popularize_user_conversation mc left join mini_popularize_user_conversation_chat mr on mr.conversation_id = mc.conversation_id",
		orderBy = "mr.created_time desc")
public class MiniPopularizeUserConversationImgRecordsView {
	@DbField("mc.conversation_id")
	private String conversationId;

	@DbField("mr.id")
	private Long chatId;

	@DbField("mr.cid")
	private Long cid;

	@DbField("mc.user_id")
	@JsonIgnore
	private Long userId;

	@DbField("mr.content")
	private String content;

	@DbField("mr.role")
	private MiniPopularizeUserConversationChat.Role role;

	@DbField("mr.img")
	private String img;

	@DbField("mr.type")
	private MiniPopularizeUserConversationChat.Type type;

	@DbField("mr.status")
	private MiniPopularizeUserConversationChat.Status status;

	@DbField("ifnull(mr.created_time,mc.created_time)")
	private Date createdTime;

	@DbField("ifnull(mr.update_time,mc.update_time)")
	private Date updateTime;
}
