mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
* Default database connection - set defaults for engine and strict * Working on tests for refactored model * Fixes for tests, use polymorphic relationships for Invitations * skin the password reset pages
56 lines
1.0 KiB
PHP
56 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Laracasts\Presenter\PresentableTrait;
|
|
|
|
class Account extends Model
|
|
{
|
|
use SoftDeletes;
|
|
use PresentableTrait;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $presenter = 'App\Models\Presenters\AccountPresenter';
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'plan',
|
|
'plan_term',
|
|
'plan_price',
|
|
'plan_paid',
|
|
'plan_started',
|
|
'plan_expires',
|
|
];
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $dates = [
|
|
'deleted_at',
|
|
'promo_expires',
|
|
'discount_expires',
|
|
];
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function companies()
|
|
{
|
|
return $this->hasMany(Company::class);
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function payment()
|
|
{
|
|
return $this->belongsTo(Payment::class);
|
|
}
|
|
}
|