Files
app-test-laravel/app/Models/MsPatientPaymentType.php
2025-12-02 13:37:26 +07:00

39 lines
880 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\HasOne;
class MsPatientPaymentType extends Model
{
use HasFactory;
protected $fillable = [
"name",
"number",
"active",
];
/**
* Get the user associated with the MsPatientPaymentType
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function msPatient(): HasOne
{
return $this->hasOne(MsPatient::class, 'foreign_key', 'local_key');
}
/**
* Get the user associated with the MsPatientPaymentType
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function refPaymentType(): HasOne
{
return $this->hasOne(RefPaymentType::class, 'foreign_key', 'local_key');
}
}