<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;

/**
 * Class Entity
 *
 * @property int $id
 * @property string $name
 * @property Carbon|null $created_at
 * @property Carbon|null $updated_at
 * @property Collection|PostEntity[] $post_entities
 */
class Entity extends Model
{
    protected $table = 'entities';

    protected $fillable = [
        'name',
        'slug',
        'description',
    ];

    public function post_entities()
    {
        return $this->hasMany(PostEntity::class);
    }
}
