package com.lanyuanxiaoyao.service.web.entity;

import com.lanyuanxiaoyao.service.common.entity.FlinkJob;
import com.lanyuanxiaoyao.service.common.entity.TableMeta;

/**
 * @author lanyuanxiaoyao
 * @date 2023-06-07
 */
public class VersionUpdateVO {
    private final String flinkJobId;
    private final String alias;
    private final String version;
    private final Boolean updated;
    private final Integer priority;

    private final FlinkJob flinkJob;
    private final TableMeta tableMeta;

    public VersionUpdateVO(Long flinkJobId, String alias, String version, Boolean updated, FlinkJob flinkJob, TableMeta tableMeta) {
        this.flinkJobId = flinkJobId.toString();
        this.alias = alias;
        this.version = version;
        this.updated = updated;
        this.flinkJob = flinkJob;
        this.tableMeta = tableMeta;
        this.priority = tableMeta.getPriority();
    }

    public String getFlinkJobId() {
        return flinkJobId;
    }

    public String getAlias() {
        return alias;
    }

    public String getVersion() {
        return version;
    }

    public Boolean getUpdated() {
        return updated;
    }

    public Integer getPriority() {
        return priority;
    }

    public FlinkJob getFlinkJob() {
        return flinkJob;
    }

    public TableMeta getTableMeta() {
        return tableMeta;
    }

    @Override
    public String toString() {
        return "VersionUpdateVO{" +
                "flinkJobId='" + flinkJobId + '\'' +
                ", alias='" + alias + '\'' +
                ", version='" + version + '\'' +
                ", updated=" + updated +
                ", priority=" + priority +
                ", flinkJob=" + flinkJob +
                ", tableMeta=" + tableMeta +
                '}';
    }
}
