Design.php 881 Bytes
Newer Older
1 2 3 4 5
<?php

namespace App\Models\Webprofile;

use App\Http\Traits\UuidTrait;
Bagus Pambudi committed
6 7 8 9
use App\Models\Webprofile\De\Design as DeDesign;
use App\Models\Webprofile\En\Design as EnDesign;
use App\Models\Webprofile\Sa\Design as SaDesign;
use App\Models\Webprofile\Zh\Design as ZhDesign;
10 11 12 13 14 15 16 17 18 19
use Illuminate\Database\Eloquent\Model;

class Design extends Model
{
    use UuidTrait;

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

    protected $guarded = [];
Bagus Pambudi committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

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

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

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

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