<?php

namespace App\Models\Webprofile;

use App\Http\Traits\UuidTrait;
use App\Models\Webprofile\De\Pages as DePages;
use App\Models\Webprofile\En\Pages as EnPages;
use App\Models\Webprofile\Sa\Pages as SaPages;
use App\Models\Webprofile\Zh\Pages as ZhPages;
use Illuminate\Database\Eloquent\Model;

class Pages extends Model
{
    use UuidTrait;

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

    protected $guarded = [];

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

    public function rDe()
    {
        return $this->hasOne(DePages::class, 'page_id', 'id');
    }

    public function rSa()
    {
        return $this->hasOne(SaPages::class, 'page_id', 'id');
    }

    public function rZh()
    {
        return $this->hasOne(ZhPages::class, 'page_id', 'id');
    }
}
