Add project listing selector, confirmed revision and private 3MF renders
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user