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.
42 lines
812 B
42 lines
812 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ParkingSpace extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'parking_space';
|
|
|
|
protected $fillable
|
|
= [
|
|
'floor_id',
|
|
'number',
|
|
'space_attr_id',
|
|
'license_plate_id',
|
|
'berthing_time',
|
|
'recognition',
|
|
'status',
|
|
'space_type_id',
|
|
'operation_type'
|
|
];
|
|
|
|
protected $hidden
|
|
= [
|
|
'created_at'
|
|
];
|
|
|
|
|
|
public function getUpdatedAtAttribute($value): string
|
|
{
|
|
return is_null($value)
|
|
? ''
|
|
: get_datetime(
|
|
'date_time',
|
|
strtotime($value)
|
|
);
|
|
}
|
|
}
|
|
|