1234567891011121314151617181920 |
- <?php
- declare (strict_types = 1);
- namespace app\api\model;
- use think\Model;
- /**
- * @mixin \think\Model
- */
- class GoodSpec extends Model
- {
- public function spec(){
- return $this->belongsTo(Specs::class,'spec_id')->bind(['spec_name']);
- }
-
- public function SpecInfo(){
- return $this->belongsTo(SpecValue::class,'spec_value_id')->bind(['spec_value_name'=>'spec_value']);
- }
- }
|