Skip to content
Snippets Groups Projects
NewsFullUpdateRequest.php 927 B
Newer Older
<?php

namespace App\News\Request;

use App\Shared\Abstraction\AbstractRequest;
use Ramsey\Collection\Collection;
use Symfony\Component\Validator\Constraints\All;
use Symfony\Component\Validator\Constraints\Type;
use Symfony\Component\Validator\Constraints\Uuid;
use Symfony\Contracts\Service\Attribute\Required;

class NewsFullUpdateRequest extends AbstractRequest
{
    #[Required]
    #[Uuid]
    public $uuid;

    #[Required]
    #[Type('string')]
    public $name;

    #[Required]
    #[Type('string')]
    public $code;

    #[Required]
    #[Type('bool')]
    public $active;

    #[Required]
    #[Type('bool')]
    public $main_page_render;

    #[Uuid]
    public $preview_text;

    #[Uuid]
    public $detail_text;

    #[Uuid]
    #[Required]
    public $type_id;

    #[All(
        new Uuid()
    )]
    public $categories_uuid;

    #[Uuid]
    public $detail_image;

    #[Uuid]
    public $preview_image;
}