ProjectDetector.php 907 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Services\History\Detector;
  3. use App\Services\History\Converter\ConverterContact;
  4. use App\Services\History\Converter\ModelEnumConverter;
  5. use App\Services\History\Converter\WhitelistConverter;
  6. class ProjectDetector extends DetectorAbstract
  7. {
  8. public static function fields(): array
  9. {
  10. return [
  11. 'name',
  12. 'code',
  13. 'const',
  14. 'status',
  15. 'begin',
  16. 'end',
  17. 'latitude',
  18. 'type',
  19. 'acl',
  20. 'whitelist',
  21. 'description',
  22. ];
  23. }
  24. public static function diffFields(): array
  25. {
  26. return [
  27. 'description',
  28. ];
  29. }
  30. public static function converters(): array
  31. {
  32. return [
  33. "whitelist" => new WhitelistConverter(),
  34. "status" => new ModelEnumConverter("project.status"),
  35. ];
  36. }
  37. }