59 lines
1.2 KiB
PHP
59 lines
1.2 KiB
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* Created by Reliese Model.
|
||
|
*/
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Carbon\Carbon;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
/**
|
||
|
* Class NhInsurancesInvoice
|
||
|
*
|
||
|
* @property int $id
|
||
|
* @property string $invoice_id
|
||
|
* @property int $insurance_id
|
||
|
* @property int $subscription_id
|
||
|
* @property float $amount
|
||
|
* @property Carbon $payment_deadline
|
||
|
* @property Carbon $payment_reminder
|
||
|
* @property string $state
|
||
|
* @property string $reason
|
||
|
* @property Carbon|null $created_at
|
||
|
* @property Carbon|null $updated_at
|
||
|
*
|
||
|
* @package App\Models
|
||
|
*/
|
||
|
class NhInsurancesInvoice extends Model
|
||
|
{
|
||
|
protected $table = 'nh_insurances_invoices';
|
||
|
|
||
|
protected $casts = [
|
||
|
'insurance_id' => 'int',
|
||
|
'subscription_id' => 'int',
|
||
|
];
|
||
|
|
||
|
protected $fillable = [
|
||
|
'invoice_id',
|
||
|
'insurance_id',
|
||
|
'subscription_id',
|
||
|
'amount',
|
||
|
'payment_deadline',
|
||
|
'payment_reminder',
|
||
|
'state',
|
||
|
'reason'
|
||
|
];
|
||
|
|
||
|
public function insurance()
|
||
|
{
|
||
|
return $this->belongsTo(NhInsurance::class, 'insurance_id');
|
||
|
}
|
||
|
|
||
|
public function subscription()
|
||
|
{
|
||
|
return $this->belongsTo(NhInsurancesSubscription::class, 'subscription_id');
|
||
|
}
|
||
|
}
|