xieruidong il y a 2 ans
Parent
commit
ee0354f866
2 fichiers modifiés avec 22 ajouts et 0 suppressions
  1. 10 0
      application/common/model/Goods.php
  2. 12 0
      application/common/model/GoodsSku.php

+ 10 - 0
application/common/model/Goods.php

@@ -11,4 +11,14 @@ class Goods Extends Model
 {
     // 开启自动写入时间戳字段
     protected $autoWriteTimestamp = true;
+
+    public function sku(){
+        return $this->hasMany(GoodsSku::class);
+    }
+    public function detail(){
+        return $this->hasMany(GoodsDetail::class);
+    }
+    public function service(){
+        return $this->hasMany(GoodsService::class);
+    }
 }

+ 12 - 0
application/common/model/GoodsSku.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace app\common\model;
+
+use think\Model;
+
+/**
+ * 邮箱验证码
+ */
+class GoodsSku Extends Model
+{
+}