package com.ruoyi.platform.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * (ExperimentIns)实体类
 *
 * @author makejava
 * @since 2023-11-09 09:48:36
 */
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@ApiModel("实验实例对象")
@Data
public class ExperimentIns implements Serializable {
    private static final long serialVersionUID = 623464560240790680L;
    @ApiModelProperty(name = "id")
    private Integer id;
    /**
     * 实验ID
     */
    @ApiModelProperty(value = "实验ID")
    private Integer experimentId;

    @ApiModelProperty(value = "Argo实例名称")
    private String argoInsName;

    @ApiModelProperty(value = "Argo命名空间")
    private String argoInsNs;

    @ApiModelProperty(value = "实例运行状态")
    private String status;

    @ApiModelProperty(value = "节点状态")
    private String nodesStatus;

    @ApiModelProperty(value = "节点结果")
    private String nodesResult;

    @ApiModelProperty(value = "节点日志")
    private String nodesLogs;

    @ApiModelProperty(value = "实验实例全局参数", notes = "以JSON字符串格式存储")
    @JsonRawValue
    private String globalParam;
    @ApiModelProperty(value = "参数记录", notes = "以JSON字符串格式存储")
    @JsonRawValue
    private String metricRecord;

    @ApiModelProperty(value = "指标数值", notes = "以JSON字符串格式存储")
    @JsonRawValue
    private String metricValue;

    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    private Date finishTime;

    @ApiModelProperty(value = "创建者")
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新者")
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "状态：0失效，1生效")
    private Integer state;


    @ApiModelProperty(value = "实验实例对应的流水线ID")
    private Long workflowId;

    @TableField(exist = false)
    private String experimentName;

}

