initial commit

This commit is contained in:
I-Fun
2026-04-01 08:04:56 +07:00
commit e09c8a5fa9
111 changed files with 18022 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
namespace App\Models;
use App\Enums\ContentStatus;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class ContentBrief extends Model
{
use HasFactory, SoftDeletes;
protected $fillable = [
'client_id', 'title', 'platform', 'content_type', 'status',
'hook', 'body', 'cta', 'script', 'caption', 'hashtags',
'target_date', 'posted_date', 'posted_url', 'sort_order', 'notes',
];
protected $casts = [
'status' => ContentStatus::class,
'target_date' => 'date',
'posted_date' => 'date',
];
public function client(): BelongsTo
{
return $this->belongsTo(Client::class);
}
public function getPlatformIconAttribute(): string
{
return match($this->platform) {
'instagram' => '📸',
'tiktok' => '🎵',
'youtube' => '▶️',
default => '📱',
};
}
}