package com.tzld.piaoquan.recommend.server.framework.candidiate;


import com.google.gson.Gson;
import lombok.Data;


/**
 * 记录召回下一路队列索引信息
 */
@Data
public class Candidate {
    private String candidateKey;
    private int candidateNum;
    private QueueName candidateQueueName;
    // 上层待合并的queue name
    private String mergeQueueName;
    private int mergeQueueNum;

    public Candidate() {
    }

    public Candidate(Candidate other) {
        this.candidateKey = other.getCandidateKey();
        this.candidateNum = other.getCandidateNum();
        this.candidateQueueName = other.getCandidateQueueName();
        this.mergeQueueName = other.getMergeQueueName();
        this.mergeQueueNum = other.getMergeQueueNum();
    }

    public Candidate deepcopy() {
        return new Candidate(this);
    }


    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}