update migration and models (penilaian, jenis_penilaian, teams, teams_users
This commit is contained in:
26
app/Models/Regions.php
Normal file
26
app/Models/Regions.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Lpj\Database\Factories\RegionsFactory;
|
||||
|
||||
class Regions extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $table = 'regions';
|
||||
|
||||
protected $fillable = [
|
||||
'code', 'name', 'status', 'authorized_status', 'authorized_at', 'authorized_by',
|
||||
'created_at', 'created_by', 'updated_at', 'updated_by', 'deleted_at', 'deleted_by'
|
||||
];
|
||||
|
||||
public function teams(){
|
||||
return $this->hasMany(Teams::class, 'region_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user