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

import cn.reghao.jutil.jdk.converter.DateTimeConverter;
import cn.reghao.tnb.message.api.constant.MsgType;
import cn.reghao.tnb.message.api.constant.NotifyType;
import lombok.Getter;

/**
 * @author reghao
 * @date 2024-04-14 12:17:00
 */
@Getter
public class LoginMessage extends BaseMessage {
    private String title;
    private String publicIp;
    private String userAgent;
    private String loginAt;

    public LoginMessage(String publicIp, String userAgent) {
        super(NotifyType.webhook.getValue(), MsgType.loginMsg.getValue(), "");
        this.title = "登入提示";
        this.publicIp = publicIp;
        this.userAgent = userAgent;
        this.loginAt = DateTimeConverter.format(System.currentTimeMillis());
    }
}
