ajoute les alertes Prometheus du self-healing et installe Larastan (dette de l'étape 8, 72 erreurs corrigées à la racine)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
f2649d0f8b
commit
d47e8356fc
23 changed files with 340 additions and 22 deletions
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
|
@ -11,8 +10,6 @@ use Illuminate\Support\Facades\DB;
|
|||
|
||||
class LabSession extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public const EN_ATTENTE = 'en_attente';
|
||||
|
||||
// Admis par le prof : CreerStackLab est dispatché, la stack Heat se construit.
|
||||
|
|
@ -35,21 +32,25 @@ class LabSession extends Model
|
|||
'expire_a' => 'datetime',
|
||||
];
|
||||
|
||||
/** @return BelongsTo<Seance, $this> */
|
||||
public function seance(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Seance::class);
|
||||
}
|
||||
|
||||
/** @return BelongsTo<Eleve, $this> */
|
||||
public function eleve(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Eleve::class);
|
||||
}
|
||||
|
||||
/** @return BelongsTo<Lab, $this> */
|
||||
public function lab(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Lab::class);
|
||||
}
|
||||
|
||||
/** @return HasMany<LabSessionMachine, $this> */
|
||||
public function machines(): HasMany
|
||||
{
|
||||
return $this->hasMany(LabSessionMachine::class);
|
||||
|
|
@ -79,11 +80,13 @@ class LabSession extends Model
|
|||
});
|
||||
}
|
||||
|
||||
/** @return HasMany<Correction, $this> */
|
||||
public function corrections(): HasMany
|
||||
{
|
||||
return $this->hasMany(Correction::class);
|
||||
}
|
||||
|
||||
/** @return HasOne<Correction, $this> */
|
||||
public function derniereCorrection(): HasOne
|
||||
{
|
||||
return $this->hasOne(Correction::class)->latestOfMany();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue