Add (article): ai gen, front views
This commit is contained in:
65
app/Models/SerpUrl.php
Normal file
65
app/Models/SerpUrl.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user