package com.xunhong.erp.turbo.user.app.executor.query;

import com.xunhong.erp.turbo.api.user.dto.qry.AdminShowQry;
import com.xunhong.erp.turbo.api.user.dto.vo.AdminVO;
import com.xunhong.erp.turbo.user.app.assembler.AdminAssembler;
import com.xunhong.erp.turbo.user.domain.entity.Admin;
import com.xunhong.erp.turbo.user.domain.gateway.AdminGateway;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class AdminShowQryExe {
	private final AdminGateway adminGateway;
	private final AdminAssembler adminAssembler;

	public AdminVO execute(AdminShowQry adminShowQry) {
		Admin admin = adminGateway.show(adminShowQry);
		return adminAssembler.toAdminVO(admin);
	}
}
