'ID', 'user_card_id' => '用户卡券ID', 'clerk_id' => '核销员ID', 'store_id' => '核销门店ID', 'use_number' => '核销次数', 'surplus_number' => '剩余次数', 'clerked_at' => '核销时间', ]; } public function getStore() { return $this->hasOne(Store::className(), ['id' => 'store_id']); } public function getUser() { return $this->hasOne(User::className(), ['id' => 'clerk_id']); } public function getUserCard() { return $this->hasOne(UserCard::className(), ['id' => 'user_card_id']); } }