cqp hai 6 horas
pai
achega
03923a183d
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  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);
+    }
 }