95 lines
3.0 KiB
PHP
95 lines
3.0 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class NhNetworksConfig
|
|
*
|
|
* @property int $id
|
|
* @property int $network_id
|
|
* @property string $provider_billing_period
|
|
* @property int $max_number_of_beneficiaries
|
|
* @property int $age_limit_of_child_beneficiary
|
|
* @property int $age_limit_of_insured_and_spouse
|
|
* @property float $coverage_limit_per_insured_per_year
|
|
* @property boolean $family_coverage_sharing
|
|
* @property int $reminder_delay_days
|
|
* @property int $suspension_delay_days_after_reminder
|
|
* @property float $current_affection_percentage_insurer
|
|
* @property float $current_affection_percentage_insured
|
|
* @property float $long_term_affection_percentage_insurer
|
|
* @property float $long_term_affection_percentage_insured
|
|
* @property float $exoneration_percentage_insurer
|
|
* @property float $exoneration_percentage_insured
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class NhNetworksConfig extends Model
|
|
{
|
|
protected $table = 'nh_networks_configs';
|
|
|
|
protected $casts = [
|
|
'network_id' => 'int',
|
|
'max_number_of_beneficiaries' => 'int',
|
|
'age_limit_of_insured_and_spouse' => 'int',
|
|
'age_limit_of_child_beneficiary' => 'int',
|
|
// 'coverage_limit_per_insured_per_year' => 'float',
|
|
'family_coverage_sharing' => 'boolean',
|
|
'reminder_delay_days' => 'int',
|
|
'suspension_delay_days_after_reminder' => 'int',
|
|
'current_affection_percentage_insurer' => 'float',
|
|
'current_affection_percentage_insured' => 'float',
|
|
'long_term_affection_percentage_insurer' => 'float',
|
|
'long_term_affection_percentage_insured' => 'float',
|
|
'exoneration_percentage_insurer' => 'float',
|
|
'exoneration_percentage_insured' => 'float'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'network_id',
|
|
'provider_billing_period',
|
|
'max_number_of_beneficiaries',
|
|
'age_limit_of_insured_and_spouse',
|
|
'age_limit_of_child_beneficiary',
|
|
// 'coverage_limit_per_insured_per_year',
|
|
'family_coverage_sharing',
|
|
'reminder_delay_days',
|
|
'suspension_delay_days_after_reminder',
|
|
'current_affection_percentage_insurer',
|
|
'current_affection_percentage_insured',
|
|
'long_term_affection_percentage_insurer',
|
|
'long_term_affection_percentage_insured',
|
|
'exoneration_percentage_insurer',
|
|
'exoneration_percentage_insured'
|
|
];
|
|
|
|
public function configWallet()
|
|
{
|
|
return $this->hasOne(ConfigWallet::class, 'id_network', 'network_id');
|
|
}
|
|
|
|
public function network()
|
|
{
|
|
return $this->belongsTo(Network::class, 'network_id');
|
|
}
|
|
|
|
public function monthsPricesGrid()
|
|
{
|
|
return $this->hasMany(NhMonthsPricesGrid::class, 'nh_network_config_id', 'id');
|
|
}
|
|
|
|
public function yearsPricesGrid()
|
|
{
|
|
return $this->hasMany(NhYearsPricesGrid::class, 'nh_network_config_id', 'id');
|
|
}
|
|
}
|