<?php

namespace App\Models\Virtual;

use App\Core\Model;
use App\Models\Card\Card;

/**
 * App\Models\Virtual\FlowPoolMonth
 *
 * @property int $id 订单ID
 * @property int $month 月份
 * @property int $sim SIM号
 * @property int $package_id 套餐ID
 * @property int $pool_id 流量池ID
 * @property int $mebibyte 使用流量 单位MB
 * @property-read \App\Models\Card\Card $card
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth wheremebibyte($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth whereMonth($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth wherePoolId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth whereProductId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Virtual\FlowPoolMonth whereSim($value)
 * @mixin \Eloquent
 */
class FlowPoolMonth extends Model
{
    protected $table = 'virtual_flow_pool_months';

    public function card()
    {
        return $this->hasOne(Card::class, 'sim', 'sim');
    }
}
