<?php

namespace App\Models;

use App\Traits\Auditable;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ControlSectionHistory extends Model
{
    use Auditable;
    use HasFactory;
     /**
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'control_section_history';

    /**
     * The "type" of the auto-incrementing ID.
     * 
     * @var string
     */
    protected $keyType = 'string';

    /**
     * Indicates if the IDs are auto-incrementing.
     * 
     * @var bool
     */
    public $incrementing = false;

    /**
     * @var array
     */
    protected $fillable = ['id','control_history_id', 'section_type_id', 'title', 'summary', 'created_at', 'updated_at'];
    
    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function controlHistory()
    {
        return $this->belongsTo('App\Models\ControlHistory');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function sectionType()
    {
        return $this->belongsTo('App\Models\SectionType');
    }
}
