<?php

namespace app\model;

/**
 * @property int id
 */
class PaymentListModel extends BaseModel
{

    protected $name = 'payment_list';
    protected $pk = 'id';

    //

    public static function getPaymentList($where): array
    {
        $list = self::where($where)->select();
        if ($list) {
            return $list->toArray();
        } else {
            return [];
        }
    }

    public static function getPaymentInfo($where): array
    {
        $list = self::where($where)->find();
        if ($list) {
            return $list->toArray();
        } else {
            return [];
        }
    }

    const BANK = 1;
    const IND_PAY = 2;
    const MO_PAY = 3;
    const HT_PAY = 4;
    const XD_PAY = 5;
    const QEAE_PAY = 6;
    const NICE_PAY = 7;
    const CLICK_PAY = 8;
    const STAR_PAY = 9;
    const TPYE_LIST = [
        self::IND_PAY => 'IND PAY',
        self::MO_PAY => 'MO PAY',
        self::HT_PAY => 'HT PAY',
        self::XD_PAY => 'XD PAY',
        self::QEAE_PAY => 'QEAE PAY',
        self::NICE_PAY => 'NICE PAY',
        self::CLICK_PAY => 'CLICK PAY',
        self::STAR_PAY => 'STAR PAY',
    ];

}