package com.xueyi.system.resource.manager.impl;

import com.xueyi.common.core.constant.basic.OperateConstants;
import com.xueyi.common.web.entity.domain.SlaveRelation;
import com.xueyi.system.resource.domain.po.DmBackgroundPo;
import com.xueyi.system.resource.domain.dto.DmBackgroundDto;
import com.xueyi.system.resource.domain.query.DmBackgroundQuery;
import com.xueyi.system.resource.domain.model.DmBackgroundConverter;
import com.xueyi.system.resource.mapper.DmBackgroundMapper;
import com.xueyi.common.web.entity.manager.impl.BaseManagerImpl;
import com.xueyi.system.resource.manager.IDmBackgroundManager;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

import static com.xueyi.system.resource.domain.merge.MergeGroup.Background_Resource_GROUP;

/**
 * 背景图素材管理 数据封装层处理
 *
 * @author xueyi
 */
@Component
public class DmBackgroundManager extends BaseManagerImpl<DmBackgroundQuery, DmBackgroundDto, DmBackgroundPo, DmBackgroundMapper, DmBackgroundConverter> implements IDmBackgroundManager {

    @Override
    protected List<SlaveRelation> subRelationInit() {
        List result = new ArrayList<SlaveRelation>();
        result.add(new SlaveRelation(Background_Resource_GROUP,DmResourcesManager.class, OperateConstants.SubOperateLimit.ONLY_SEL));
        return result;
    }
}