38 lines
		
	
	
		
			774 B
		
	
	
	
		
			PHP
		
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			774 B
		
	
	
	
		
			PHP
		
	
	
| <?php
 | |
| 
 | |
| namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Factories\HasFactory;
 | |
| use Illuminate\Database\Eloquent\Model;
 | |
| 
 | |
| class HasilUjiKDM extends Model
 | |
| {
 | |
|     use HasFactory;
 | |
|     protected $table = 'HasilUjiKDM';
 | |
| 
 | |
|     protected $primaryKey = 'HasilUjiKDMId';
 | |
|     protected $fillable = [
 | |
|         'Tahun',
 | |
|         'PerusahaanId',
 | |
|         'IndikatorKdmId',
 | |
|         'Bulan',
 | |
|         'Nilai',
 | |
|     ];
 | |
| 
 | |
|     /**
 | |
|      * Relasi ke model IndikatorKdm.
 | |
|      */
 | |
|     public function indikatorKdm()
 | |
|     {
 | |
|         return $this->belongsTo(IndikatorKdm::class, 'IndikatorKdmId', 'IndikatorKdmId');
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Relasi ke model Perusahaan.
 | |
|      */
 | |
|     public function perusahaan()
 | |
|     {
 | |
|         return $this->belongsTo(Perusahaan::class, 'PerusahaanId', 'PerusahaanId');
 | |
|     }
 | |
| }
 |