mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.7 KiB
PHP
51 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property int|null $profile_id
|
|
* @property int $user_id
|
|
* @property array<array-key, mixed>|null $roles
|
|
* @property array<array-key, mixed>|null $meta
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
* @property-read User|null $user
|
|
*
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles whereMeta($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles whereProfileId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles whereRoles($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles whereUpdatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserRoles whereUserId($value)
|
|
*
|
|
* @mixin \Eloquent
|
|
*/
|
|
class UserRoles extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $guarded = [];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'roles' => 'array',
|
|
'meta' => 'array',
|
|
];
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|