'审核中', 2=>'审核成功', 3=>'审核失败' ]; public static $auth_status_text = [ 1=>'授权中', 2=>'授权成功', ]; /** * {@inheritdoc} */ public static function tableName() { return '{{%addons_atp_apply}}'; } /** * {@inheritdoc} */ public function rules() { return [ [['mall_id', 'status', 'is_delete', 'created_at', 'updated_at', 'auth_status', 'auth_time', 'auth_expires_time'], 'integer'], [['alipay_app_id', 'company', 'contacts', 'phone'], 'required'], [['auth_url'], 'string'], [['deal_sn', 'alipay_app_id'], 'string', 'max' => 64], [['company', 'contacts', 'reason'], 'string', 'max' => 255], [['phone'], 'string', 'max' => 11], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'deal_sn' => '单号', 'mall_id' => 'Mall ID', 'alipay_app_id' => '支付宝应用ID', 'company' => '公司名称', 'contacts' => '联系人', 'phone' => '电话', 'status' => '1审核中 2审核成功 3审查失败 ', 'is_delete' => '是否删除', 'created_at' => '创建时间', 'updated_at' => '更新时间', 'reason' => '理由', 'auth_url' => '授权url', 'auth_status' => '1 授权中 2授权通过', 'auth_time' => '授权时间', 'auth_expires_time' => '授权过期时间', ]; } public function getStatusText(){ return self::$status_text[$this->status] ?? ''; } public function getAuthStatusText(){ return self::$auth_status_text[$this->auth_status] ?? ''; } }