<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Company extends Model
{
    
    protected $fillable = [
      
                    'company_profile', 
                    'reg_cert', 
                    'company_name', 
                    'registration_no', 
                    'tax_no', 
                    'tel_no', 
                    'fax', 
                    'address', 
                    'city', 
                    'postcode', 
                    'state', 
                    'country', 
                    'contact_person',
                    'user_id', 

                ];
                
    public function user()
    {
        return $this->belongsTo('App\User');
    }

    public function deliveryinfo() {

        return $this->hasMany('App\Deliveryinfo');
        
    }

    public function warehouse() {

        return $this->hasMany('App\Warehouse');
        
    }

     public function contact() {

        return $this->hasMany('App\Contact');
        
    }
}
