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/Avatar.php

74 lines
2.8 KiB
PHTML

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
8 years ago
use Illuminate\Database\Eloquent\SoftDeletes;
4 days ago
use Illuminate\Support\Carbon;
/**
4 days ago
* @property int $id
* @property int $profile_id
* @property string|null $media_path
* @property string|null $remote_url
* @property string|null $cdn_url
* @property int|null $is_remote
* @property int|null $size
* @property int $change_count
4 days ago
* @property Carbon|null $last_fetched_at
* @property Carbon|null $last_processed_at
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property-read Profile|null $profile
*
4 days ago
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereCdnUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereChangeCount($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereIsRemote($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereLastFetchedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereLastProcessedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereMediaPath($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereProfileId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereRemoteUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereSize($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar withTrashed(bool $withTrashed = true)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Avatar withoutTrashed()
4 days ago
*
4 days ago
* @mixin \Eloquent
*/
class Avatar extends Model
{
8 years ago
use SoftDeletes;
protected $guarded = [];
7 months ago
protected function casts(): array
{
return [
'deleted_at' => 'datetime',
'last_fetched_at' => 'datetime',
'last_processed_at' => 'datetime',
];
}
protected $visible = [
'id',
'profile_id',
'media_path',
'size',
];
public function profile()
{
9 months ago
return $this->belongsTo(Profile::class);
}
}