<?php

namespace App\Models;

use App\Traits\ModelTrait;
use Illuminate\Database\Eloquent\Model;

class TranslateLog extends Model
{
    use ModelTrait;

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table   = 'translate_logs';

    /**
     * The attributes that aren't mass assignable.
     *
     * @var array
     */
    protected $guarded = [];

    public function contents()
    {
        return $this->hasMany('App\Models\TranslateContent', 'log_id');
    }

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}
