package com.zioinfo.signage.controller;

import com.zioinfo.signage.common.ApiResponse;
import com.zioinfo.signage.domain.DashboardVo;
import com.zioinfo.signage.mapper.DashboardMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/dashboard")
@RequiredArgsConstructor
public class DashboardController {
    private final DashboardMapper mapper;

    @GetMapping
    public ApiResponse<DashboardVo> summary(@RequestParam(required = false) String tenantCode) {
        return ApiResponse.ok(mapper.getSummary(tenantCode));
    }
}
