
package cn.orionsec.ops.mapping.webhook;

import cn.orionsec.kit.lang.utils.convert.TypeStore;
import cn.orionsec.ops.entity.domain.WebhookConfigDO;
import cn.orionsec.ops.entity.vo.webhook.WebhookConfigVO;

public class WebhookConfigConversion {

    static {
        TypeStore.STORE.register(WebhookConfigDO.class, WebhookConfigVO.class, p -> {
            WebhookConfigVO vo = new WebhookConfigVO();
            vo.setId(p.getId());
            vo.setName(p.getWebhookName());
            vo.setUrl(p.getWebhookUrl());
            vo.setType(p.getWebhookType());
            vo.setConfig(p.getWebhookConfig());
            return vo;
        });
    }

}
