style updates

This commit is contained in:
Mark Gregory
2026-07-24 14:59:44 +01:00
parent 24ab771cd3
commit dd23205d0b
482 changed files with 7173 additions and 1435 deletions
@@ -1,14 +1,31 @@
<?php
namespace Modules\Marketplace\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
final class InstalledPackage extends Model
{
protected $table='marketplace_installed_packages';
protected $fillable=['marketplace_package_id','package_name','type','version','status','manifest','checksum','install_path','is_enabled','installed_by','installed_at','updated_at_marketplace'];
protected $casts=['manifest'=>'array','is_enabled'=>'boolean','installed_at'=>'datetime','updated_at_marketplace'=>'datetime'];
public function package(): BelongsTo { return $this->belongsTo(MarketplacePackage::class,'marketplace_package_id'); }
public function installations(): HasMany { return $this->hasMany(Installation::class,'installed_package_id'); }
public function hasUpdate(): bool { return $this->package?->latest_version && version_compare($this->package->latest_version,$this->version,'>'); }
protected $table = 'marketplace_installed_packages';
protected $fillable = ['marketplace_package_id', 'package_name', 'type', 'version', 'status', 'manifest', 'checksum', 'install_path', 'is_enabled', 'installed_by', 'installed_at', 'updated_at_marketplace'];
protected $casts = ['manifest' => 'array', 'is_enabled' => 'boolean', 'installed_at' => 'datetime', 'updated_at_marketplace' => 'datetime'];
public function package(): BelongsTo
{
return $this->belongsTo(MarketplacePackage::class, 'marketplace_package_id');
}
public function installations(): HasMany
{
return $this->hasMany(Installation::class, 'installed_package_id');
}
public function hasUpdate(): bool
{
return $this->package?->latest_version && version_compare($this->package->latest_version, $this->version, '>');
}
}