homeos/app/Models/Addon.php

24 lines
642 B
PHP

<?php
namespace App\Models;
use App\Models\Concerns\HasUuid;
use Illuminate\Database\Eloquent\Model;
/**
* An installable integration (Ring, later others). The registry (AddonRegistry) holds the static
* definition; this row holds install state + encrypted config (e.g. the Ring refresh token).
*/
class Addon extends Model
{
use HasUuid;
protected $fillable = ['uuid', 'key', 'installed', 'status', 'status_detail', 'config', 'connected_at'];
protected $casts = [
'installed' => 'boolean',
'config' => 'encrypted:array', // secrets never stored in plaintext
'connected_at' => 'datetime',
];
}