Files
huginn/app/Models/SitePage.php
T

52 lines
998 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class SitePage extends Model
{
protected $fillable = [
'site_id',
'urlkey',
'urlkey_hash',
'url',
'timestamp',
'mime',
'mime_detected',
'status',
'digest',
'length',
'offset',
'filename',
'languages',
'charset',
'redirect',
'title',
'description',
'keywords',
'content',
'raw',
'record_hash',
];
protected $casts = [
'raw' => 'array',
'status' => 'integer',
'length' => 'integer',
'offset' => 'integer',
];
public function site(): BelongsTo
{
return $this->belongsTo(Site::class);
}
public function links(): HasMany
{
return $this->hasMany(Backlink::class);
}
}