monev sampai target
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Program;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
use App\Models\Program\Transformasi;
|
||||
use App\Models\Program\Target;
|
||||
|
||||
class Aktivitas extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'program_aktivitas';
|
||||
|
||||
protected $fillable = [
|
||||
"kode",
|
||||
"nama",
|
||||
"jenis_aktivitas",
|
||||
"indikator",
|
||||
"deskripsi",
|
||||
"transformasi_id",
|
||||
];
|
||||
|
||||
public function transformasi(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Transformasi::class, 'transformasi_id', 'id');
|
||||
}
|
||||
|
||||
public function target(): HasMany
|
||||
{
|
||||
return $this->hasMany(Target::class, 'aktivitas_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user