format('Y-m-d H:i:s'); } public function goods(){ return $this->hasOne(Goods::class,'goods_id','join_coupon_goods_id'); } public function skus(){ return $this->hasMany(GoodsSku::class,'join_sku_goods_id','join_coupon_goods_id'); } public function sku(){ return $this->hasOne(GoodsSku::class,'goods_sku_id','join_coupon_goods_sku_id'); } }