30 lines
577 B
PHP
30 lines
577 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class ArticlePublication extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = [
|
||
|
|
'article_id',
|
||
|
|
'published_at',
|
||
|
|
'community_id',
|
||
|
|
'published_by',
|
||
|
|
'post_id',
|
||
|
|
'platform',
|
||
|
|
'publication_data',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'published_at' => 'datetime',
|
||
|
|
'publication_data' => 'array',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function article(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Article::class);
|
||
|
|
}
|
||
|
|
}
|