<?php

namespace App\Models;

use CodeIgniter\Model;

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

    protected $allowedFields = [
        'no_transaksi',
        'tanggal_penjualan',
        'pelanggan_id',
        'subtotal',
        'pajak_persen',
        'pajak_nominal',
        'total_penjualan',
        'status_pembayaran',
        'user_id',
        'catatan',
    ];

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