package com.xunhong.erp.turbo.rbac.infrastructure.convert;

import com.xunhong.erp.turbo.api.rbac.dto.cmd.PermissionCreateCmd;
import com.xunhong.erp.turbo.api.rbac.dto.cmd.PermissionUpdateCmd;
import com.xunhong.erp.turbo.rbac.domain.entity.Permission;
import com.xunhong.erp.turbo.rbac.infrastructure.entity.PermissionDO;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;

@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface PermissionConvert {
	Permission toPermission(PermissionDO permissionDO);

	PermissionDO toPermissionDO(PermissionCreateCmd permissionCreateCmd);

	PermissionDO toPermissionDO(PermissionUpdateCmd permissionUpdateCmd);
}
