Add (news bites)
This commit is contained in:
69
app/Models/RssPost.php
Normal file
69
app/Models/RssPost.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user