48 lines
		
	
	
		
			1006 B
		
	
	
	
		
			PHP
		
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1006 B
		
	
	
	
		
			PHP
		
	
	
| <?php
 | |
| 
 | |
| namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Factories\HasFactory;
 | |
| use Illuminate\Database\Eloquent\Model;
 | |
| 
 | |
| class HasilUjiSTB extends Model
 | |
| {
 | |
|     use HasFactory;
 | |
| 
 | |
|     protected $table = 'HasilUjiSTB';
 | |
| 
 | |
|     protected $primaryKey = 'HasilUjiSTBId';
 | |
|     protected $fillable = [
 | |
|         'CerobongId',
 | |
|         'CerobongParameterId',
 | |
|         'Tahun',
 | |
|         'PerusahaanId',
 | |
|         'Semester1',
 | |
|         'Semester2',
 | |
|     ];
 | |
| 
 | |
|     /**
 | |
|      * Relasi ke model Cerobong.
 | |
|      */
 | |
|     public function cerobong()
 | |
|     {
 | |
|         return $this->belongsTo(Cerobong::class, 'CerobongId', 'CerobongId');
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Relasi ke model CerobongParameter.
 | |
|      */
 | |
|     public function cerobongParameter()
 | |
|     {
 | |
|         return $this->belongsTo(CerobongParameter::class, 'CerobongParameterId', 'CerobongParameterId');
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Relasi ke model Perusahaan.
 | |
|      */
 | |
|     public function perusahaan()
 | |
|     {
 | |
|         return $this->belongsTo(Perusahaan::class, 'PerusahaanId', 'PerusahaanId');
 | |
|     }
 | |
| }
 |