<?php

namespace App\Classes\Modules\Milestones\Standards\Validators;

use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Milestones\DataTransferObjects\AchievementObject;

class MilestoneRewardValidation extends AbstractValidation
{
    /**
     * @param AchievementObject $object
     * @return array
     */
    protected function data($object): array
    {
        return [
            'milestone_id' => $object->getMilestone()->id,
            'reward_ids' => $object->getRewardIds()
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array
    {
        return [
            'milestone_id' => 'required',
            'reward_ids' => 'required',
        ];
    }

    /**
     * @return array
     */
    protected function messages(): array
    {
        return [];
    }
}
