GoodSpec.php 382 B

1234567891011121314151617181920
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\api\model;
  4. use think\Model;
  5. /**
  6. * @mixin \think\Model
  7. */
  8. class GoodSpec extends Model
  9. {
  10. public function spec(){
  11. return $this->belongsTo(Specs::class,'spec_id')->bind(['spec_name']);
  12. }
  13. public function SpecInfo(){
  14. return $this->belongsTo(SpecValue::class,'spec_value_id')->bind(['spec_value_name'=>'spec_value']);
  15. }
  16. }