import { Controller, Get, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger';
import { AdminBillingService } from './admin-billing.service';
import { AdminAuthGuard } from '../../common/guards/admin-auth.guard';
import { AdminRoles } from '../../common/decorators/admin-roles.decorator';
import type { AdminRole } from '../../common/types/admin-role.enum';

@ApiTags('admin-billing')
@Controller('admin-api/billing')
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
export class AdminBillingController {
  constructor(private readonly svc: AdminBillingService) {}
  @Get()
  @AdminRoles('SUPER_ADMIN' as AdminRole)
  @ApiOperation({ summary: 'API 用量与费用' })
  async get() { return this.svc.getAllBilling(); }
}
