mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-16 16:13:20 +01:00
56 lines
1.4 KiB
PHP
56 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class ClientSubscription extends BaseModel
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
// 'subscription_id',
|
|
// 'recurring_invoice_id',
|
|
// 'client_id',
|
|
// 'trial_started',
|
|
// 'trial_ends',
|
|
// 'is_deleted',
|
|
];
|
|
|
|
protected $casts = [
|
|
'is_deleted' => 'boolean',
|
|
'updated_at' => 'timestamp',
|
|
'created_at' => 'timestamp',
|
|
'deleted_at' => 'timestamp',
|
|
];
|
|
|
|
public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(Company::class);
|
|
}
|
|
|
|
public function recurring_invoice(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(RecurringInvoice::class);
|
|
}
|
|
|
|
public function client(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(Client::class);
|
|
}
|
|
|
|
public function subscription(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(BillingSubscription::class);
|
|
}
|
|
}
|