using System;
using System.Web.Http;

namespace CncWebApi.Controllers
{
    /// <summary>
    /// 健康检查控制器
    /// 用于验证API服务是否正常运行
    /// </summary>
    [RoutePrefix("api")]
    public class HealthController : ApiController
    {
        /// <summary>
        /// 健康检查端点
        /// GET /api/health
        /// </summary>
        [HttpGet]
        [Route("health")]
        public IHttpActionResult Check()
        {
            return Ok(new
            {
                status = "healthy",
                timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
            });
        }
    }
}
