Started work to re-work database; add new models for benchmarks and components
This commit is contained in:
@ -7,12 +7,21 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Test extends Model {
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'description',
|
||||
'date_tag',
|
||||
'benchmark_id',
|
||||
'component_id',
|
||||
];
|
||||
|
||||
public function results() {
|
||||
return $this->hasMany(Result::class);
|
||||
}
|
||||
|
||||
public function benchmark() {
|
||||
return $this->belongsTo(Benchmark::class);
|
||||
}
|
||||
|
||||
public function component() {
|
||||
return $this->belongsTo(Component::class);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user