All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m7s
1. 新增廣告管理列表與機台配置介面,包含多語系 (zh_TW, en, ja) 與完整 CRUD 2. 實作基於 Alpine 的廣告素材預覽輪播功能 3. 優化廣告素材下拉選單,強制綁定所屬公司以達成多租戶資料隔離 4. 重構廣告配置中廣告影片的縮圖渲染邏輯,移除 <video> 標籤以大幅提升頁面載入速度與節省頻寬 5. 放寬個人檔案頭像上傳限制,支援 WebP 格式
44 lines
882 B
PHP
44 lines
882 B
PHP
<?php
|
|
|
|
namespace App\Models\Machine;
|
|
|
|
use App\Models\System\Advertisement;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MachineAdvertisement extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'machine_id',
|
|
'advertisement_id',
|
|
'position',
|
|
'sort_order',
|
|
'start_at',
|
|
'end_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'sort_order' => 'integer',
|
|
'start_at' => 'datetime',
|
|
'end_at' => 'datetime',
|
|
];
|
|
|
|
/**
|
|
* Get the advertisement associated with this assignment.
|
|
*/
|
|
public function advertisement()
|
|
{
|
|
return $this->belongsTo(Advertisement::class);
|
|
}
|
|
|
|
/**
|
|
* Get the machine associated with this assignment.
|
|
*/
|
|
public function machine()
|
|
{
|
|
return $this->belongsTo(Machine::class);
|
|
}
|
|
}
|