1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class WorkerBikeOperate extends Model
- {
- //
- protected $table = "worker_bike_operates";
- protected $guarded = [];
- const TYPE_ONLINE = 1;
- const TYPE_OFFLINE = 0;
- const TYPE_OPEN_BIKE_LOCK = 2;
- const TYPE_CLOSE_BIKE_LOCK = 3;
- const TYPE_OPEN_BATTERY_LOCK = 4;
- const TYPE_CLOSE_BATTERY_LOCK = 5;
- const TYPE_REBOOT_BOX = 6;
- const TYPE_NOW_BIKE_LOCATION = 7;
- const TYPE_NOW_BIKE_BATTERY_MSG = 8;
- public static $typeMaps = [
- self::TYPE_OFFLINE => '操作下线',
- self::TYPE_ONLINE => '操作上线',
- self::TYPE_OPEN_BIKE_LOCK => '操作开电车锁',
- self::TYPE_CLOSE_BIKE_LOCK => '操作关闭电车锁',
- self::TYPE_OPEN_BATTERY_LOCK => '操作开电池锁',
- self::TYPE_CLOSE_BATTERY_LOCK => '操作关电池锁',
- self::TYPE_REBOOT_BOX => '重启中控',
- self::TYPE_NOW_BIKE_LOCATION => '立即定位',
- self::TYPE_NOW_BIKE_BATTERY_MSG => '立即刷新电池信息'
- ];
- public function workers(){
- return $this->belongsTo(AdminUser::class,'worker_id','id');
- }
- }
|