package com.banesco.module.msg_request_header.domain.model;

import com.banesco.common.domain.model.Device;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.quarkus.runtime.annotations.RegisterForReflection;
import lombok.*;

@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@RegisterForReflection
public class ApplicantData {
    @JsonProperty("EnterpriseCode")
    private String EnterpriseCode;
    @JsonProperty("PrivateChannelId")
    private String PrivateChannelId;
    @JsonProperty("IpAddress")
    private String IpAddress;
    @JsonProperty("HostName")
    private String HostName;
    @JsonProperty("StadisticId")
    private String StadisticId;
    @JsonProperty("Application")
    private String Application;
    @JsonProperty("Nationality")
    private String Nationality;
    @JsonProperty("IdDocument")
    private String IdDocument;
    @JsonProperty("RolType")
    private String RolType;
    @JsonProperty("PlanCode")
    private String PlanCode;
    @JsonProperty("Channel")
    private String Channel;

    @JsonIgnore
    public ApplicantData withOptions(Device device) {
        this.IpAddress = device.getDeviceIp();
        return this;
    }
}
