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

import lombok.Getter;
import lombok.Setter;

/**
 * @author reghao
 * @date 2025-08-29 20:09:08
 */
@Getter
@Setter
public class FileQuery {
    private Integer pageNumber;
    private Integer pageSize;
    private Integer fileType;
    private Long owner;
    private String objectName;
    private String objectId;
    private String sha256sum;

    private FileQuery(Builder builder) {
        this.pageNumber = builder.pageNumber;
        this.pageSize = builder.pageSize;
        this.fileType = builder.fileType;
        this.owner = builder.owner;
        this.objectName = builder.objectName;
        this.objectId = builder.objectId;
        this.sha256sum = builder.sha256sum;
    }

    public static final class Builder {
        private Integer pageNumber;
        private Integer pageSize;
        private Integer fileType;
        private Long owner;
        private String objectName;
        private String objectId;
        private String sha256sum;

        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 objectName(String objectName) {
            this.objectName = objectName;
            return this;
        }

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

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

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