fedi-feed-router/app/Models/ArticlePublication.php

37 lines
725 B
PHP
Raw Normal View History

2025-06-29 20:21:17 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
2025-06-30 19:54:43 +02:00
/**
* @property integer $article_id
* @property integer $community_id
* @property integer $post_id
*
* @method static create(array $array)
*/
2025-06-29 20:21:17 +02:00
class ArticlePublication extends Model
{
protected $fillable = [
'article_id',
'community_id',
'post_id',
2025-06-30 19:54:43 +02:00
'published_at',
'published_by',
2025-06-29 20:21:17 +02:00
'platform',
'publication_data',
];
protected $casts = [
'published_at' => 'datetime',
'publication_data' => 'array',
];
public function article(): BelongsTo
{
return $this->belongsTo(Article::class);
}
}