You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
709 B
32 lines
709 B
<?php
|
|
namespace App\Http\Model;
|
|
|
|
//短信发送记录
|
|
class SmsLog extends BaseModel
|
|
{
|
|
const SUCCESS = 1;
|
|
const FAIL = 2;
|
|
|
|
protected $table = 'sms_log';
|
|
public $guarded = [];
|
|
|
|
public static function success($mobile, $text, $result)
|
|
{
|
|
self::create([
|
|
'mobile' => $mobile,
|
|
'text' => $text,
|
|
'status' => self::SUCCESS,
|
|
'result' => json_encode($result)
|
|
]);
|
|
}
|
|
|
|
public static function fail($mobile, $text, $result)
|
|
{
|
|
self::create([
|
|
'mobile' => $mobile,
|
|
'text' => $text,
|
|
'status' => self::FAIL,
|
|
'result' => json_encode($result)
|
|
]);
|
|
}
|
|
}
|