WuYongJie 2b6c4030e5
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 补充财务与支付模块源码
2026-07-20 18:40:05 +08:00

32 lines
758 B
PHP

<?php
namespace Modules\EcommerceFinance\Http\Requests;
use App\Abstracts\Http\FormRequest;
use Illuminate\Validation\Rule;
class Channel extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'code' => [
'required',
'string',
'max:64',
Rule::unique('ec_channels', 'code')
->where('company_id', company_id())
->ignore($this->route('channel')),
],
'name' => ['required', 'string', 'max:255'],
'type' => ['required', 'string', 'max:32'],
'enabled' => ['sometimes', 'boolean'],
];
}
}