['required', 'string', Rule::in(DocumentModalityEnum::values())], 'priority' => ['required', 'string', Rule::in(DocumentPriorityEnum::keys())], 'note' => ['nullable', 'string', 'max:1000'], 'pet_id' => ['nullable', Rule::exists('pets', 'id')->where('owner_id', $this->user()->id)], 'pet' => ['required_without:pet_id', 'array'], 'pet.name' => ['required_without:pet_id', 'nullable', 'string', 'max:255'], 'pet.type' => ['required_without:pet_id', 'nullable', 'string', Rule::in(PetTypeEnum::keys())], 'pet.gender' => ['nullable', 'string', Rule::in(PetGenderEnum::keys())], 'pet.breed' => ['nullable', 'string', 'max:255'], 'pet.age' => ['nullable', 'numeric', 'min:0', 'max:100'], 'pet.weight' => ['nullable', 'numeric', 'min:0', 'max:1000'], 'pet.sterilized' => ['nullable', 'boolean'], 'doctor_id' => ['nullable', Rule::exists('users', 'id')->where('level', UserEnum::Doctor->value)], 'history_files' => ['nullable', 'array'], 'history_files.*' => ['file', 'image', 'max:10240'], 'scan_files' => ['nullable', 'array'], 'scan_files.*' => ['file', 'image', 'max:10240'], ]; } }