66 lines
1.3 KiB
PHP
66 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class SerpUrl
|
|
*
|
|
* @property int $id
|
|
* @property int $news_serp_result_id
|
|
* @property int $category_id
|
|
* @property string $category_name
|
|
* @property string $source
|
|
* @property string $url
|
|
* @property string $country_iso
|
|
* @property string|null $title
|
|
* @property string|null $description
|
|
* @property Carbon|null $serp_at
|
|
* @property string $status
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
* @property NewsSerpResult $news_serp_result
|
|
* @property Category $category
|
|
*/
|
|
class SerpUrl extends Model
|
|
{
|
|
protected $table = 'serp_urls';
|
|
|
|
protected $casts = [
|
|
'news_serp_result_id' => 'int',
|
|
'category_id' => 'int',
|
|
'process_status' => 'int',
|
|
'serp_at' => 'datetime',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'news_serp_result_id',
|
|
'category_id',
|
|
'category_name',
|
|
'source',
|
|
'url',
|
|
'country_iso',
|
|
'title',
|
|
'description',
|
|
'process_status',
|
|
'serp_at',
|
|
'status',
|
|
];
|
|
|
|
public function news_serp_result()
|
|
{
|
|
return $this->belongsTo(NewsSerpResult::class);
|
|
}
|
|
|
|
public function category()
|
|
{
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
}
|