initial: project state before operator dashboard card redesign
This commit is contained in:
commit
e0aed8eed7
113 files changed
+20074
No files matched your search
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use App\Models\User;
|
||||
|
||||
class Booking extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'parking_lot_id',
|
||||
'customer_name',
|
||||
'phone',
|
||||
'vehicle_plate',
|
||||
'source',
|
||||
'start_time',
|
||||
'end_time',
|
||||
'status',
|
||||
'total_fee',
|
||||
'payment_method',
|
||||
'payment_proof',
|
||||
'paid_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'start_time' => 'datetime',
|
||||
'end_time' => 'datetime',
|
||||
'paid_at' => 'datetime',
|
||||
'total_fee' => 'decimal:2',
|
||||
];
|
||||
|
||||
public function parkingLot(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ParkingLot::class);
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in new issue
Block a user