package com.agri.generator.domain;

import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.agri.common.annotation.Excel;
import com.agri.common.core.domain.BaseEntity;

import javax.validation.constraints.NotNull;

/**
 * 接口基础信息对象 sys_api_info
 * 
 * @author agri
 * @date 2025-12-30
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class SysApiInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 请求路径（对应前端prop：requestPath） */
    @Excel(name = "请求路径", readConverterExp = "对=应前端prop：requestPath")
    private String requestPath;

    /** 接口类型（厂家）（对应前端prop：apiVendor） */
    @Excel(name = "接口类型", readConverterExp = "厂=家")
    private Long apiVendor;

    /** 接口说明（对应前端prop：apiDesc） */
    @Excel(name = "接口说明", readConverterExp = "对=应前端prop：apiDesc")
    private String apiDesc;

    /** 接口备注（对应前端prop：apiRemark） */
    @Excel(name = "接口备注", readConverterExp = "对=应前端prop：apiRemark")
    private String apiRemark;


    /**
     * 是否生成实体（选填，默认false）
     */
    @Excel(name = "是否生成入参实体", readConverterExp = "对=应前端prop：genRequestEntity")
    private Boolean isGenRequest = false;

    /**
     * 是否生成实体（选填，默认false）
     */
    @Excel(name = "是否生成出参实体", readConverterExp = "对=应前端prop：genResponseEntity")
    private Boolean isGenResponse = false;


    /** 逻辑删除标识（0-未删，1-已删） */
    private Integer isDeleted;

    /** 接口参数信息 */
    @Setter
    private List<SysApiParam> sysApiParamList;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("requestPath", getRequestPath())
            .append("apiVendor", getApiVendor())
            .append("apiDesc", getApiDesc())
            .append("apiRemark", getApiRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("isDeleted", getIsDeleted())
            .append("sysApiParamList", getSysApiParamList())
            .toString();
    }
}
