70 lines
1.4 KiB
PHP
70 lines
1.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class RssPost
|
|
*
|
|
* @property int $id
|
|
* @property int|null $category_id
|
|
* @property string $source
|
|
* @property string $source_url
|
|
* @property string $post_url
|
|
* @property string $title
|
|
* @property string $slug
|
|
* @property string|null $body
|
|
* @property string|null $keywords
|
|
* @property string|null $entities
|
|
* @property string|null $metadata
|
|
* @property string|null $bites
|
|
* @property string|null $impact
|
|
* @property string $impact_level
|
|
* @property Carbon $published_at
|
|
* @property string $status
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
* @property Category|null $category
|
|
*/
|
|
class RssPost extends Model
|
|
{
|
|
protected $table = 'rss_posts';
|
|
|
|
protected $casts = [
|
|
'category_id' => 'int',
|
|
'published_at' => 'datetime',
|
|
'metadata' => 'object',
|
|
'keywords' => 'array',
|
|
'entities' => 'array',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'category_id',
|
|
'source',
|
|
'source_url',
|
|
'post_url',
|
|
'title',
|
|
'slug',
|
|
'body',
|
|
'keywords',
|
|
'entities',
|
|
'metadata',
|
|
'bites',
|
|
'impact',
|
|
'impact_level',
|
|
'published_at',
|
|
'status',
|
|
];
|
|
|
|
public function category()
|
|
{
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
}
|