hasOne(PaymentChannelModel::class,'id', 'channel_id'); } public function cardConfig() { return $this->hasOne(CreditCardConfigModel::class,'id', 'channel_credit_card_config_id'); } protected function genSchema(array $schema) { // TODO: Implement genSchema() method. } public function findByOrderId($o_id) { return $this->where([ ['order_id', '=', $o_id], ['is_delete', '=', 0], ])->order('id', 'desc')->select(); } }