out new baseline

This commit is contained in:
Mark Gregory
2026-06-24 13:31:35 +01:00
parent 86bdd5dafd
commit 3737cf7ebc
14 changed files with 216 additions and 431 deletions
+16 -28
View File
@@ -4,45 +4,33 @@ declare(strict_types=1);
namespace Modules\Helpdesk\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
final class GitCommit extends Model
{
protected $table = 'git_commits';
use HasFactory;
/**
* @var array<int,string>
*/
protected $table = 'helpdesk_git_commits';
/** @var list<string> */
protected $fillable = [
'repository_full_name',
'repository_name',
'ticket_id',
'sha',
'branch',
'author_name',
'author_email',
'message',
'commit_url',
'committed_at',
'payload',
'repository_id', 'ticket_id', 'hash', 'short_hash', 'branch', 'author_name', 'author_email', 'message', 'url', 'committed_at',
];
/**
* @var array<string,string>
*/
protected $casts = [
'payload' => 'array',
'committed_at' => 'datetime',
];
/** @var array<string, string> */
protected $casts = ['repository_id' => 'integer', 'ticket_id' => 'integer', 'committed_at' => 'datetime'];
/**
* Related helpdesk ticket.
*/
/** @return BelongsTo<GitRepository, GitCommit> */
public function repository(): BelongsTo
{
return $this->belongsTo(GitRepository::class, 'repository_id');
}
/** @return BelongsTo<Ticket, GitCommit> */
public function ticket(): BelongsTo
{
return $this->belongsTo(
Ticket::class,
);
return $this->belongsTo(Ticket::class, 'ticket_id');
}
}