
package cn.orionsec.ops.mapping.machine;

import cn.orionsec.kit.lang.utils.convert.TypeStore;
import cn.orionsec.ops.entity.domain.MachineGroupDO;
import cn.orionsec.ops.entity.vo.machine.MachineGroupTreeVO;

public class MachineGroupConversion {

    static {
        TypeStore.STORE.register(MachineGroupDO.class, MachineGroupTreeVO.class, p -> {
            MachineGroupTreeVO vo = new MachineGroupTreeVO();
            vo.setId(p.getId());
            vo.setParentId(p.getParentId());
            vo.setTitle(p.getGroupName());
            vo.setSort(p.getSort());
            return vo;
        });
    }

}
