init title lokasi, dan penambahan api
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class JenisMobil extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'jenis_mobil';
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'nama','short_cut'
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MasterTarif extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tarif';
|
||||
protected $primaryKey = 'id_mobil'; // Primary key tabel
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
protected $fillable = [
|
||||
'id_mobil', 'tarif', 'tarif_interval','interval',
|
||||
'waktu_tarif', 'waktu_gratis', 'bayar_dimuka', 'denda','maksimum',
|
||||
'tanggal','tarif2','waktu2','tarif_period','max_per_hari',
|
||||
'min_per_hari','time_base','tarif_inap','batas_min_inap',
|
||||
'max_kena_charge','tarif_member','tarif_voucher','voucher_frek',
|
||||
'voucher_time','voucher_base','voucher_base_time','asuransi_incl',
|
||||
'denda_only_casual','frek_interval','frek_waktu2','free_for_validasi',
|
||||
'time_base_maks','free_pos_default','tarif_valet','start_time_member_charge',
|
||||
'stop_time_member_charge','min_time_tarif_member','type_tarif_member','tarif3',
|
||||
'waktu3','frek_waktu3','denda_member','valet_extra_time','extra_charge_value',
|
||||
'extra_charge_time','denda_only'
|
||||
];
|
||||
}
|
||||
@@ -26,6 +26,6 @@ public function stiker_details ()
|
||||
// Relasi ke tabel jenis_mobil
|
||||
public function vehicle()
|
||||
{
|
||||
return $this->belongsTo(JenisMobil::class, 'id', 'jenis_mobil');
|
||||
return $this->belongsTo(VehicleItem::class, 'id', 'jenis_mobil');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,19 @@
|
||||
|
||||
class VehicleItem extends Model
|
||||
{
|
||||
protected $connection = 'pgsql_second';
|
||||
// protected $connection = 'pgsql_second';
|
||||
protected $table = 'jenis_mobil';
|
||||
protected $primaryKey = 'id';
|
||||
public $timestamps = false;
|
||||
protected $keyType = 'string';
|
||||
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'id', 'nama', 'tanggal', 'short_cut', 'orang', 'validasi', 'need_access'
|
||||
];
|
||||
|
||||
public function VehiclePrice () {
|
||||
return $this->hasOne(MasterTarif::class, 'id', 'id_mobil');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user