package com.gic.haoban.manage.api.dto.chat;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.google.common.base.Objects;

import java.io.Serializable;

public class GroupChatActivityRewardDetailDTO implements Serializable {
    private static final long serialVersionUID = -78111537762472232L;

    /**
     * 社群活动奖励规则id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long chatActivityRewardId;
    /**
     * 奖励类型 1积分2成长值3卡券
     */
    private Integer rewardType;

    /**
     * 奖励内容 积分值 成长值 卡券id（逗号分隔）
     */
    private String rewardValue;
    /**
     * 奖励名称 积分名称 成长值名称 卡券名称
     */
    private String rewardName;

    public Long getChatActivityRewardId() {
        return chatActivityRewardId;
    }

    public void setChatActivityRewardId(Long chatActivityRewardId) {
        this.chatActivityRewardId = chatActivityRewardId;
    }

    public Integer getRewardType() {
        return rewardType;
    }

    public void setRewardType(Integer rewardType) {
        this.rewardType = rewardType;
    }

    public String getRewardValue() {
        return rewardValue;
    }

    public void setRewardValue(String rewardValue) {
        this.rewardValue = rewardValue;
    }

    public String getRewardName() {
        return rewardName;
    }

    public void setRewardName(String rewardName) {
        this.rewardName = rewardName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GroupChatActivityRewardDetailDTO that = (GroupChatActivityRewardDetailDTO) o;
        return Objects.equal(rewardType, that.rewardType) && Objects.equal(rewardValue, that.rewardValue);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(rewardType, rewardValue);
    }
}

