MobileCert.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "wz_mobile_cert".
  6. *
  7. * @property int $id ID
  8. * @property int $user_id 用户ID
  9. * @property string|null $mobile 手机号码
  10. * @property string|null $cert_key 验证码
  11. * @property int $cert 1:验证 0:未验证
  12. * @property int $request_from 请求来源
  13. * @property int $sent_time 验证码发送时间
  14. * @property int $cert_time 验证时间
  15. */
  16. class MobileCert extends \app\common\models\EActiveRecord
  17. {
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public static function tableName()
  22. {
  23. return '{{%mobile_cert}}';
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function rules()
  29. {
  30. return [
  31. [['user_id', 'cert', 'request_from', 'sent_time', 'cert_time'], 'integer'],
  32. [['mobile'], 'string', 'max' => 11],
  33. [['cert_key'], 'string', 'max' => 15],
  34. ];
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => 'ID',
  43. 'user_id' => 'User ID',
  44. 'mobile' => 'Mobile',
  45. 'cert_key' => 'Cert Key',
  46. 'cert' => 'Cert',
  47. 'request_from' => 'Request From',
  48. 'sent_time' => 'Sent Time',
  49. 'cert_time' => 'Cert Time',
  50. ];
  51. }
  52. }