<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class DeviceBox extends Model
{
    protected $table = 'device_box';

    const DISABLE = 0;
    const SUCCESS = 1;

    public static $_status=[
       self::DISABLE=>'禁用',
       self::SUCCESS=>'启用'
    ];

    public static function getStatus()
    {
        return self::$_status;
    }

    public function devices()
    {
        return $this->hasOne(DeviceInfo::class,'id','device_id');
    }

}
