30 lines
590 B
PHP
30 lines
590 B
PHP
<?php
|
|
|
|
namespace Feddev\LemmyArticlePoster\Domain\Articles;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ArticlePosted extends Model
|
|
{
|
|
protected $table = 'article_posted';
|
|
|
|
protected $fillable = [
|
|
'article_id',
|
|
'community',
|
|
'posted_at',
|
|
'response',
|
|
];
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'posted_at' => 'datetime',
|
|
'response' => 'array',
|
|
];
|
|
|
|
public function article(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Article::class);
|
|
}
|
|
}
|