You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
429 B
PHTML
23 lines
429 B
PHTML
2 years ago
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace App\Model;
|
||
|
|
||
|
class Sms extends Model
|
||
|
{
|
||
|
const STATUS_SUCCESS = 1;
|
||
|
const STATUS_ERROR = 2;
|
||
|
const ACTIVE_MINUTE = 10;
|
||
|
|
||
|
protected $table = 'tab_sms_logs';
|
||
|
|
||
|
public function isExpired()
|
||
|
{
|
||
|
$expiredTime = strtotime($this->created_at) + self::ACTIVE_MINUTE * 60;
|
||
|
if (time() > $expiredTime) {
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
}
|