add persisted set ordering

This commit is contained in:
Yisroel Baum 2026-07-31 11:00:41 +03:00
parent fde12ad561
commit dc034bf393
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
9 changed files with 340 additions and 6 deletions

View file

@ -10,12 +10,14 @@ use Illuminate\Database\Eloquent\Model;
* @property string $name
* @property string $description
* @property string $icon_image_url
* @property int $sort_order
*
* @method static Builder<static>|SetModel newModelQuery()
* @method static Builder<static>|SetModel newQuery()
* @method static Builder<static>|SetModel query()
* @method static Builder<static>|SetModel whereId($value)
* @method static Builder<static>|SetModel whereName($value)
* @method static Builder<static>|SetModel whereSortOrder($value)
*
* @mixin \Eloquent
*/
@ -25,5 +27,14 @@ class SetModel extends Model
public $timestamps = false;
protected $fillable = ['name', 'description', 'icon_image_url'];
protected $fillable = [
'name',
'description',
'icon_image_url',
'sort_order',
];
protected $casts = [
'sort_order' => 'integer',
];
}