KTVRemote/app/Models/SongLibraryCache.php
allen.yan 55666c1475 202508271300
加入首頁,熱門,最新 頁面
2025-08-27 13:03:26 +08:00

47 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SongLibraryCache extends Model
{
protected $table = 'song_library_cache';
protected $primaryKey = 'song_id';
public $incrementing = true;
protected $keyType = 'int';
const CREATED_AT = null;
const UPDATED_AT = 'updated_at';
// 可寫入的欄位(可依需要擴充)
protected $fillable = [
'song_name',
'song_simplified',
'phonetic_abbr',
'pinyin_abbr',
'strokes_abbr',
'song_number',
'artistA',
'artistB',
'artistA_simplified',
'artistB_simplified',
'artistA_category',
'artistB_category',
'artist_category',
'song_filename',
'song_category',
'language_name',
'add_date',
'situation',
'vocal',
'db_change',
'song_counts',
'updated_at',
];
public function str_artists_plus(): string
{
return ($this->artistB!=null) ? $this->artistA ." + ".$this->artistB :$this->artistA;
}
}