package cn.reghao.autodop.dmaster.app.db.crud.config.impl;

import cn.reghao.autodop.dmaster.app.db.crud.config.BuildDirCrud;
import cn.reghao.autodop.dmaster.app.db.repository.config.build.BuildDirRepository;
import cn.reghao.autodop.dmaster.app.model.po.config.build.BuildDir;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author reghao
 * @date 2020-11-10 21:58:00
 */
@Service
public class BuildDirCrudImpl implements BuildDirCrud {
    private final BuildDirRepository buildDirRepository;

    public BuildDirCrudImpl(BuildDirRepository buildDirRepository) {
        this.buildDirRepository = buildDirRepository;
    }

    @Override
    public BuildDir save(BuildDir buildDir) {
        buildDirRepository.save(buildDir);
        return buildDir;
    }

    @Override
    public void saveAll(List<BuildDir> list) {
    }

    @Override
    public void update(BuildDir buildDir) {
        buildDirRepository.save(buildDir);
    }

    @Override
    public void delete(BuildDir buildDir) {
    }
}
