package com.liquidnet.service.kylin.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.service.kylin.entity.Fields;
import com.liquidnet.service.kylin.mapper.FieldRelationMapper;
import com.liquidnet.service.kylin.mapper.FieldStatusMapper;
import com.liquidnet.service.kylin.mapper.FieldsMapper;
import com.liquidnet.service.kylin.model.FieldsModule;
import org.springframework.beans.factory.annotation.Autowired;

public class FieldsServiceImpl extends ServiceImpl<FieldsMapper, Fields> {

    @Autowired
    private FieldsMapper fieldsMapper;

    @Autowired
    private FieldStatusMapper fieldStatusMapper;

    @Autowired
    private FieldRelationMapper fieldRelationsMapper;

    public String createFiles(FieldsModule fieldsModule) {
        fieldsMapper.createFields(fieldsModule.getFields());
        fieldStatusMapper.createFieldStatus(fieldsModule.getFieldStatus());
        fieldRelationsMapper.createFieldRelations(fieldsModule.getFieldRelations());
        return "success";
    }
}
