isMethod('POST'); return [ 'name' => [$isCreate ? 'required' : 'sometimes', 'string', 'max:255'], 'treasury_type' => [$isCreate ? 'required' : 'sometimes', 'string', Rule::in(['bank'])], 'bank_name' => ['nullable', 'string', 'max:255'], 'bank_agency' => ['nullable', 'string', 'max:50'], 'bank_account' => ['nullable', 'string', 'max:50'], 'bank_type_account' => ['nullable', 'string', Rule::in(['corrente', 'poupanca'])], 'active' => ['sometimes', 'boolean'], // unit_id é resolvido no Service (null no franqueador / unidade ativa no franchisee). 'unit_id' => ['nullable', 'integer', 'exists:units,id'], ]; } }