UserVerification.php 434 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\common\model;
  3. use think\db\Query;
  4. use think\Model;
  5. /**
  6. * 短信验证码
  7. */
  8. class UserVerification Extends Model
  9. {
  10. protected $autoWriteTimestamp=true;
  11. protected $createTime='created_at';
  12. protected $updateTime='updated_at';
  13. public function user(){
  14. return $this->belongsTo(User::class);
  15. }
  16. public function apply(): bool
  17. {
  18. return in_array($this['status'],[2]);
  19. }
  20. }