<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;

class AlarmOrder extends Model
{
    protected $table = 'alarm_order';
    public $timestamps = false;

    // 获取报警记录
    public function reportpolices()
    {
        return $this->hasOne('Reportpolice');
    }

    public function getCreatedAtAttribute($value)
    {
        return Carbon::parse($value)->toDateTimeString();
    }

    public function getUpdatedAtAttribute($value)
    {
        return Carbon::parse($value)->toDateTimeString();
    }


}
