sekolah_adiwiyata/app/Models/Kuesioner.php

44 lines
1.0 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Kuesioner extends Model
{
use HasFactory;
protected $table = 'kuesioner';
protected $primaryKey = 'KuesionerId';
protected $guarded = [];
// protected $fillable = [
// 'ms_sekolah_id',
// 'level',
// 'tim_adiwiyata',
// 'info_pblhs',
// 'media',
// 'materi',
// 'komitmen',
// 'kegiatan_lingkungan',
// 'pihak_kegiatan_lingkungan',
// 'tahun',
// 'tahun_penghargaan',
// 'link_sk_adiwiyata',
// 'tim_adiwiyata_nomor_sk',
// 'tim_adiwiyata_link',
// 'created_by',
// ];
public function sekolah()
{
return $this->belongsTo(\App\Models\Master\Sekolah::class,'ms_sekolah_id','MsSekolahId');
}
public function profile()
{
return $this->belongsTo(\App\Models\ProfileSekolah::class,'ms_sekolah_id','ms_sekolah_id');
}
}