bd
This commit is contained in:
23
src/app/models/FormInputModel.php
Normal file
23
src/app/models/FormInputModel.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace itguild\forms\app\models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FormInputModel extends Model
|
||||
{
|
||||
protected $table = "form_input";
|
||||
|
||||
protected $fillable = [
|
||||
'form_id', 'input_type_id', 'params'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
||||
];
|
||||
|
||||
public function inputType()
|
||||
{
|
||||
return $this->hasOne(InputTypeModel::class, "id");
|
||||
}
|
||||
}
|
23
src/app/models/FormModel.php
Normal file
23
src/app/models/FormModel.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace itguild\forms\app\models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FormModel extends Model
|
||||
{
|
||||
protected $table = "form";
|
||||
|
||||
protected $fillable = [
|
||||
'title', 'status', 'params'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
||||
];
|
||||
|
||||
public function fields()
|
||||
{
|
||||
return $this->hasMany(FormInputModel::class, "form_id");
|
||||
}
|
||||
}
|
18
src/app/models/FormResModel.php
Normal file
18
src/app/models/FormResModel.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace itguild\forms\app\models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FormResModel extends Model
|
||||
{
|
||||
protected $table = "form_res";
|
||||
|
||||
protected $fillable = [
|
||||
'form_id', 'data'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
||||
];
|
||||
}
|
18
src/app/models/InputTypeModel.php
Normal file
18
src/app/models/InputTypeModel.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace itguild\forms\app\models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class InputTypeModel extends Model
|
||||
{
|
||||
protected $table = "input_type";
|
||||
|
||||
protected $fillable = [
|
||||
'type', 'name', 'status'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
||||
];
|
||||
}
|
18
src/app/models/InputValueModel.php
Normal file
18
src/app/models/InputValueModel.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace itguild\forms\app\models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class InputValueModel extends Model
|
||||
{
|
||||
protected $table = "input_value";
|
||||
|
||||
protected $fillable = [
|
||||
'form_input_id', 'value'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user