NETBien.backend/app/Models/PackSim.php

44 lines
885 B
PHP

<?php namespace App\Models;
/**
* @copyright (c) 2025 Notsoweb Software (https://notsoweb.com) - All Rights Reserved
*/
use Illuminate\Database\Eloquent\Model;
/**
* Descripción
*
* @author Moisés Cortés C. <moises.cortes@notsoweb.com>
*
* @version 1.0.0
*/
class PackSim extends Model
{
protected $fillable = [
'package_id',
'sim_card_id',
'activated_at',
'deactivated_at',
'is_active',
];
protected $casts = [
'package_id' => 'integer',
'sim_card_id' => 'integer',
'activated_at' => 'datetime',
'deactivated_at' => 'datetime',
'is_active' => 'boolean',
];
public function package()
{
return $this->belongsTo(Packages::class, 'package_id');
}
public function simCard()
{
return $this->belongsTo(SimCard::class, 'sim_card_id');
}
}