GoodsSku.php 338 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\model;
  3. use support\Model;
  4. class GoodsSku extends Model
  5. {
  6. protected $table = 'goods_sku';
  7. protected $primaryKey = 'goods_sku_id';
  8. const CREATED_AT = null;
  9. const UPDATED_AT = null;
  10. public function goods()
  11. {
  12. return $this->hasOne(Goods::class,'goods_id','join_sku_goods_id');
  13. }
  14. }