<?php

namespace App\Modules\User\Models;

use Illuminate\Database\Eloquent\Model;

class QappPackage extends Model
{
    protected $table = 'qapp_package_info';

    protected $fillable =
    [
        'name',
        'package',
        'channel_id',
        'company',
        'app_pay_merchat_id',
        'h5_pay_merchat_id',
        'ali_pay_merchat_id',
    ];


    static function getPackage($channel_id)
    {
        return self::where('channel_id', $channel_id)->first();
    }

    public static function getPackageByPackage($package)
    {
        return self::where('package', $package)->first();
    }
}
