停车场管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 lines
914 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ParkingReservation extends Model
{
use HasFactory;
protected $table = 'parking_reservation';
protected $fillable
= [
'reserve_id',
'space_type_id',
'license_plate_type',
'license_plate_id',
'is_driver',
'floor_id',
'floor_region_id',
'status',
'confirm_at'
];
protected $hidden
= [
'updated_at'
];
public function getCreatedAtAttribute($value): string
{
return get_datetime('date_time', strtotime($value));
}
public function getConfirmAtAttribute($value): string
{
return is_null($value)
? ''
: get_datetime('date_time', strtotime($value));
}
}