This commit is contained in:
2023-03-13 13:49:31 +08:00
parent 802a5081fb
commit 6d2c0374a3
6 changed files with 245 additions and 6 deletions
+15
View File
@@ -134,4 +134,19 @@ class OrderPrescriptionProduct extends Model
{
return self::create($data);
}
/**
* 获取信息-单条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getWithProductList(array $params, array $fields = ['*']): object|null
{
return self::with([
'Product'
])
->where($params)->first($fields);
}
}