mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
34 lines
778 B
PHP
34 lines
778 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\GraphQL\Definition\Fields\Wiki\Audio;
|
|
|
|
use App\Contracts\GraphQL\Fields\DeprecatedField;
|
|
use App\GraphQL\Definition\Fields\Base\CountAggregateField;
|
|
use App\Models\Wiki\Audio;
|
|
|
|
class AudioViewsCountField extends CountAggregateField implements DeprecatedField
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct(Audio::RELATION_VIEW_AGGREGATE, 'viewsCount');
|
|
}
|
|
|
|
/**
|
|
* The description of the field.
|
|
*/
|
|
public function description(): string
|
|
{
|
|
return 'The number of views recorded for the resource';
|
|
}
|
|
|
|
/**
|
|
* The reason which the field is deprecated.
|
|
*/
|
|
public function deprecationReason(): string
|
|
{
|
|
return 'We will no longer track views.';
|
|
}
|
|
}
|