<?php

namespace App\Models;

use CodeIgniter\Model;

class DetailPermintaanModel extends Model
{
    protected $table            = 'tabel_detail_permintaan';
    protected $primaryKey       = 'id_detail_order';
    protected $useAutoIncrement = true;
    protected $returnType       = 'object';
    protected $allowedFields    = [
        'no_order_custom',
        'kode_model',
        'jumlah_pcs',
        'ukuran_gamis',
        'ongkos_pengerjaan',
        'subtotal_detail_order',
        'lingkar_dada',
        'lingkar_pinggang',
        'lingkar_panggul',
        'lebar_bahu',
        'panjang_lengan',
        'panjang_gamis',
        'catatan_detail',
        'gambar_referensi',
        'bawa_kain_sendiri',
        // New fields for revisi
        'upload_model_sendiri',
        'ongkos_jahit_custom'
    ];

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