Add project listing selector, confirmed revision and private 3MF renders

This commit is contained in:
2026-11-08 18:49:32 +00:00
parent e62b6800a6
commit 4e675510fd
29 changed files with 3394 additions and 14 deletions
+9 -1
View File
@@ -16,7 +16,10 @@ class Project extends Model
/** @var list<string> */
public const STAGES = ['design', 'ready', 'live', 'retired'];
protected $fillable = ['reference', 'title', 'notes', 'stage', 'currency', 'created_by', 'archived_at'];
protected $fillable = [
'reference', 'title', 'notes', 'stage', 'currency', 'created_by', 'archived_at',
'current_revision_id', 'lock_version',
];
protected function casts(): array
{
@@ -30,6 +33,11 @@ class Project extends Model
return $this->belongsTo(User::class, 'created_by');
}
public function currentRevision(): BelongsTo
{
return $this->belongsTo(ProjectRevision::class, 'current_revision_id');
}
public function revisions(): HasMany
{
return $this->hasMany(ProjectRevision::class);