27 lines
527 B
PHP
27 lines
527 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class DeviceApp extends Model
|
|
{
|
|
protected $fillable = [
|
|
'device_id', 'bundle_id', 'name', 'version', 'is_wallet', 'meta_json',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'is_wallet' => 'boolean',
|
|
'meta_json' => 'array',
|
|
];
|
|
}
|
|
|
|
public function device(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Device::class);
|
|
}
|
|
}
|