package cn.reghao.tnb.file.app.zdisk.model.query;

import lombok.Getter;
import lombok.Setter;

/**
 * @author reghao
 * @date 2025-08-29 20:09:08
 */
@Getter
@Setter
public class DiskQuery {
    private Integer pageNumber;
    private Integer pageSize;
    private Integer fileType;
    private Long owner;
    private String pid;
    private String fileId;
    private String path;
    private String sha256sum;
    private String pathPrefix;

    private DiskQuery(Builder builder) {
        this.pageNumber = builder.pageNumber;
        this.pageSize = builder.pageSize;
        this.fileType = builder.fileType;
        this.owner = builder.owner;
        this.pid = builder.pid;
        this.fileId = builder.fileId;
        this.path = builder.path;
        this.sha256sum = builder.sha256sum;
        this.pathPrefix = builder.pathPrefix;
    }

    public static final class Builder {
        private Integer pageNumber;
        private Integer pageSize;
        private Integer fileType;
        private Long owner;
        private String pid;
        private String fileId;
        private String path;
        private String sha256sum;
        private String pathPrefix;

        public Builder() {
        }

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

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

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

        public Builder owner(long owner) {
            this.owner = owner;
            return this;
        }

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

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

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

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

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

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