package com.solution.algo.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.solution.common.annotation.Excel;
import com.solution.common.core.domain.BaseEntity;

/**
 * 动态规则配置对象 sys_algo_config
 * 
 * @author zouju
 * @date 2026-02-05
 */
public class SysAlgoConfig extends BaseEntity
{
    private static final long serialVersionUID = 1L;

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

    /** 算法唯一标识(Type)，用于接口路由 */
    @Excel(name = "算法唯一标识(Type)，用于接口路由")
    private String algoType;

    /** 算法名称，后台展示用 */
    @Excel(name = "算法名称，后台展示用")
    private String algoName;

    /** 执行引擎类型: GROOVY, PYTHON, JS, LUA等 */
    @Excel(name = "执行引擎类型: GROOVY, PYTHON, JS, LUA等")
    private String engineType;

    /** 参数定义模型(JSON Schema)，用于自动校验入参 */
    @Excel(name = "参数定义模型(JSON Schema)，用于自动校验入参")
    private String inputSchema;

    /** 算法脚本代码或规则表达式 */
    @Excel(name = "算法脚本代码或规则表达式")
    private String scriptContent;

    /** 算法描述 */
    @Excel(name = "算法描述")
    private String description;

    /** 状态: 1-启用, 0-禁用 */
    @Excel(name = "状态: 1-启用, 0-禁用")
    private Long status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setAlgoType(String algoType) 
    {
        this.algoType = algoType;
    }

    public String getAlgoType() 
    {
        return algoType;
    }

    public void setAlgoName(String algoName) 
    {
        this.algoName = algoName;
    }

    public String getAlgoName() 
    {
        return algoName;
    }

    public void setEngineType(String engineType) 
    {
        this.engineType = engineType;
    }

    public String getEngineType() 
    {
        return engineType;
    }

    public void setInputSchema(String inputSchema) 
    {
        this.inputSchema = inputSchema;
    }

    public String getInputSchema() 
    {
        return inputSchema;
    }

    public void setScriptContent(String scriptContent) 
    {
        this.scriptContent = scriptContent;
    }

    public String getScriptContent() 
    {
        return scriptContent;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("algoType", getAlgoType())
            .append("algoName", getAlgoName())
            .append("engineType", getEngineType())
            .append("inputSchema", getInputSchema())
            .append("scriptContent", getScriptContent())
            .append("description", getDescription())
            .append("status", getStatus())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
