<?php

namespace App\Dao\Sms;

use App\Models\Sms\SmsSendLog;
use App\Models\Sms\SmsTemplate;

class SmsDao
{
    /**
     * 短信模板
     *
     * @param $templateType
     * @return mixed
     */
    public function getSmsTemplate($templateType)
    {
        return SmsTemplate::where('template_type', $templateType)->first();
    }

    /**
     * 记录短信发送日志
     *
     * @param $data
     * @return mixed
     */
    public function recordSmsLog($data)
    {
        return SmsSendLog::create($data);
    }
}