PlatformYouzan.php 788 B

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