<?php

namespace App\Models;

use App\Traits\Auditable;

use Illuminate\Database\Eloquent\Model;

/**
 * @property string $id
 * @property string $history_id
 * @property string $section_type_id
 * @property string $title
 * @property string $summary
 * @property string $created_at
 * @property string $updated_at
 * @property History $history
 * @property SectionType $sectionType
 */
class SectionHistory extends Model
{
    use Auditable;
    /**
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = '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','history_id', 'section_type_id', 'title', 'summary', 'created_at', 'updated_at'];

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

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