<?php
namespace App\Models\Account;

use Illuminate\Database\Eloquent\Model;
use Laravel\Cashier\Billable;

class Account extends Model
{
    use Billable;

    protected $casts = [
        'settings' => 'array'
    ];

    public function billingAddress()
    {
        return $this->belongsTo('App\Models\Account\Address');
    }

    public function plan()
    {
        return $this->belongsTo('App\Models\Account\Plan');
    }

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

    public function galleries()
    {
        return $this->hasMany('App\Models\Gallery\Gallery');
    }
}
