package com.zsc.edu.gateway.modules.notice.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Objects;


/**
 * 消息设置
 *
 * @author harry_yao
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_message_setting")
public class MessageSetting {

    /**
     * 消息类型
     */
    @TableId
    public Long id;

    /**
     * 是否发送邮件
     */
    public Boolean email;

    /**
     * 是否发送短信
     */
    public Boolean sms;

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

    @Override
    public int hashCode() {
        return id.hashCode();
    }
}
