| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\common\model;
- class OrderPaymentModel extends BaseModel
- {
- protected $table = 'erp_order_payment';
- public function paymentChannel() {
- return $this->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();
- }
- }
|