您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AdjustmentCategory.php 505B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Enums\Accounting;
  3. use App\Enums\Concerns\ParsesEnum;
  4. use Filament\Support\Contracts\HasLabel;
  5. enum AdjustmentCategory: string implements HasLabel
  6. {
  7. use ParsesEnum;
  8. case Tax = 'tax';
  9. case Discount = 'discount';
  10. public function getLabel(): ?string
  11. {
  12. return $this->name;
  13. }
  14. public function isTax(): bool
  15. {
  16. return $this === self::Tax;
  17. }
  18. public function isDiscount(): bool
  19. {
  20. return $this === self::Discount;
  21. }
  22. }