<?php

namespace App\Models;

use CodeIgniter\Model;

class ProductModel extends Model
{
    protected $table = 'products';
    protected $primaryKey = 'id_product';
    protected $returnType = 'array';

    protected $useAutoIncrement = true;
    protected $useSoftDeletes = false;

    protected $allowedFields = [
        'id_category',
        'id_supplier',
        'owner_id',
        'nama_product',
        'description',
        'technical_notes',
        'stock_type',
        'stok',
        'harga',
        'harga_modal',
        'is_custom',
        'barcode',
        'sku',
        'product_photo',
        'status',
        'jenis'
    ];

    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';
}
