Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
16 / 16 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| DealActivityType | |
100.00% |
16 / 16 |
|
100.00% |
1 / 1 |
15 | |
100.00% |
1 / 1 |
| label | |
100.00% |
16 / 16 |
|
100.00% |
1 / 1 |
15 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Sales\Domain\Enums; |
| 6 | |
| 7 | enum DealActivityType: string |
| 8 | { |
| 9 | case Created = 'created'; |
| 10 | case ServiceStarted = 'service_started'; |
| 11 | case StageChanged = 'stage_changed'; |
| 12 | case VisitCreated = 'visit_created'; |
| 13 | case VisitCompleted = 'visit_completed'; |
| 14 | case ProposalSent = 'proposal_sent'; |
| 15 | case NoteAdded = 'note_added'; |
| 16 | case TaskCreated = 'task_created'; |
| 17 | case TaskCompleted = 'task_completed'; |
| 18 | case NextActionSet = 'next_action_set'; |
| 19 | case Won = 'won'; |
| 20 | case Lost = 'lost'; |
| 21 | case AutomationAlert = 'automation_alert'; |
| 22 | case Message = 'message'; |
| 23 | |
| 24 | public function label(): string |
| 25 | { |
| 26 | return match ($this) { |
| 27 | self::Created => 'Oportunidade criada', |
| 28 | self::ServiceStarted => 'Atendimento iniciado', |
| 29 | self::StageChanged => 'Estágio alterado', |
| 30 | self::VisitCreated => 'Visita criada', |
| 31 | self::VisitCompleted => 'Visita realizada', |
| 32 | self::ProposalSent => 'Proposta enviada', |
| 33 | self::NoteAdded => 'Observação', |
| 34 | self::TaskCreated => 'Tarefa criada', |
| 35 | self::TaskCompleted => 'Tarefa concluída', |
| 36 | self::NextActionSet => 'Próxima ação definida', |
| 37 | self::Won => 'Negócio concluído', |
| 38 | self::Lost => 'Negócio perdido', |
| 39 | self::AutomationAlert => 'Alerta automático', |
| 40 | self::Message => 'Mensagem', |
| 41 | }; |
| 42 | } |
| 43 | } |