package com.bcxin.api.interfaces.tenants.responses;

import com.bcxin.Infrastructures.entities.OperatorValueType;
import com.bcxin.Infrastructures.enums.CredentialType;
import com.bcxin.Infrastructures.enums.InvitedStatus;
import com.bcxin.Infrastructures.enums.InvitedType;
import com.bcxin.Infrastructures.enums.OccupationType;
import com.bcxin.api.interfaces.ResponseAbstract;
import lombok.Getter;

@Getter
public class InvitedToJoinQueuesGetResponse extends ResponseAbstract {
    private Long id;

    private String name;

    private String telephone;

    private String credentialType;

    private String credentialNumber;

    private OperatorValueType inviter;

    private String invitedType;

    private String departmentName;

    private String departmentId;

    private String occupationType;

    private String attendanceSiteName;

    private String invitedStatus;

    public InvitedToJoinQueuesGetResponse(Long id, String name, String telephone, CredentialType credentialType,
                                          String credentialNumber, OperatorValueType inviter, InvitedType invitedType,
                                          String departmentName,String departmentId, OccupationType occupationType, String attendanceSiteName,
                                          InvitedStatus invitedStatus) {
        this.id = id;
        this.name = name;
        this.telephone = telephone;
        if(credentialType!=null) {
            this.credentialType = credentialType.getTypeName();
        }
        this.credentialNumber = credentialNumber;
        this.inviter = inviter;
        if(invitedStatus!=null) {
            this.invitedType = invitedType.getTypeName();
        }
        this.departmentName = departmentName;
        this.departmentId = departmentId;
        if(occupationType!=null) {
            this.occupationType = occupationType.getTypeName();
        }
        this.attendanceSiteName = attendanceSiteName;
        if(invitedStatus!=null) {
            this.invitedStatus = invitedStatus.getTypeName();
        }
    }

    public static InvitedToJoinQueuesGetResponse create(Long id, String name, String telephone, CredentialType credentialType,
                                                        String credentialNumber, OperatorValueType inviter, InvitedType invitedType,
                                                        String departmentName,String departmentId, OccupationType occupationType, String attendanceSiteName,
                                                        InvitedStatus invitedStatus) {
        return new InvitedToJoinQueuesGetResponse(id, name, telephone, credentialType, credentialNumber, inviter,
                invitedType, departmentName,departmentId, occupationType, attendanceSiteName, invitedStatus);
    }
}
