|
@@ -85,6 +85,10 @@ class User extends BaseModel
|
|
|
public function storeOrdersAsClient() {
|
|
|
return $this->hasMany(StoreOrder::class, 'user_id', 'id')->orderBy('created_at', 'DESC');
|
|
|
}
|
|
|
+
|
|
|
+ public function parentStoreOrdersAsClient() {
|
|
|
+ return $this->hasMany(StoreOrder::class, 'user_id', 'id')->whereRaw('parent_order_id IS NULL')->orderBy('created_at', 'DESC');
|
|
|
+ }
|
|
|
|
|
|
public function memos()
|
|
|
{
|