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.
pixelfed/app/Models/Mention.php

56 lines
2.1 KiB
PHTML

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
8 years ago
use Illuminate\Database\Eloquent\SoftDeletes;
4 days ago
/**
* @property int $id
* @property int $status_id
* @property int $profile_id
* @property int $local
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read \App\Models\Profile|null $profile
* @property-read \App\Models\Status|null $status
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention whereLocal($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention whereProfileId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention whereStatusId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention withTrashed(bool $withTrashed = true)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Mention withoutTrashed()
* @mixin \Eloquent
*/
class Mention extends Model
{
8 years ago
use SoftDeletes;
4 years ago
protected $guarded = [];
7 months ago
protected function casts(): array
{
return [
'deleted_at' => 'datetime',
];
}
public function profile()
{
return $this->belongsTo(Profile::class, 'profile_id', 'id');
}
public function status()
{
return $this->belongsTo(Status::class, 'status_id', 'id');
}
}