<?php

namespace App\Models\Webprofile;

use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
use App\Models\Webprofile\Categories;
use App\Models\Webprofile\En\Posts as EnPosts;

class Posts extends Model
{
    use UuidTrait;

    public $incrementing = false;
    protected $table = 'swp_posts';

    protected $guarded = [];

    public function rCategory()
    {
        return $this->belongsTo(Categories::class, 'categories', 'id');
    }

    public function rEn()
    {
        return $this->hasOne(EnPosts::class, 'post_id', 'id');
    }
}