'required', 'type' => 'required', 'content' => 'required', ]; } /** * 更新数据验证规则 * return array */ public function updateRules(): array { return [ 'title' => 'required', 'type' => 'required', 'content' => 'required', ]; } /** * 字段映射名称 * return array */ public function attributes(): array { return [ 'title' => '公告标题', 'type' => '公告类型', 'content' => '公告内容', ]; } }