<?php
/**
 * Created by PhpStorm.
 * User: tandunzhao
 * Date: 2017/12/4
 * Time: 上午11:49
 */

namespace App\Modules\Book\Services;


use App\Modules\Book\Models\BookSpecialChannel;

class BookSpecialChannelService
{

    /**
     * 设置书本的渠道标识
     * @param $bid  书本id
     * @param $channels 渠道列表
     * @return mixed
     */
    public static function addSpecialChannle($bid, $channels)
    {
        return BookSpecialChannel::addSpecialChannle($bid,$channels);
    }

    /**
     * 设置书本的渠道标识
     * @param $bid  书本id
     * @param $channels 渠道列表
     * @return mixed
     */
    public static function clearSpecialChannle($bid)
    {
        return BookSpecialChannel::clearSpecialChannle($bid);
    }

    /**
     * 获取书本设置的渠道标识
     * @param $bid
     * @return mixed
     */
    public static function getChannelsByBid($bid)
    {
        return BookSpecialChannel::getChannelsByBid($bid);
    }

    /**
     * 获取渠道下配置的所有的书本id列表
     * @param $channel_user_id
     * @return array
     */
    public static function getBids($channel_user_id)
    {
        return BookSpecialChannel::getBids($channel_user_id);
    }
}