package cn.reghao.tnb.message.api.dto.msg;

import lombok.Getter;
import lombok.Setter;

import jakarta.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author reghao
 * @date 2024-09-27 21:13:44
 */
@Setter
@Getter
public class BaseMessage implements Serializable {
    private static final long serialVersionUID = 1L;

    private int notifyType;
    private int msgType;
    //@NotBlank(message = "邮箱或手机号不能为空白字符串")
    private String receiver;
    private long timestamp;

    public BaseMessage(int notifyType, int msgType, String receiver) {
        this.notifyType = notifyType;
        this.msgType = msgType;
        this.receiver = receiver;
        this.timestamp = System.currentTimeMillis();
    }
}
