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
|
|
|
/**
|
2026-03-08 14:18:28 +01:00
|
|
|
* @property int $id
|
|
|
|
|
* @property int $article_id
|
|
|
|
|
* @property int $platform_channel_id
|
|
|
|
|
* @property string $post_id
|
|
|
|
|
* @property string $platform
|
|
|
|
|
* @property string $published_by
|
|
|
|
|
* @property array<string, mixed>|null $publication_data
|
|
|
|
|
* @property \Illuminate\Support\Carbon $published_at
|
|
|
|
|
* @property \Illuminate\Support\Carbon $created_at
|
|
|
|
|
* @property \Illuminate\Support\Carbon $updated_at
|
2025-06-30 19:54:43 +02:00
|
|
|
*
|
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;
|
2026-03-08 14:18:28 +01:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|