package com.yonge.toolset.log.dal.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Objects;

@Document(collection = "im_history_message")
public class HistoryMessage implements Serializable {
    @Id
    private String msgUID;

    private String fromUserId;

    private String targetId;

    private Integer targetType;

    private String GroupId;

    private String classname;

    private String dateTime;

    private String source;

    private String isDiscard;

    private String isSensitiveWord;

    private String isForbidden;

    private String isNotForward;

    private String groupUserIds;

    private String content;

    public String getFromUserId() {
        return fromUserId;
    }

    public void setFromUserId(String fromUserId) {
        this.fromUserId = fromUserId;
    }

    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }

    public Integer getTargetType() {
        return targetType;
    }

    public void setTargetType(Integer targetType) {
        this.targetType = targetType;
    }

    public String getGroupId() {
        return GroupId;
    }

    public void setGroupId(String groupId) {
        GroupId = groupId;
    }

    public String getClassname() {
        return classname;
    }

    public void setClassname(String classname) {
        this.classname = classname;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getIsDiscard() {
        return isDiscard;
    }

    public void setIsDiscard(String isDiscard) {
        this.isDiscard = isDiscard;
    }

    public String getIsSensitiveWord() {
        return isSensitiveWord;
    }

    public void setIsSensitiveWord(String isSensitiveWord) {
        this.isSensitiveWord = isSensitiveWord;
    }

    public String getIsForbidden() {
        return isForbidden;
    }

    public void setIsForbidden(String isForbidden) {
        this.isForbidden = isForbidden;
    }

    public String getIsNotForward() {
        return isNotForward;
    }

    public void setIsNotForward(String isNotForward) {
        this.isNotForward = isNotForward;
    }

    public String getMsgUID() {
        return msgUID;
    }

    public void setMsgUID(String msgUID) {
        this.msgUID = msgUID;
    }

    public String getGroupUserIds() {
        return groupUserIds;
    }

    public void setGroupUserIds(String groupUserIds) {
        this.groupUserIds = groupUserIds;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        HistoryMessage that = (HistoryMessage) o;
        return msgUID.equals(that.msgUID);
    }

    @Override
    public int hashCode() {
        return Objects.hash(msgUID);
    }
}
