package com.zioinfo.kintex.health;

import com.zioinfo.kintex.common.ApiResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.OffsetDateTime;
import java.util.Map;

/** 헬스체크 — 인증 불필요(SecurityConfig permitAll). 배포 검증(DEP)·모니터링용. */
@RestController
@RequestMapping("/health")
public class HealthController {

    @GetMapping
    public ApiResponse<Map<String, Object>> health() {
        return ApiResponse.ok(Map.of(
                "status", "UP",
                "service", "kintex-backend",
                "time", OffsetDateTime.now().toString()
        ));
    }
}
