<?php

    namespace Modules\Lpj\Http\Requests;

    use Illuminate\Foundation\Http\FormRequest;

    class BankDataRequest extends FormRequest
    {
        public function authorize()
        {
            return true; // Adjust this based on your authorization logic
        }

        public function rules()
        {
            return [
                'address'                                   => 'nullable|string|max:255',
                'village_code'                              => 'nullable|string|max:20',
                'district_code'                             => 'nullable|string|max:20',
                'city_code'                                 => 'nullable|string|max:20',
                'province_code'                             => 'nullable|string|max:20',
                'tahun'                                     => 'nullable|integer',
                'luas_tanah'                                => 'nullable|numeric',
                'luas_bangunan'                             => 'nullable|numeric',
                'tahun_bangunan'                            => 'nullable|integer',
                'status_nara_sumber'                        => 'nullable|string|max:50',
                'harga'                                     => 'nullable|numeric',
                'harga_diskon'                              => 'nullable|numeric',
                'diskon'                                    => 'nullable|numeric',
                'total'                                     => 'nullable|numeric',
                'nama_nara_sumber'                          => 'nullable|string|max:100',
                'peruntukan'                                => 'nullable|string|max:100',
                'penawaran'                                 => 'nullable|string|max:50',
                'telepon'                                   => 'nullable|string|max:20',
                'hak_properti'                              => 'nullable|string|max:50',
                'kordinat_lat'                              => 'nullable|numeric',
                'kordinat_lng'                              => 'nullable|numeric',
                'jenis_aset'                                => 'nullable|string|max:50',
                'foto_objek'                                => 'nullable|image|max:2048',
                'tanggal'                                   => 'nullable|date',
                'harga_penawaran'                           => 'nullable|numeric',
                'nomor_laporan'                             => 'nullable|string|max:50',
                'tgl_final_laporan'                         => 'nullable|date',
                'nilai_pasar'                               => 'nullable|numeric',
                'indikasi_nilai_likuidasi'                  => 'nullable|numeric',
                'indikasi_nilai_pasar_tanah'                => 'nullable|numeric',
                'estimasi_harga_tanah'                      => 'nullable|numeric',
                'estimasi_harga_bangunan'                   => 'nullable|numeric',
                'indikasi_nilai_pasar_bangunan'             => 'nullable|numeric',
                'indikasi_nilai_pasar_sarana_pelengkap'     => 'nullable|numeric',
                'indikasi_nilai_pasar_mesin'                => 'nullable|numeric',
                'indikasi_nilai_pasar_kendaraan_alat_berat' => 'nullable|numeric',
                'photos'                                    => 'nullable|array',
                'photos.*'                                  => 'nullable|image|max:2048',
            ];
        }
    }
