hasOne(SupplierOrder::class, 'supplier_id', 'id'); // TODO: Change the autogenerated stub } public function hasManySupplierOrderCount() { return $this->hasMany(SupplierOrder::class, 'supplier_id', 'id'); // TODO: Change the autogenerated stub } public function hasOneSupplierWithdraw() { return $this->hasOne(SupplierWithdraw::class, 'supplier_id', 'id'); // TODO: Change the autogenerated stub } public function hasOneSupplierWithdrawing() { return $this->hasOne(SupplierWithdraw::class, 'supplier_id', 'id'); // TODO: Change the autogenerated stub } public function hasManyOrder() { return $this->belongsToMany(\app\common\models\Order::class,'yz_supplier_order', 'supplier_id', 'order_id'); } }