package cn.reghao.tnb.search.app.model.vo;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author reghao
 * @date 2025-08-22 15:06:35
 */
@Getter
@Setter
public class VideoQuery {
    private int pageSize;
    private int pageNumber;
    private String indexName;
    private List<String> queryFiledNames;
    private List<String> highlightFiledNames;
    private String queryString;
    private List<Integer> scopes;

    public VideoQuery() {
        this.pageSize = 10;
        this.pageNumber = 1;
    }

    private VideoQuery(Builder builder) {
        this.pageSize = builder.pageSize;
        this.pageNumber = builder.pageNumber;
        this.indexName = builder.indexName;
        this.queryFiledNames = builder.queryFiledNames;
        this.highlightFiledNames = builder.highlightFiledNames;
        this.queryString = builder.queryString;
        this.scopes = builder.scopes;
    }

    public static final class Builder {
        private int pageSize;
        private int pageNumber;
        private String indexName;
        private List<String> queryFiledNames;
        private List<String> highlightFiledNames;
        private String queryString;
        private List<Integer> scopes;

        public Builder pageSize(int pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Builder pageNumber(int pageNumber) {
            this.pageNumber = pageNumber;
            return this;
        }

        public Builder indexName(String indexName) {
            this.indexName = indexName;
            return this;
        }

        public Builder queryFiledNames(List<String> queryFiledNames) {
            this.queryFiledNames = queryFiledNames;
            return this;
        }

        public Builder highlightFiledNames(List<String> highlightFiledNames) {
            this.highlightFiledNames = highlightFiledNames;
            return this;
        }

        public Builder queryString(String queryString) {
            this.queryString = queryString;
            return this;
        }

        public Builder scopes(List<Integer> scopes) {
            this.scopes = scopes;
            return this;
        }

        public VideoQuery build() {
            return new VideoQuery(this);
        }
    }
}
