You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BankAccountType.php 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. namespace App\Enums;
  3. use Filament\Support\Contracts\HasLabel;
  4. enum BankAccountType: string implements HasLabel
  5. {
  6. case Investment = 'investment';
  7. case Credit = 'credit';
  8. case Depository = 'depository';
  9. case Loan = 'loan';
  10. case Other = 'other';
  11. public const DEFAULT = self::Depository;
  12. public function getLabel(): ?string
  13. {
  14. return translate($this->name);
  15. }
  16. public function getSubtypes(): array
  17. {
  18. return match ($this) {
  19. self::Depository => [
  20. BankAccountSubtype::Checking,
  21. BankAccountSubtype::Savings,
  22. BankAccountSubtype::HealthSavingsAccountCash,
  23. BankAccountSubtype::CertificateOfDeposit,
  24. BankAccountSubtype::MoneyMarket,
  25. BankAccountSubtype::Paypal,
  26. BankAccountSubtype::Prepaid,
  27. BankAccountSubtype::CashManagement,
  28. BankAccountSubtype::ElectronicBenefitsTransfer,
  29. ],
  30. self::Credit => [
  31. BankAccountSubtype::CreditCard,
  32. BankAccountSubtype::PaypalCredit,
  33. ],
  34. self::Loan => [
  35. BankAccountSubtype::Auto,
  36. BankAccountSubtype::Business,
  37. BankAccountSubtype::Commercial,
  38. BankAccountSubtype::Construction,
  39. BankAccountSubtype::Consumer,
  40. BankAccountSubtype::HomeEquity,
  41. BankAccountSubtype::Loan,
  42. BankAccountSubtype::Mortgage,
  43. BankAccountSubtype::Overdraft,
  44. BankAccountSubtype::LineOfCredit,
  45. BankAccountSubtype::Student,
  46. BankAccountSubtype::Other,
  47. ],
  48. self::Investment => [
  49. BankAccountSubtype::CollegeSavings529,
  50. BankAccountSubtype::Retirement401a,
  51. BankAccountSubtype::Retirement401K,
  52. BankAccountSubtype::Retirement403b,
  53. BankAccountSubtype::DeferredCompensation457b,
  54. BankAccountSubtype::Brokerage,
  55. BankAccountSubtype::CashIndividualSavingsAccount,
  56. BankAccountSubtype::CryptoCurrencyExchange,
  57. BankAccountSubtype::EducationSavingsAccount,
  58. BankAccountSubtype::FixedAnnuity,
  59. BankAccountSubtype::GuaranteedInvestmentCertificate,
  60. BankAccountSubtype::HealthSavingsAccountNonCash,
  61. BankAccountSubtype::IndividualRetirementAccount,
  62. BankAccountSubtype::IndividualSavingsAccount,
  63. BankAccountSubtype::KeoghPlan,
  64. BankAccountSubtype::LifeIncomeFund,
  65. BankAccountSubtype::LifeInsuranceAccount,
  66. BankAccountSubtype::LockedInRetirementAccount,
  67. BankAccountSubtype::LockedInRetirementIncomeFund,
  68. BankAccountSubtype::LockedInRetirementSavingsPlan,
  69. BankAccountSubtype::MutualFundAccount,
  70. BankAccountSubtype::CryptoCurrencyWallet,
  71. BankAccountSubtype::NonTaxableBrokerageAccount,
  72. BankAccountSubtype::AnnuityAccountOther,
  73. BankAccountSubtype::InsuranceAccountOther,
  74. BankAccountSubtype::PensionAccount,
  75. BankAccountSubtype::PrescribedRetirementIncomeFund,
  76. BankAccountSubtype::ProfitSharingPlanAccount,
  77. BankAccountSubtype::QualifyingShareAccount,
  78. BankAccountSubtype::RegisteredDisabilitySavingsPlan,
  79. BankAccountSubtype::RegisteredEducationSavingsPlan,
  80. BankAccountSubtype::RetirementAccountOther,
  81. BankAccountSubtype::RestrictedLifeIncomeFund,
  82. BankAccountSubtype::RothIRA,
  83. BankAccountSubtype::Roth401k,
  84. BankAccountSubtype::RegisteredRetirementIncomeFund,
  85. BankAccountSubtype::RegisteredRetirementSavingsPlan,
  86. BankAccountSubtype::SalaryReductionSEPPlan,
  87. BankAccountSubtype::SimplifiedEmployeePensionIRA,
  88. BankAccountSubtype::SavingsIncentiveMatchPlanForEmployeesIRA,
  89. BankAccountSubtype::SelfInvestedPersonalPension,
  90. BankAccountSubtype::StockPlanAccount,
  91. BankAccountSubtype::TaxFreeSavingsAccount,
  92. BankAccountSubtype::TrustAccount,
  93. BankAccountSubtype::UniformGiftToMinorsAct,
  94. BankAccountSubtype::UniformTransfersToMinorsAct,
  95. BankAccountSubtype::VariableAnnuityAccount,
  96. ],
  97. self::Other => [
  98. BankAccountSubtype::Other,
  99. ],
  100. };
  101. }
  102. }