import { Controller, Get } from '@nestjs/common';
import { ApiTags, ApiOperation } from '@nestjs/swagger';
import { AdminService } from './admin.service';

@ApiTags('Admin Dashboard')
@Controller('admin')
export class AdminController {
  constructor(private readonly adminService: AdminService) {}

  @Get('stats')
  @ApiOperation({ summary: 'Get dashboard stats' })
  getDashboardStats() {
    return this.adminService.getDashboardStats();
  }

  @Get('revenue')
  @ApiOperation({ summary: 'Get revenue by month' })
  getRevenueByMonth() {
    return this.adminService.getRevenueByMonth();
  }

  @Get('subscriptions-by-plan')
  @ApiOperation({ summary: 'Get subscriptions distribution' })
  getSubscriptionsByPlan() {
    return this.adminService.getSubscriptionsByPlan();
  }
}
