<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Common extends Model
{

    protected $table = 'common';
    
    protected $fillable = [
        'name', 'masterkeyword', 'parent_id'
    ];

    public $timestamps = false;

    public function customerStatus()
    {
        return $this->hasMany('App\Customer','status');
    }

    public function supplierStatus()
    {
        return $this->hasMany('App\Supplier','status_id');
    }

    public function supplierDelivery()
    {
        return $this->hasMany('App\Supplier','delivery_type_id');
    }

    public function supplierPayment()
    {
        return $this->hasMany('App\Supplier','payment_type_id');
    }

    public function customerDelivery()
    {
        return $this->hasMany('App\Customer','delivery_type_id');
    }
}
