Files
xk-api-yii/common/models/DrugStoreRelations.php

30 lines
559 B
PHP
Raw Normal View History

2024-09-19 11:32:39 +08:00
<?php
namespace common\models;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
class DrugStoreRelations extends \common\modelsgii\DrugStoreRelations
{
//关联基本药品信息
public function getDrug()
{
return $this->hasOne(Drug::class,['id'=>'drug_id']);
}
//关联仓库
public function getDrugStoreDrug()
{
return $this->hasOne(DrugStoreDrug::class,['drug_id'=>'drug_id']);
}
2024-11-05 13:26:58 +08:00
public function getStore()
{
return $this->hasOne(Store::class,['id' => 'store_id']);
}
2024-09-19 11:32:39 +08:00
}