2025-06-29 20:21:17 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
2025-08-02 03:48:06 +02:00
|
|
|
use Database\Factories\ArticlePublicationFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
2025-06-29 20:21:17 +02:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
2025-06-30 19:54:43 +02:00
|
|
|
/**
|
|
|
|
|
* @property integer $article_id
|
2025-07-06 01:35:59 +02:00
|
|
|
* @property integer $platform_channel_id
|
2025-06-30 19:54:43 +02:00
|
|
|
* @property integer $post_id
|
|
|
|
|
*
|
2025-07-07 00:51:32 +02:00
|
|
|
* @method static create(array<string, mixed> $array)
|
2025-06-30 19:54:43 +02:00
|
|
|
*/
|
2025-06-29 20:21:17 +02:00
|
|
|
class ArticlePublication extends Model
|
|
|
|
|
{
|
2025-08-02 03:48:06 +02:00
|
|
|
/** @use HasFactory<ArticlePublicationFactory> */
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
2025-06-29 20:21:17 +02:00
|
|
|
protected $fillable = [
|
|
|
|
|
'article_id',
|
2025-07-06 01:35:59 +02:00
|
|
|
'platform_channel_id',
|
2025-06-29 20:21:17 +02:00
|
|
|
'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',
|
|
|
|
|
];
|
|
|
|
|
|
2025-07-07 00:51:32 +02:00
|
|
|
/**
|
|
|
|
|
* @return BelongsTo<Article, $this>
|
|
|
|
|
*/
|
2025-06-29 20:21:17 +02:00
|
|
|
public function article(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Article::class);
|
|
|
|
|
}
|
|
|
|
|
}
|