<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Customer extends Model
{
    use SoftDeletes;
	
	protected $dates = ['deleted_at', 'updated_at', 'created_at'];
	
	protected $fillable = [
		'id',
		'fiscal_reason',
		'fiscal_address',
		'cif',
		'comment'
	];
	
	public function users()
	{
		return $this->hasMany('App\User');
	}

	public function boat()
	{
		return $this->hasOne('App\Boat');
	}

	public function boats()
    	{
        	return $this->belongsToMany('App\Boat');
    	}

	public function bank_account()
	{
		return $this->hasOne(BankAccount::class);
	}
}
