停车场管理系统
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
877 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class AdminNotice extends Model
{
use HasFactory, Notifiable;
protected $table = 'admin_notice';
protected $fillable = [
'alarm_time',
'alarm_type',
'camera_ip',
'msg_type',
'msg_content',
'space_id',
'floor_id',
'camera_id',
'is_read',
'user_id',
'pattern_id'
];
/**
* The attributes that should be hidden for serialization.
* @var array<int, string>
*/
protected $hidden
= [
'updated_at',
'deleted_at'
];
public function getAlarmTimeAttribute($value): string
{
return get_datetime('datetime', strtotime($value));
}
}