<?php

namespace App\Modules\Subscribe\Services;

use App\Modules\Subscribe\Models\ChapterReminder;

class ChapterReminderService
{


    //判断是否提醒
    static function checkIsNoReminder($uid,$bid)
    {
    	return ChapterReminder::where('uid',$uid)
                     ->where('bid',$bid)
                     ->count();
    }

    //创建提醒
    static function add($uid,$bid)
    {
        return ChapterReminder::firstOrCreate(compact('bid','uid'));
    }

}