<?php

namespace App\Dto;

use App\Dto\Condition\ConditionNotNull;
use App\Entity\Snip;
use Symfony\Component\ObjectMapper\Attribute\Map;

#[Map(target: Snip::class)]
class SnipPostRequest
{
    public function __construct(
        #[Map(if: new ConditionNotNull())]
        public ?string $name = null,
        public ?string $content = null,
        #[Map(if: new ConditionNotNull())]
        public ?bool   $public = null,
        #[Map(if: new ConditionNotNull())]
        public ?bool   $visible = null,
        public ?string $contentName = null,
    ) {}
}
