<?php

namespace App\Models;

class Warehouse extends AbstractModel
{

    protected $table = 'warehouses';

    protected $fillable = [
        'name', 'email'
    ];

    public function addressBook()
    {
        return $this->hasMany('App\Models\AddressBook', 'reference_id', 'id')->where('type', '=', 2);
    }

}
