feat: complete Epic 0 — foundation migration & infrastructure setup
Stories 0.2-0.5: rename folders→declarations (backend+frontend), configure Redis for cache/queue/sessions, add foundation database migrations (permissions, archived_at), replace DeclarationStatus enum with architecture lifecycle values, create DeclarationObserver for status transition validation and auto-archive, fix controller status transitions to respect observer rules. 93 tests pass (240 assertions). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
37
app/Http/Requests/StoreDeclarationMentionRequest.php
Normal file
37
app/Http/Requests/StoreDeclarationMentionRequest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class StoreDeclarationMentionRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user() !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$workspaceId = $this->session()->get('current_workspace_id');
|
||||
|
||||
return [
|
||||
'user_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
Rule::exists('workspace_user', 'user_id')
|
||||
->where('workspace_id', $workspaceId),
|
||||
],
|
||||
'message' => ['required', 'string', 'max:500'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user