27 lines
603 B
PHP
27 lines
603 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MisMigrationPatient extends Model
|
|
{
|
|
protected $table = 'stt_migrationpatient';
|
|
protected $primaryKey = 'MigrationPatientID';
|
|
|
|
public function branch()
|
|
{
|
|
return $this->hasOne(MisStationarBranch::class, 'StationarBranchID', 'rf_StationarBranchID');
|
|
}
|
|
|
|
public function diagnosis()
|
|
{
|
|
return $this->hasMany(MisDiagnos::class, 'rf_MigrationPatientID', 'MigrationPatientID');
|
|
}
|
|
|
|
public function mkb()
|
|
{
|
|
return $this->hasOne(MisMKB::class, 'MKBID', 'rf_MKBID');
|
|
}
|
|
}
|