RequirementDetector.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace App\Services\History\Detector;
  3. use App\Services\History\Converter\ConverterContact;
  4. use App\Services\History\Converter\EmailConverter;
  5. use App\Services\History\Converter\ModelEnumConverter;
  6. use App\Services\History\Converter\WhitelistConverter;
  7. class RequirementDetector extends DetectorAbstract
  8. {
  9. public static function fields(): array
  10. {
  11. return [
  12. 'title',
  13. 'status',
  14. 'asset_id',
  15. 'requirement_group_id',
  16. 'reviewed_by',
  17. 'priority',
  18. 'note',
  19. 'mailto',
  20. 'plan_id',
  21. 'comment',
  22. 'close_reason',
  23. 'description',
  24. 'acceptance',
  25. ];
  26. }
  27. public static function diffFields(): array
  28. {
  29. return [
  30. 'description',
  31. 'comment',
  32. 'acceptance',
  33. ];
  34. }
  35. public static function converters():array
  36. {
  37. return [
  38. "whitelist" => new WhitelistConverter(),
  39. "mailto" => new EmailConverter(),
  40. "status" => new ModelEnumConverter("requirement.status"),
  41. ];
  42. }
  43. public static function arrayFields(): array
  44. {
  45. return [
  46. 'mailto'
  47. ];
  48. }
  49. }