<?php

namespace App\Game;

use Illuminate\Database\Eloquent\Model;

class WebRegionConfig extends Model
{
    protected $table = 'webgame.WebRegionConfig';
    protected $primaryKey = 'id';
    public $timestamps = false;
    protected $connection = 'mysql';

    protected $fillable = [
        'RegionID', 'DomainUrl', 'LogoUrl', 'IconUrl', 'BindChannels', 'GroupID', 'GameDesc','SuggestChannel', 'ThemeKey' ,'AllChannelUnique'
    ];

    protected $casts = [
        'BindChannels' => 'json',
    ];
    public function isAllChannelsUnique()
    {
        return intval($this->AllChannelUnique)==1;
    }
}
