50 lines
977 B
PHP
50 lines
977 B
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class NhInsurance
|
|
*
|
|
* @property int $id
|
|
* @property string $insurance_subscription_id
|
|
* @property string $insured_id
|
|
* @property Carbon|null $start_at
|
|
* @property Carbon|null $end_at
|
|
* @property string $state
|
|
* @property float $remaining_amount
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class NhInsurance extends Model
|
|
{
|
|
protected $table = 'nh_insurances';
|
|
|
|
protected $dates = [
|
|
'start_at',
|
|
'end_at'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'insurance_subscription_id',
|
|
'insured_id',
|
|
'start_at',
|
|
'end_at',
|
|
'state',
|
|
'remaining_amount'
|
|
];
|
|
|
|
public function subscription()
|
|
{
|
|
return $this->belongsTo(NhInsurancesSubscription::class, 'insurance_subscription_id', 'insurance_subscription_id');
|
|
}
|
|
}
|