Information.php 972 Bytes
Newer Older
1 2 3 4 5
<?php

namespace App\Models\Webprofile;

use App\Http\Traits\UuidTrait;
6
use App\Models\Webprofile\De\Information as DeInformation;
7
use App\Models\Webprofile\En\Information as EnInformation;
8
use App\Models\Webprofile\Sa\Information as SaInformation;
9
use App\Models\Webprofile\Zh\Information as ZhInformation;
10 11 12 13 14 15 16 17 18 19
use Illuminate\Database\Eloquent\Model;

class Information extends Model
{
    use UuidTrait;

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

    protected $guarded = [];
20 21 22 23 24

    public function rEn()
    {
        return $this->hasOne(EnInformation::class, 'information_id', 'id');
    }
25 26 27 28 29

    public function rDe()
    {
        return $this->hasOne(DeInformation::class, 'information_id', 'id');
    }
30 31 32 33 34

    public function rSa()
    {
        return $this->hasOne(SaInformation::class, 'information_id', 'id');
    }
35 36 37 38 39

    public function rZh()
    {
        return $this->hasOne(ZhInformation::class, 'information_id', 'id');
    }
40
}