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