<?php

namespace App\Models\Movie;

use Illuminate\Database\Eloquent\Model;

class MovieDetail extends Model
{
    protected $table = 'tb_movie_detail';
    protected $primaryKey = 'id';

    public $keyType = 'int';
    public $incrementing = true;
    public $timestamps = true;

    const CREATED_AT = 'created_at';
    const UPDATED_AT = 'updated_at';
    const DELETED_AT = null;

    protected $guarded = [];

    public function info(string $movieCd): MovieDetail
    {
        return $this->where('movie_cd', $movieCd)->firstOrNew();
    }
}
