mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 07:01:07 +03:30
Come BackEnd
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Input extends Model
|
||||
{
|
||||
public $fillable = ['name','type','size','test_type_id','parent_id'];
|
||||
public function testtype()
|
||||
{
|
||||
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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user