The open cards are kept in the user's board preferences (expanded_cards, at most 500), saved without redrawing the board and restored on return. Co-Authored-By: Claude Opus 5.5 <[email protected]>
37 lines
1012 B
PHP
37 lines
1012 B
PHP
<?php
|
|
|
|
namespace App\Modules\Jobs\Infrastructure\Persistence\Eloquent;
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Attributes\Table;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* One user's Kanban board settings.
|
|
*
|
|
* @property int $id
|
|
* @property int $user_id
|
|
* @property string $density
|
|
* @property string $urgent_threshold
|
|
* @property array<string, string>|null $column_colors
|
|
* @property array<string, string>|null $column_sorts
|
|
* @property list<string>|null $expanded_cards
|
|
*/
|
|
#[Table('job_board_preferences')]
|
|
#[Fillable(['user_id', 'density', 'urgent_threshold', 'column_colors', 'column_sorts', 'expanded_cards'])]
|
|
class JobBoardPreferenceModel extends Model
|
|
{
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'user_id' => 'integer',
|
|
'column_colors' => 'array',
|
|
'column_sorts' => 'array',
|
|
'expanded_cards' => 'array',
|
|
];
|
|
}
|
|
}
|