cqp 10 часов назад
Родитель
Сommit
03923a183d
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      app/Model/QuantizationCreate.php

+ 7 - 0
app/Model/QuantizationCreate.php

@@ -20,4 +20,11 @@ class QuantizationCreate extends UseScopeBaseModel
         self::type_two => '合作现状量化',
         self::type_three => '人物记忆',
     ];
+
+    public function details()
+    {
+        // 链式调用 where 条件
+        return $this->hasMany(QuantizationCreateDetails::class, 'quantization_create_id', 'id')
+            ->where('del_time', 0);
+    }
 }