
package cn.orionsec.ops.mapping.alarm;

import cn.orionsec.kit.lang.utils.convert.TypeStore;
import cn.orionsec.ops.entity.domain.AlarmGroupDO;
import cn.orionsec.ops.entity.domain.AlarmGroupUserDO;
import cn.orionsec.ops.entity.vo.alarm.AlarmGroupUserVO;
import cn.orionsec.ops.entity.vo.alarm.AlarmGroupVO;


public class AlarmGroupConversion {

    static {
        TypeStore.STORE.register(AlarmGroupDO.class, AlarmGroupVO.class, p -> {
            AlarmGroupVO vo = new AlarmGroupVO();
            vo.setId(p.getId());
            vo.setName(p.getGroupName());
            vo.setDescription(p.getGroupDescription());
            return vo;
        });
    }

    static {
        TypeStore.STORE.register(AlarmGroupUserDO.class, AlarmGroupUserVO.class, p -> {
            AlarmGroupUserVO vo = new AlarmGroupUserVO();
            vo.setId(p.getId());
            vo.setUserId(p.getUserId());
            vo.setUsername(p.getUsername());
            return vo;
        });
    }

}
