rules()
rules() : array
校验规则。
意图:type_code/handler 仅创建可填(创建后 prohibited);绑定对象条件必填 (handler=mail → scene_key、sms → template_code、custom → handler_class, 其余处理器传对应绑定字段直接忽略);重试策略整数边界(attempts 1-10、 backoff 0-3600、timeout 1-90——不得超 retry_after 防重复执行)。
队列类型请求
职责:校验队列申请/编辑入参——type_code/handler 仅创建可填(创建后业务代码已引用, 不可改);handler 决定绑定必填项(mail 场景 / sms 模板 / custom 类名,条件必填 白名单同 SysJobType 常量);重试策略带安全边界(超时 ≤ retry_after=90,防超时 重投重复执行);公共字段走 HasCommonRules。
┌────────────────── 分区导航(按此顺序阅读)──────────────────┐ 分区 1 · 校验规则 rules 分区 2 · 错误文案 messages └────────────────────────────────────────────────────────────┘
uniqueRule(string $table, string $column, ?int $ignoreId = null, ?callable $where = null) : \Illuminate\Validation\Rules\Unique
同表同列唯一规则。
生成 Laravel 规则:Rule::unique(table, column) 的 unique 约束;ignore 忽略 自身 id(update 场景不与自己冲突);$where 用于 (type, code) 组合唯一等场景。
| string | $table | |
| string | $column | |
| ?int | $ignoreId | |
| ?callable | $where |