package com.slodon.b2b2c.investment.bean.analysis.vo;

import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author sunshihao
 * @version 1.0
 * @description: TODO
 * @date 2025/8/29 14:23
 */
@Data
public class CompanyEntity {
    /**
     * 主键ID（自增）
     */
    private Integer id;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 创建时间
     */
    private String reportTime;

    /**
     * 查询月（格式：YYYYMM，如202310）
     */
    private String queryMonth;
    /**
     * 本月消耗次数
     */
    private int usedCount;
    /**
     * 本月剩余次数
     */
    private int leftCount;
    /**
     * pdf地址
     */
    private String pdfUrl;

    /**
     * CompanyEntity的Builder构造器
     */
    public static class Builder {
        private Integer id;
        private String companyName;
        private String phone;
        private LocalDateTime createTime;
        private String queryMonth;
        private String pdfUrl;
        private int usedCount;
        private int leftCount;

        public Builder id(Integer id) {
            this.id = id;
            return this;
        }

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

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

        public Builder createTime(LocalDateTime createTime) {
            this.createTime = createTime;
            return this;
        }

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

        public Builder usedCount(int usedCount) {
            this.usedCount = usedCount;
            return this;
        }
        public Builder leftCount(int leftCount) {
            this.leftCount = leftCount;
            return this;
        }
        public Builder pdfUrl(String pdfUrl) {
            this.pdfUrl = pdfUrl;
            return this;
        }

        public CompanyEntity build() {
            CompanyEntity companyEntity = new CompanyEntity();
            companyEntity.id = this.id;
            companyEntity.companyName = this.companyName;
            companyEntity.phone = this.phone;
            companyEntity.createTime = this.createTime;
            companyEntity.queryMonth = this.queryMonth;
            companyEntity.usedCount = this.usedCount;
            companyEntity.leftCount = this.leftCount;
            companyEntity.pdfUrl = this.pdfUrl;
            return companyEntity;
        }
    }

    public static Builder builder() {
        return new Builder();
    }
}
