nanosanteservice/app/Models/NhNetworksConfig.php

78 lines
2.3 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
* @property float $max_number_of_beneficiaries
* @property float $age_limit_of_child_beneficiary
* @property float $coverage_limit_per_insured_per_year
* @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',
'max_number_of_beneficiaries' => 'float',
'age_limit_of_child_beneficiary' => 'float',
'coverage_limit_per_insured_per_year' => 'float',
'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',
'age_limit_of_child_beneficiary',
'coverage_limit_per_insured_per_year',
'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 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
}