package com.zhyc.module.feed.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity;

/**
 * 配方管理对象 sg_formula_management
 *
 * @author HashMap
 * @date 2025-08-09
 */
@Setter
@Getter
public class SgFormulaManagement extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private Long userId;
    private Long deptId;
    /**
     * 配方编号
     */
    private String formulaId;

    /**
     * 饲养阶段
     */
    @Excel(name = "饲养阶段")
    private String feedStage;

    /**
     * 批号
     */
    @Excel(name = "批号")
    private String batchId;

    /**
     * 开始使用时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始使用时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useStartDate;

    /**
     * 结束使用时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束使用时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useEndDate;

    /**
     * 使用状态
     */
    @Excel(name = "使用状态")
    private String useState;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;

    /**
     * 配方列表
     */
    private List<SgFormulaList> sgFormulaList;

    /**
     * 子配方
     */
    private List<SgFormulaManagement> subFormulaList;

    /**
     * 查询类型 *
     * Sub : 子配方查询
     * query : 类型查询
     *
     */
    private String queryType;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("formulaId", getFormulaId())
                .append("feedStage", getFeedStage())
                .append("batchId", getBatchId())
                .append("useStartDate", getUseStartDate())
                .append("useEndDate", getUseEndDate())
                .append("useState", getUseState())
                .append("remark", getRemark())
                .toString();
    }
}
