package com.yaoyuan.jiscuss.dto;

import lombok.Data;

import java.util.Date;

/** View model for one inbox entry (latest message in a conversation). */
@Data
public class InboxItem {
    private final Integer otherId;
    private final String otherUsername;
    private final String lastContent;
    private final Date lastTime;
    private final boolean hasUnread;

    public InboxItem(Integer otherId, String otherUsername, String lastContent, Date lastTime, boolean hasUnread) {
        this.otherId = otherId;
        this.otherUsername = otherUsername;
        this.lastContent = lastContent;
        this.lastTime = lastTime;
        this.hasUnread = hasUnread;
    }
}
