123456789101112131415161718192021222324 |
- <?php
- declare (strict_types = 1);
- namespace app\admin\model;
- use think\Model;
- /**
- * @mixin \think\Model
- */
- class GoodBasic extends Model
- {
- public function brand(){
- return $this->belongsTo(Brand::class,"brand_id","id")->bind(["brand_name"]);
- }
- public function category(){
- return $this->belongsTo(Cat::class,"cat_id","id")->bind(["cat_name","cat_search"=>"search"]);
- }
- public function Unit(){
- return $this->belongsTo(Unit::class,"good_unit","id")->bind(["unit_name"=>"unit"]);
- }
- }
|