'integer', 'deployment_script_id' => 'integer', 'log_id' => 'integer', 'commit_data' => 'json', ]; protected $appends = [ 'commit_id_short', ]; public function site(): BelongsTo { return $this->belongsTo(Site::class); } public function deploymentScript(): BelongsTo { return $this->belongsTo(DeploymentScript::class); } public function log(): BelongsTo { return $this->belongsTo(ServerLog::class, 'log_id'); } public function getCommitIdShortAttribute(): string { if ($this->commit_id) { return substr($this->commit_id, 0, 7); } return ''; } }