<?php



namespace App\Models;



use CodeIgniter\Model;



class Deliverytemp extends Model

{

    protected $table = 'delivery_temp';

    protected $primaryKey = 'id'; // Assuming your primary key field name is 'id'

    protected $allowedFields = ['users_id', 'item_code', 'bill_no', 'tanggal_order', 'customer_name', 'product_name', 'details', 'width', 'length', 'pcs', 'hasilqc', 'kirim'];
    
    public function deleteByItemCode($itemCode)
    {
        return $this->where('item_code', $itemCode)->delete();
    }
}

