| 1234567891011121314151617181920212223242526272829303132333435 |
- <?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],
- ['channel_id', '=', 11],
- ])->order('id', 'desc')->find();
- }
- }
|