81 lines
3.4 KiB
PHP
81 lines
3.4 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Business;
|
|
|
|
use App\Abstracts\Model;
|
|
|
|
class StoreReceivingAccount extends Model
|
|
{
|
|
protected $table = 'business_store_receiving_accounts';
|
|
|
|
protected $fillable = [
|
|
'company_id', 'store_platform', 'store_type', 'erp_store_name', 'store_name', 'store_id',
|
|
'store_status', 'current_company_name', 'original_company_subject', 'account_status',
|
|
'login_account', 'login_password', 'payment_password', 'payment_verification_method',
|
|
'financial_account', 'financial_password', 'financial_payment_verification_method',
|
|
'withdrawal_path', 'withdrawal_account_name', 'alipay_account', 'bank_account_last_four',
|
|
// Legacy columns remain fillable for backward-compatible records.
|
|
'wallet_number', 'store_entity_name', 'receiving_method', 'receiving_account_name',
|
|
'alipay_or_bank_account', 'opening_bank',
|
|
];
|
|
|
|
protected $casts = [
|
|
'company_id' => 'integer',
|
|
];
|
|
|
|
public static function columnLabels(): array
|
|
{
|
|
return [
|
|
'store_type' => '类型',
|
|
'erp_store_name' => 'ERP店铺名称',
|
|
'store_name' => '店铺名称',
|
|
'store_id' => '店铺id',
|
|
'store_status' => '店铺状态',
|
|
'current_company_name' => '当前公司名称',
|
|
'original_company_subject' => '原公司主体',
|
|
'account_status' => '状态',
|
|
'login_account' => '登录账号',
|
|
'login_password' => '登录密码',
|
|
'payment_password' => '支付密码',
|
|
'payment_verification_method' => '支付验证方式',
|
|
'financial_account' => '金融账号',
|
|
'financial_password' => '金融密码',
|
|
'financial_payment_verification_method' => '金融支付验证方式',
|
|
'withdrawal_path' => '提现路径',
|
|
'withdrawal_account_name' => '提现账户名称',
|
|
'alipay_account' => '支付宝账号',
|
|
'bank_account_last_four' => '银行卡账号(后四位)',
|
|
];
|
|
}
|
|
|
|
/** @return list<string> */
|
|
public static function columnsForTab(?string $tab): array
|
|
{
|
|
$taobao = [
|
|
'store_type', 'erp_store_name', 'store_name', 'store_status',
|
|
'current_company_name', 'original_company_subject', 'account_status',
|
|
'login_account', 'login_password', 'payment_password', 'withdrawal_path',
|
|
'withdrawal_account_name', 'alipay_account',
|
|
];
|
|
$jd = [
|
|
'store_type', 'erp_store_name', 'store_name', 'store_id', 'store_status',
|
|
'current_company_name', 'original_company_subject', 'login_account',
|
|
'login_password', 'payment_verification_method', 'financial_account',
|
|
'financial_password', 'financial_payment_verification_method', 'account_status',
|
|
'withdrawal_path', 'withdrawal_account_name', 'bank_account_last_four',
|
|
];
|
|
$common = [
|
|
'erp_store_name', 'store_name', 'store_status', 'current_company_name',
|
|
'original_company_subject', 'account_status', 'login_account', 'login_password',
|
|
'payment_password', 'withdrawal_path', 'withdrawal_account_name', 'bank_account_last_four',
|
|
];
|
|
|
|
return match ($tab) {
|
|
'taobao' => $taobao,
|
|
'jd' => $jd,
|
|
'douyin', 'pinduoduo' => $common,
|
|
default => $taobao,
|
|
};
|
|
}
|
|
}
|