package server.logic.ws_protocol.JSON.handlers.channels.entyties;

import server.logic.ws_protocol.JSON.entyties.Net_Response;

import java.util.ArrayList;
import java.util.List;

public class Net_GetGroupDialog_Response extends Net_Response {
    private GroupInfo group;
    private List<MessageItem> messages = new ArrayList<>();

    public GroupInfo getGroup() { return group; }
    public void setGroup(GroupInfo group) { this.group = group; }
    public List<MessageItem> getMessages() { return messages; }
    public void setMessages(List<MessageItem> messages) { this.messages = messages; }

    public static class GroupInfo {
        private String ownerLogin;
        private String ownerBlockchainName;
        private int channelRootBlockNumber;
        private String channelName;
        private String chatTitle;

        public String getOwnerLogin() { return ownerLogin; }
        public void setOwnerLogin(String ownerLogin) { this.ownerLogin = ownerLogin; }
        public String getOwnerBlockchainName() { return ownerBlockchainName; }
        public void setOwnerBlockchainName(String ownerBlockchainName) { this.ownerBlockchainName = ownerBlockchainName; }
        public int getChannelRootBlockNumber() { return channelRootBlockNumber; }
        public void setChannelRootBlockNumber(int channelRootBlockNumber) { this.channelRootBlockNumber = channelRootBlockNumber; }
        public String getChannelName() { return channelName; }
        public void setChannelName(String channelName) { this.channelName = channelName; }
        public String getChatTitle() { return chatTitle; }
        public void setChatTitle(String chatTitle) { this.chatTitle = chatTitle; }
    }

    public static class MessageItem {
        private String authorLogin;
        private String authorBlockchainName;
        private int blockNumber;
        private String blockHash;
        private long createdAtMs;
        private String text;

        public String getAuthorLogin() { return authorLogin; }
        public void setAuthorLogin(String authorLogin) { this.authorLogin = authorLogin; }
        public String getAuthorBlockchainName() { return authorBlockchainName; }
        public void setAuthorBlockchainName(String authorBlockchainName) { this.authorBlockchainName = authorBlockchainName; }
        public int getBlockNumber() { return blockNumber; }
        public void setBlockNumber(int blockNumber) { this.blockNumber = blockNumber; }
        public String getBlockHash() { return blockHash; }
        public void setBlockHash(String blockHash) { this.blockHash = blockHash; }
        public long getCreatedAtMs() { return createdAtMs; }
        public void setCreatedAtMs(long createdAtMs) { this.createdAtMs = createdAtMs; }
        public String getText() { return text; }
        public void setText(String text) { this.text = text; }
    }
}

