30], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'drug_id' => '药品ID', 'name' => '名字', 'number' => '数量', 'order' => '先下后下', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public function getUnit(){ return $this->hasOne(WestUnit::class,['id' => 'unit'])->select('id,name'); } public function getUseWay(){ return $this->hasOne(DrugUseWay::class,['id' => 'order'])->select('id,name'); } }