StoreMiniAuth.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. namespace app\models;
  3. use yii\behaviors\TimestampBehavior;
  4. use yii\db\ActiveRecord;
  5. /**
  6. * Class StoreMedia
  7. * @package app\models
  8. * @property integer $id
  9. * @property integer $store_id
  10. * @property integer $mini_id
  11. * @property string $task_id
  12. * @property string $auth_form
  13. * @property integer $task_status
  14. * @property integer $apply_status
  15. * @property string $task_message
  16. * @property string $provider
  17. * @property string $contact
  18. * @property string $auth_url
  19. * @property string $pic_url
  20. * @property integer $is_delete
  21. * @property string $created_at
  22. * @property string $updated_at
  23. * @property string $dispatch_time
  24. **/
  25. class StoreMiniAuth extends \yii\db\ActiveRecord
  26. {
  27. /**
  28. * @inheritdoc
  29. */
  30. public static function tableName()
  31. {
  32. return '{{%store_mini_auth}}';
  33. }
  34. /**
  35. * @inheritdoc
  36. */
  37. public function rules()
  38. {
  39. return [
  40. [["id", "store_id", "mini_id", 'task_status', 'apply_status', 'is_delete'], 'integer'],
  41. [['task_id', 'auth_form', 'task_message', 'provider', 'contact', 'auth_url', 'pic_url'], 'string'],
  42. [['created_at', 'updated_at', 'dispatch_time'], 'safe']
  43. ];
  44. }
  45. public function behaviors()
  46. {
  47. return [
  48. [
  49. 'class' => TimestampBehavior::class
  50. ]
  51. ];
  52. }
  53. /**
  54. * @inheritdoc
  55. */
  56. public function attributeLabels()
  57. {
  58. return [
  59. 'id' => 'ID',
  60. 'store_id' => '',
  61. 'mini_id' => '',
  62. 'task_id' => '人脸核验任务id',
  63. 'auth_form' => 'icp表单',
  64. 'task_status' => '状态码,见各API返回码。当task_status为0, 6, 9, 12时有事件通知',
  65. 'apply_status' => '审核单状态,当apply_status变为2、3、4、5时会有事件通知',
  66. 'task_message' => '提示信息',
  67. 'provider' => '审核机构名称 当apply_status=2时有效',
  68. 'contact' => '审核机构联系方式 当apply_status=2时有效',
  69. 'auth_url' => '授权链接',
  70. 'is_delete' => '',
  71. 'created_at' => '',
  72. 'updated_at' => '',
  73. 'dispatch_time' => '派单时间戳(秒) 当apply_status=2时有效',
  74. 'pic_url' => '二维码存放地址'
  75. ];
  76. }
  77. /*
  78. * task_status 1:"任务超时,24小时内有效"; 2:"用户授权拒绝"; 3:"用户授权同意"; 4:"发起人脸流程"; 5:"人脸认证失败"; 6:"人脸认证成功";
  79. * 7:"人脸认证后,已经提交手机号码下发验证码"; 8:"手机验证失败"; 9:"手机验证成功"; 11:"创建认证审核单失败"; 12:"创建认证审核单成功"; 14:"验证失败";
  80. * 15:"等待支付";
  81. */
  82. /*
  83. * apply_status 2:"审核中"; 3:"打回重填"; 4:"认证通过"; 5:"认证最终失败"
  84. */
  85. }