package com.lanyuanxiaoyao.service.web.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lanyuanxiaoyao.service.common.entity.FlinkJob;
import com.lanyuanxiaoyao.service.common.entity.TableMeta;

/**
 * 避免前段不支持java long类型的精度
 *
 * @author lanyuanxiaoyao
 * @date 2023-06-13
 */
public class FlinkJobVO {
    @JsonIgnore
    private final FlinkJob flinkJob;

    public FlinkJobVO(FlinkJob flinkJob) {
        this.flinkJob = flinkJob;
    }

    public String getId() {
        return flinkJob.getId().toString();
    }

    public String getName() {
        return flinkJob.getName();
    }

    public FlinkJob.RunMode getRunMode() {
        return flinkJob.getRunMode();
    }

    public TableMeta.YarnMeta getOneInOneSyncYarn() {
        return flinkJob.getOneInOneSyncYarn();
    }

    @Override
    public String toString() {
        return "FlinkJobVO{" +
                "flinkJob=" + flinkJob +
                '}';
    }
}
