PlatformYouzan.php 760 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\txx\model;
  4. use app\admin\model\GoodBasic;
  5. use app\admin\model\Platform;
  6. use think\model;
  7. /**
  8. * @mixin \think\Model
  9. */
  10. class PlatformYouzan extends Model
  11. {
  12. public function good(){
  13. return $this->belongsTo(GoodBasic::class,"spuCode","spuCode")
  14. ->bind(["good_name","cat_id","is_exclusive","brand_id","good_img","good_unit","unit_name","brand_name","cat_name",'cat_search']);
  15. }
  16. public function platform(){
  17. return $this->belongsTo(Platform::class,"platform_id","id")->bind(["platform_name"]);
  18. }
  19. public function yzGood(){
  20. return $this->belongsTo(YzGood::class,"skuCode","item_no")->bind(["origin_price"=>"origin","deatil_url","yz_status"=>"status"]);
  21. }
  22. }