Siopas Inventory PETI for ISTW Website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.0 KiB

12 months ago
<?php
namespace App\Models;
use App\Traits\UUID;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Disposal extends Model
{
use HasFactory, SoftDeletes;
12 months ago
protected $table = 'disposals';
protected $fillable = [
'mobile_id',
12 months ago
'peti_id',
'customer_id',
'date_disposal',
'warehouse_id',
'description',
'status_disposal',
12 months ago
'created_by',
'updated_by',
];
public function peti()
{
return $this->belongsTo(Peti::class, 'peti_id')->select(
'id',
'tipe_peti_id',
'customer_id',
'warehouse_id',
'date_pembuatan',
'kondisipeti_id',
'fix_lot',
'updated_by',
)->withTrashed();
12 months ago
}
12 months ago
public function customer()
{
return $this->belongsTo(Customer::class, 'customer_id')->select(
'name',
'code_customer',
)->withTrashed();
12 months ago
}
}