mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 00:41:07 +03:30
27 lines
566 B
PHP
27 lines
566 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Input extends Model
|
|
{
|
|
public $fillable = ['name','type','size','test_type_id','parent_id','require_scanner'];
|
|
public function test_type()
|
|
{
|
|
return $this->belongsTo('App\TestType');
|
|
}
|
|
public function parent()
|
|
{
|
|
return $this->belongsTo('App\Input', 'parent_id');
|
|
}
|
|
public function children()
|
|
{
|
|
return $this->hasMany('App\Input', 'parent_id');
|
|
}
|
|
public function options()
|
|
{
|
|
return $this->hasMany('App\Option');
|
|
}
|
|
}
|