package com.usky.data.model;

import com.usky.data.domain.DataLink;
import lombok.Data;

/**
 * 数据源创建/更新表单
 */
@Data
public class DbLinkCreUpForm extends DbLinkBaseForm {
    private Integer id;

    /**
     * 转换为实体对象
     */
    @Override
    public DataLink getDbLinkEntity(DbLinkBaseForm form) {
        DataLink dataLink = super.getDbLinkEntity(form);
        if (this.getId() != null) {
            dataLink.setId(this.getId());
        }
        return dataLink;
    }
}