<?php

namespace App\Models;

use CodeIgniter\Model;

class PenjualanDetailModel extends Model
{
    protected $table            = 'penjualan_detail';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;
    protected $returnType       = 'array';

    protected $allowedFields = [
        'penjualan_id',
        'barang_id',
        'kode_barang',
        'nama_barang',
        'satuan',
        'jumlah',
        'harga_jual',
        'harga_beli',
        'subtotal',
        'total_modal',
    ];

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