255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'user_id' => 'User ID', 'order_no' => 'Order No', 'price' => 'Price', 'service_charge' => 'Service Charge', 'type' => 'Type', 'extra' => 'Extra', 'status' => 'Status', 'is_delete' => 'Is Delete', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'deleted_at' => 'Deleted At', 'content' => 'Content', 'name' => 'Name', 'model' => 'Model', 'transfer_status' => 'Transfer Status', 'phone' => 'Phone', ]; } const PAY_TYPE = 'pay_type'; // 提现方式 const PAY_TYPE_LIST = ['auto' => '自动打款', 'wechat' => '微信线下转账', 'alipay' => '支付宝线下转账', 'bank' => '银行线下转账', 'balance' => '提现到余额']; const CASH_SERVICE_CHARGE = 'cash_service_charge'; // 提现手续费 public function getUser() { return $this->hasOne(User::className(), ['id' => 'user_id']); } public function getStatusText($status) { $text = ['申请中', '同意申请,待打款', '已打款', '驳回']; return isset($text[$status]) ? $text[$status] : '未知状态' . $status; } public function getTypeText($type) { $typeList = [ 'auto' => '自动打款', 'wechat' => '微信打款', 'alipay' => '支付宝打款', 'bank' => '银行转账', 'balance' => '打款到余额' ]; return isset($typeList[$type]) ? $typeList[$type] : '未知类型:' . $type; } public function getTypeText2($type) { $typeList = [ 'auto' => '自动打款', 'wechat' => '微信钱包', 'alipay' => '支付宝', 'bank' => '银行卡', 'balance' => '余额' ]; return isset($typeList[$type]) ? $typeList[$type] : '未知类型:' . $type; } }