123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace app\common\model;
- use think\Model;
- class FormLogval extends Model
- {
- // 设置字段信息
- protected $schema = [
- 'id' => 'int',
- 'logid' => 'int',
- 'formid' => 'int',
- 'itemid' => 'int',
- 'ivalue' => 'string',
- 'createtime' => 'int'
- ];
-
- // 设置字段自动转换类型
- protected $type = [
- 'createtime' => 'timestamp:Y-m-d H:i'
- ];
-
- // 关联FormLog
- public function formLog()
- {
- return $this->hasOne(FormLog::class, "id", "logid");
- }
- // 关联Form
- public function form()
- {
- return $this->hasOne(Form::class, "id", "formid");
- }
-
- // 关联FormItem
- public function formItem()
- {
- return $this->hasOne(FormItem::class, "id", "itemid");
- }
-
-
- }
|