| 
									
										
										
										
											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-11 00:13:00 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2021-10-11 00:13:00 +00:00
										 |  |  |  * @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 | 
					
						
							| 
									
										
										
										
											2021-10-19 14:35:01 +00:00
										 |  |  |  * @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'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-19 14:35:01 +00:00
										 |  |  |     protected $casts = [ | 
					
						
							| 
									
										
										
										
											2021-10-11 00:13:00 +00:00
										 |  |  |         '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', | 
					
						
							| 
									
										
										
										
											2021-10-11 00:13:00 +00:00
										 |  |  |         '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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-19 14:35:01 +00:00
										 |  |  |     protected $fillable = [ | 
					
						
							| 
									
										
										
										
											2021-10-11 00:13:00 +00:00
										 |  |  |         'network_id', | 
					
						
							|  |  |  |         'provider_billing_period', | 
					
						
							|  |  |  |         'max_number_of_beneficiaries', | 
					
						
							| 
									
										
										
										
											2021-10-20 13:05:23 +00:00
										 |  |  |         'age_limit_of_insured_and_spouse', | 
					
						
							| 
									
										
										
										
											2021-10-11 00:13:00 +00:00
										 |  |  |         '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' | 
					
						
							|  |  |  |     ]; | 
					
						
							| 
									
										
										
										
											2021-10-19 14:35:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     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'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-19 14:35:01 +00:00
										 |  |  |     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
										 |  |  | } |