agent/php/Models/CreditEntry.php
Virgil 6c69005aff feat(agent): implement fleet and sync RFC surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 07:27:15 +00:00

39 lines
795 B
PHP

<?php
declare(strict_types=1);
namespace Core\Mod\Agentic\Models;
use Core\Tenant\Concerns\BelongsToWorkspace;
use Core\Tenant\Models\Workspace;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class CreditEntry extends Model
{
use BelongsToWorkspace;
protected $fillable = [
'workspace_id',
'fleet_node_id',
'task_type',
'amount',
'balance_after',
'description',
];
protected $casts = [
'amount' => 'integer',
'balance_after' => 'integer',
];
public function workspace(): BelongsTo
{
return $this->belongsTo(Workspace::class);
}
public function fleetNode(): BelongsTo
{
return $this->belongsTo(FleetNode::class);
}
}