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');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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\Core\Program;
|
||||
use App\Models\Program\Transformasi;
|
||||
|
||||
class Framework extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'program_framework';
|
||||
|
||||
protected $fillable = [
|
||||
"nama",
|
||||
"tahun",
|
||||
"program_id",
|
||||
];
|
||||
|
||||
public function program(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Program::class, 'program_id', 'id');
|
||||
}
|
||||
|
||||
public function transformasi(): HasMany
|
||||
{
|
||||
return $this->hasMany(Transformasi::class, 'framework_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Program;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
use App\Models\Program\Aktivitas;
|
||||
|
||||
class Target extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'program_target';
|
||||
|
||||
protected $fillable = [
|
||||
"variabel",
|
||||
"tipe",
|
||||
"target_integer",
|
||||
"target_float",
|
||||
"target_boolean",
|
||||
"baseline_integer",
|
||||
"baseline_float",
|
||||
"baseline_boolean",
|
||||
"realisasi_integer",
|
||||
"realisasi_float",
|
||||
"realisasi_boolean",
|
||||
"aktivitas_id",
|
||||
];
|
||||
|
||||
public function aktivitas(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Aktivitas::class, 'aktivitas_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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\Framework;
|
||||
use App\Models\Program\Aktivitas;
|
||||
|
||||
class Transformasi extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'program_transformasi';
|
||||
|
||||
protected $fillable = [
|
||||
"kode",
|
||||
"nama",
|
||||
"framework_id",
|
||||
];
|
||||
|
||||
public function framework(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Framework::class, 'framework_id', 'id');
|
||||
}
|
||||
|
||||
public function aktivitas(): HasMany
|
||||
{
|
||||
return $this->hasMany(Aktivitas::class, 'transformasi_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user