package com.purui.prims.headless.server.pojo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 指标血缘实体
 *
 * @author charlie
 * @date 2024/7/10
 */
@Data
public class MetricLineage {

    @ApiModelProperty(value = "指标ID")
    private Long metricId;

    @ApiModelProperty(value = "指标名称")
    private String metricName;

    @ApiModelProperty(value = "指标类型")
    private String metricType;

    @ApiModelProperty(value = "来源ID")
    private Long sourceMetricId;

    @ApiModelProperty(value = "聚合类型")
    private String aggregateType;

    @ApiModelProperty(value = "描述")
    private String description;

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

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

    @ApiModelProperty(value = "上游血缘")
    List<MetricLineage> children;


    public MetricLineage() {

    }

    public MetricLineage(Long metricId, String metricName, String metricType, Long sourceMetricId, String aggregateType,
                         String description) {
        this.metricId = metricId;
        this.metricName = metricName;
        this.metricType = metricType;
        this.sourceMetricId = sourceMetricId;
        this.aggregateType = aggregateType;
        this.description = description;
    }
}
