<?php

namespace App\Http\Requests\Api\V1\Production;

use Illuminate\Foundation\Http\FormRequest;

class StoreProductionBatchRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'branch_id'    => 'required|integer|exists:branches,id',
            'product_id'   => 'required|integer|exists:products,id',
            'recipe_id'    => 'required|integer|exists:recipes,id',
            'batch_size'   => 'required|string|max:50',
            'total_scoops' => 'required|integer|min:1',
            'expiry_hours' => 'nullable|integer|min:1',
            'quantity'     => 'sometimes|integer|min:1|max:10',
            'notes'        => 'nullable|string|max:500',
        ];
}
