first commit
This commit is contained in:
26
app/Models/PermohonanItem.php
Normal file
26
app/Models/PermohonanItem.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PermohonanItem extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'permohonan_id', 'item', 'kuantiti', 'harga_anggaran', 'jumlah',
|
||||
'status_item', 'catatan_pelaksana',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['harga_anggaran' => 'decimal:2', 'jumlah' => 'decimal:2'];
|
||||
}
|
||||
|
||||
public function permohonan()
|
||||
{
|
||||
return $this->belongsTo(Permohonan::class, 'permohonan_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user