'打款信息新增', self::ACTION_CHANGE => '打款信息变更']; public const ACCOUNT_TYPES = ['对公', '对私']; /** 对应协议签署里的文件类型。 */ public const DOCUMENT_TYPES = [self::ACTION_ADD => 'account-proof', self::ACTION_CHANGE => 'account-change']; protected $table = 'business_courier_payment_accounts'; protected $fillable = [ 'company_id', 'expcode', 'courier_name', 'action', 'account_type', 'account_name', 'bank_name', 'account_number', 'effective_date', 'old_account_name', 'old_account_number', 'old_stop_date', 'change_date', 'note', 'created_by', 'updated_by', ]; protected $casts = [ 'account_number' => 'encrypted', 'old_account_number' => 'encrypted', 'effective_date' => 'date', 'old_stop_date' => 'date', 'change_date' => 'date', ]; public function documentType(): string { return self::DOCUMENT_TYPES[$this->action] ?? 'account-proof'; } public function actionLabel(): string { return self::ACTIONS[$this->action] ?? $this->action; } }