package com.luojia_channel.modules.interact.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "聊天列表项DTO")
public class ChatItemDTO {
    @Schema(
            description = "聊天对象的用户ID",
            required = true,
            example = "123456"
    )
    private Long chatUserId;

    @Schema(
            description = "聊天对象的头像URL",
            example = "https://example.com/avatar.jpg"
    )
    private String avatar;

    @Schema(
            description = "聊天对象的用户名",
            required = true,
            example = "张三"
    )
    private String username;

    @Schema(
            description = "最新消息内容",
            required = true,
            maxLength = 500,
            example = "今天下午开会"
    )
    private String latestMessage;

    @Schema(
            description = "最新消息时间",
            required = true,
            example = "2023-10-15T14:30:00"
    )
    private LocalDateTime latestTime;
}
