nanosanteservice/app/Models/NhNetworksConfig.php

95 lines
3.0 KiB
PHP
Raw Normal View History

2021-10-04 16:24:39 +00:00
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class NhNetworksConfig
*
2021-10-04 16:24:39 +00:00
* @property int $id
* @property int $network_id
* @property string $provider_billing_period
2021-10-20 13:05:23 +00:00
* @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
2021-10-04 16:24:39 +00:00
*
* @package App\Models
*/
class NhNetworksConfig extends Model
{
protected $table = 'nh_networks_configs';
protected $casts = [
'network_id' => 'int',
2021-10-20 13:05:23 +00:00
'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'
];
2021-10-04 16:24:39 +00:00
protected $fillable = [
'network_id',
'provider_billing_period',
'max_number_of_beneficiaries',
2021-10-20 13:05:23 +00:00
'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');
}
2021-10-29 15:52:10 +00:00
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');
}
2021-10-04 16:24:39 +00:00
}