From 6f8340b90bd342b2cc48a19b68893c44eef11ac2 Mon Sep 17 00:00:00 2001 From: Ludovic CANDELLIER Date: Mon, 22 Jan 2024 22:52:03 +0100 Subject: [PATCH] remove old models --- app/Models/Shop/Price.php | 32 ------------------------ app/Models/Shop/PriceGenericCategory.php | 22 ---------------- app/Repositories/Shop/Prices.php | 27 -------------------- 3 files changed, 81 deletions(-) delete mode 100644 app/Models/Shop/Price.php delete mode 100644 app/Models/Shop/PriceGenericCategory.php delete mode 100644 app/Repositories/Shop/Prices.php diff --git a/app/Models/Shop/Price.php b/app/Models/Shop/Price.php deleted file mode 100644 index 8f8e6720..00000000 --- a/app/Models/Shop/Price.php +++ /dev/null @@ -1,32 +0,0 @@ -belongsTo(Article::class); - } - - public function article_family() - { - return $this->belongsTo(ArticleNature::class); - } - - public function scopeByArticle($query, $id) - { - return $query->where($this->table.'.article_id', $id); - } - - public function scopeByArticleNature($query, $id) - { - return $query->where($this->table.'.article_family_id', $id); - } -} diff --git a/app/Models/Shop/PriceGenericCategory.php b/app/Models/Shop/PriceGenericCategory.php deleted file mode 100644 index 04185a2e..00000000 --- a/app/Models/Shop/PriceGenericCategory.php +++ /dev/null @@ -1,22 +0,0 @@ -belongsTo(ArticleNature::class); - } - - public function price_generics() - { - return $this->hasMany(PriceGeneric::class, 'category_id'); - } -} diff --git a/app/Repositories/Shop/Prices.php b/app/Repositories/Shop/Prices.php deleted file mode 100644 index 3bfad6e1..00000000 --- a/app/Repositories/Shop/Prices.php +++ /dev/null @@ -1,27 +0,0 @@ - Price::byArticle($id)->notGeneric()->get()->toArray(), - 'generics' => Price::byArticle($id)->generic()->with([ - 'generic.prices', - 'generic.category', - ])->get()->toArray(), - ]; - } - - public static function getModel() - { - return Price::query(); - } -}