package com.mosquito.project.dto;

import jakarta.validation.constraints.NotBlank;

public class RegisterCallbackRequest {
    @NotBlank
    private String trackingId;
    // 兼容tracking_id（下划线格式）
    private String tracking_id;
    private String externalUserId;
    private Long timestamp;
    private String deviceFingerprint;  // 设备指纹
    private String ip;  // 客户端IP

    /**
     * 获取trackingId，优先使用驼峰格式
     */
    public String getTrackingId() {
        return trackingId != null ? trackingId : tracking_id;
    }

    public void setTrackingId(String trackingId) { this.trackingId = trackingId; }

    /**
     * 设置tracking_id（下划线格式）
     */
    public void setTracking_id(String tracking_id) {
        this.tracking_id = tracking_id;
    }

    /**
     * 获取tracking_id（下划线格式）
     */
    public String getTracking_id() {
        return tracking_id;
    }

    public String getExternalUserId() { return externalUserId; }
    public void setExternalUserId(String externalUserId) { this.externalUserId = externalUserId; }
    public Long getTimestamp() { return timestamp; }
    public void setTimestamp(Long timestamp) { this.timestamp = timestamp; }
    public String getDeviceFingerprint() { return deviceFingerprint; }
    public void setDeviceFingerprint(String deviceFingerprint) { this.deviceFingerprint = deviceFingerprint; }
    public String getIp() { return ip; }
    public void setIp(String ip) { this.ip = ip; }
}

