初始化仓库
This commit is contained in:
23
common/models/DrugStoreRelations.php
Normal file
23
common/models/DrugStoreRelations.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user