mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-06 20:55:04 +02:00
42 lines
912 B
PHP
42 lines
912 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\GraphQL\Schema\Fields\Admin\Feature;
|
|
|
|
use App\Contracts\GraphQL\Fields\DeprecatedField;
|
|
use App\Contracts\GraphQL\Fields\UpdatableField;
|
|
use App\GraphQL\Schema\Fields\StringField;
|
|
use App\Models\Admin\Feature;
|
|
|
|
class FeatureValueField extends StringField implements DeprecatedField, UpdatableField
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct(Feature::ATTRIBUTE_VALUE, nullable: false);
|
|
}
|
|
|
|
public function description(): string
|
|
{
|
|
return 'The value of the resource';
|
|
}
|
|
|
|
/**
|
|
* @param array<string, mixed> $args
|
|
*/
|
|
public function getUpdateRules(array $args): array
|
|
{
|
|
return [
|
|
'sometimes',
|
|
'required',
|
|
'string',
|
|
'max:192',
|
|
];
|
|
}
|
|
|
|
public function deprecationReason(): string
|
|
{
|
|
return 'Internal use only';
|
|
}
|
|
}
|