mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-24 13:26:07 +02:00
48 lines
1.0 KiB
PHP
48 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\GraphQL\Schema\Fields\Wiki\Video;
|
|
|
|
use App\Contracts\GraphQL\Fields\CreatableField;
|
|
use App\Contracts\GraphQL\Fields\UpdatableField;
|
|
use App\GraphQL\Schema\Fields\BooleanField;
|
|
use App\Models\Wiki\Video;
|
|
|
|
class VideoUncenField extends BooleanField implements CreatableField, UpdatableField
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct(Video::ATTRIBUTE_UNCEN, nullable: false);
|
|
}
|
|
|
|
public function description(): string
|
|
{
|
|
return 'Is the video an uncensored version of a censored sequence?';
|
|
}
|
|
|
|
/**
|
|
* @param array<string, mixed> $args
|
|
*/
|
|
public function getCreationRules(array $args): array
|
|
{
|
|
return [
|
|
'sometimes',
|
|
'required',
|
|
'boolean',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @param array<string, mixed> $args
|
|
*/
|
|
public function getUpdateRules(array $args): array
|
|
{
|
|
return [
|
|
'sometimes',
|
|
'required',
|
|
'boolean',
|
|
];
|
|
}
|
|
}
|