@hed-hog/contact 0.0.295 → 0.0.297

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/contact-type/contact-type.controller.d.ts +1 -1
  2. package/dist/contact-type/contact-type.service.d.ts +1 -1
  3. package/dist/document-type/document-type.controller.d.ts +1 -1
  4. package/dist/document-type/document-type.service.d.ts +1 -1
  5. package/dist/person/dto/reports-query.dto.d.ts +8 -0
  6. package/dist/person/dto/reports-query.dto.d.ts.map +1 -0
  7. package/dist/person/dto/reports-query.dto.js +33 -0
  8. package/dist/person/dto/reports-query.dto.js.map +1 -0
  9. package/dist/person/person.controller.d.ts +67 -10
  10. package/dist/person/person.controller.d.ts.map +1 -1
  11. package/dist/person/person.controller.js +26 -6
  12. package/dist/person/person.controller.js.map +1 -1
  13. package/dist/person/person.service.d.ts +61 -5
  14. package/dist/person/person.service.d.ts.map +1 -1
  15. package/dist/person/person.service.js +656 -298
  16. package/dist/person/person.service.js.map +1 -1
  17. package/dist/person-relation-type/person-relation-type.controller.d.ts +2 -2
  18. package/dist/person-relation-type/person-relation-type.service.d.ts +2 -2
  19. package/hedhog/data/menu.yaml +163 -163
  20. package/hedhog/data/route.yaml +68 -60
  21. package/hedhog/frontend/app/_lib/crm-sections.tsx.ejs +9 -9
  22. package/hedhog/frontend/app/accounts/_components/account-form-sheet.tsx.ejs +573 -573
  23. package/hedhog/frontend/app/accounts/_components/account-types.ts.ejs +9 -9
  24. package/hedhog/frontend/app/accounts/page.tsx.ejs +970 -970
  25. package/hedhog/frontend/app/activities/_components/activity-detail-sheet.tsx.ejs +240 -240
  26. package/hedhog/frontend/app/activities/_components/activity-types.ts.ejs +66 -66
  27. package/hedhog/frontend/app/activities/page.tsx.ejs +460 -460
  28. package/hedhog/frontend/app/dashboard/_components/dashboard-types.ts.ejs +70 -70
  29. package/hedhog/frontend/app/dashboard/page.tsx.ejs +639 -639
  30. package/hedhog/frontend/app/follow-ups/page.tsx.ejs +785 -785
  31. package/hedhog/frontend/app/person/_components/person-interaction-dialog.tsx.ejs +10 -12
  32. package/hedhog/frontend/app/reports/_components/report-types.ts.ejs +84 -0
  33. package/hedhog/frontend/app/reports/page.tsx.ejs +1196 -15
  34. package/hedhog/frontend/messages/en.json +242 -123
  35. package/hedhog/frontend/messages/pt.json +242 -123
  36. package/hedhog/table/crm_activity.yaml +68 -68
  37. package/hedhog/table/crm_stage_history.yaml +34 -0
  38. package/hedhog/table/person_company.yaml +27 -27
  39. package/package.json +9 -9
  40. package/src/person/dto/account.dto.ts +100 -100
  41. package/src/person/dto/activity.dto.ts +54 -54
  42. package/src/person/dto/dashboard-query.dto.ts +25 -25
  43. package/src/person/dto/followup-query.dto.ts +25 -25
  44. package/src/person/dto/reports-query.dto.ts +25 -0
  45. package/src/person/person.controller.ts +176 -159
  46. package/src/person/person.service.ts +4825 -4288
@@ -448,9 +448,9 @@
448
448
  }
449
449
  }
450
450
  },
451
- "CrmDashboard": {
452
- "title": "Dashboard CRM",
453
- "subtitle": "Painel executivo e operacional do funil comercial conectado aos dados reais do módulo atual.",
451
+ "CrmDashboard": {
452
+ "title": "Dashboard CRM",
453
+ "subtitle": "Painel executivo e operacional do funil comercial conectado aos dados reais do módulo atual.",
454
454
  "breadcrumbs": {
455
455
  "home": "Home",
456
456
  "crm": "CRM"
@@ -460,22 +460,22 @@
460
460
  "heroDescription": "Acompanhe os indicadores mais relevantes do CRM, identifique gargalos de conversão e direcione a operação por owner, estágio e origem do lead.",
461
461
  "primaryAction": "Abrir pipeline",
462
462
  "secondaryAction": "Ver leads e contatos",
463
- "refresh": "Atualizar",
464
- "filters": {
465
- "ownerPlaceholder": "Responsável",
466
- "ownerAll": "Todos os responsáveis",
467
- "periodPlaceholder": "Período",
468
- "period7d": "Últimos 7 dias",
469
- "period30d": "Últimos 30 dias",
470
- "period90d": "Últimos 90 dias",
471
- "periodCustom": "Intervalo customizado",
472
- "dateFrom": "Data inicial",
473
- "dateTo": "Data final"
474
- },
475
- "summary": {
476
- "pipelineValue": "Valor em pipeline",
477
- "conversionRate": "Conversão geral",
478
- "activeOwners": "Owners ativos"
463
+ "refresh": "Atualizar",
464
+ "filters": {
465
+ "ownerPlaceholder": "Responsável",
466
+ "ownerAll": "Todos os responsáveis",
467
+ "periodPlaceholder": "Período",
468
+ "period7d": "Últimos 7 dias",
469
+ "period30d": "Últimos 30 dias",
470
+ "period90d": "Últimos 90 dias",
471
+ "periodCustom": "Intervalo customizado",
472
+ "dateFrom": "Data inicial",
473
+ "dateTo": "Data final"
474
+ },
475
+ "summary": {
476
+ "pipelineValue": "Valor em pipeline",
477
+ "conversionRate": "Conversão geral",
478
+ "activeOwners": "Owners ativos"
479
479
  },
480
480
  "kpis": {
481
481
  "totalLeads": {
@@ -515,11 +515,11 @@
515
515
  "stage": {
516
516
  "title": "Distribuição por estágio",
517
517
  "description": "Leitura do funil comercial por etapa de lifecycle."
518
- },
519
- "source": {
520
- "title": "Origem dos leads",
521
- "description": "Participação das principais origens dentro da base filtrada do CRM."
522
- },
518
+ },
519
+ "source": {
520
+ "title": "Origem dos leads",
521
+ "description": "Participação das principais origens dentro da base filtrada do CRM."
522
+ },
523
523
  "owner": {
524
524
  "title": "Performance por owner",
525
525
  "description": "Comparativo de volume atendido e clientes por responsável."
@@ -562,13 +562,132 @@
562
562
  "inbound": "Inbound",
563
563
  "outbound": "Outbound",
564
564
  "other": "Outro"
565
- },
566
- "common": {
567
- "unassigned": "Não atribuído",
568
- "noData": "Não há dados para os filtros atuais."
569
- }
570
- },
571
- "CrmPipeline": {
565
+ },
566
+ "common": {
567
+ "unassigned": "Não atribuído",
568
+ "noData": "Não há dados para os filtros atuais."
569
+ }
570
+ },
571
+ "CrmReports": {
572
+ "title": "Relatórios CRM",
573
+ "subtitle": "Leitura gerencial da captação, conversão e atividade comercial com base nos dados reais do CRM.",
574
+ "breadcrumbs": {
575
+ "home": "Home",
576
+ "crm": "CRM",
577
+ "reports": "Relatórios"
578
+ },
579
+ "print": "Imprimir",
580
+ "printDescription": "Versão preparada para impressão com os mesmos filtros e gráficos exibidos na tela.",
581
+ "printDialog": {
582
+ "title": "Escolha o layout de impressão",
583
+ "description": "Selecione a orientação mais adequada para este relatório. As duas opções foram otimizadas para aproveitar melhor o espaço do papel.",
584
+ "cancel": "Cancelar",
585
+ "options": {
586
+ "portrait": {
587
+ "eyebrow": "Vertical",
588
+ "title": "Retrato",
589
+ "description": "Leitura mais linear, com seções empilhadas e boa distribuição para períodos longos.",
590
+ "action": "Imprimir em retrato"
591
+ },
592
+ "landscape": {
593
+ "eyebrow": "Horizontal",
594
+ "title": "Paisagem",
595
+ "description": "Aproveita melhor gráficos e tabela larga, reduzindo áreas vazias e a quantidade de páginas quando possível.",
596
+ "action": "Imprimir em paisagem"
597
+ }
598
+ }
599
+ },
600
+ "printedFilters": {
601
+ "dateFrom": "De",
602
+ "dateTo": "Até",
603
+ "groupBy": "Agrupamento"
604
+ },
605
+ "printedAt": "Impresso em",
606
+ "refresh": "Atualizar",
607
+ "filters": {
608
+ "dateFrom": "Data inicial",
609
+ "dateTo": "Data final",
610
+ "groupBy": "Agrupar por",
611
+ "groupByPlaceholder": "Agrupamento"
612
+ },
613
+ "groupBy": {
614
+ "day": "Dia",
615
+ "week": "Semana",
616
+ "month": "Mês",
617
+ "year": "Ano"
618
+ },
619
+ "kpis": {
620
+ "newLeads": {
621
+ "title": "Novos leads",
622
+ "description": "Cadastros criados dentro do período."
623
+ },
624
+ "qualifiedMoves": {
625
+ "title": "Avanços para qualificado",
626
+ "description": "Leads que entraram na etapa de qualificação."
627
+ },
628
+ "customerMoves": {
629
+ "title": "Conversões em clientes",
630
+ "description": "Movimentos para cliente registrados no período."
631
+ },
632
+ "lostMoves": {
633
+ "title": "Perdas",
634
+ "description": "Oportunidades marcadas como perdidas."
635
+ },
636
+ "interactions": {
637
+ "title": "Interações",
638
+ "description": "Atividades concluídas originadas por interação."
639
+ },
640
+ "followupsCompleted": {
641
+ "title": "Follow-ups concluídos",
642
+ "description": "Follow-ups finalizados dentro do intervalo."
643
+ },
644
+ "conversionRate": {
645
+ "title": "Taxa de conversão",
646
+ "description": "Clientes convertidos em relação aos novos leads."
647
+ }
648
+ },
649
+ "charts": {
650
+ "timeline": {
651
+ "title": "Linha do tempo gerencial",
652
+ "description": "Evolução da operação comercial por período agrupado."
653
+ },
654
+ "source": {
655
+ "title": "Origem dos leads",
656
+ "description": "Distribuição da captação dos leads criados no intervalo."
657
+ },
658
+ "currentStage": {
659
+ "title": "Funil atual dos leads do período",
660
+ "description": "Como os leads criados no intervalo estão distribuídos por estágio hoje."
661
+ },
662
+ "owners": {
663
+ "title": "Produtividade por responsável",
664
+ "description": "Comparativo entre interações, follow-ups concluídos e conversões por owner."
665
+ },
666
+ "activityType": {
667
+ "title": "Tipos de atividade",
668
+ "description": "Volume de atividades registradas por tipo operacional."
669
+ }
670
+ },
671
+ "table": {
672
+ "title": "Resumo por período",
673
+ "description": "Visão tabular para auditoria rápida dos indicadores agrupados.",
674
+ "headers": {
675
+ "period": "Período",
676
+ "newLeads": "Novos leads",
677
+ "qualifiedMoves": "Qualificados",
678
+ "customerMoves": "Clientes",
679
+ "lostMoves": "Perdidos",
680
+ "interactions": "Interações",
681
+ "followupsCompleted": "Follow-ups concluídos",
682
+ "conversionRate": "Conversão"
683
+ }
684
+ },
685
+ "common": {
686
+ "noData": "Não há dados para os filtros atuais.",
687
+ "invalidRange": "A data inicial deve ser menor ou igual à data final."
688
+ }
689
+ },
690
+ "CrmPipeline": {
572
691
  "title": "Pipeline de conversão",
573
692
  "subtitle": "Kanban comercial com filtro por owner para acompanhar a evolução dos cadastros no CRM.",
574
693
  "breadcrumbs": {
@@ -694,15 +813,15 @@
694
813
  "description": "Defina pessoa, data e notas para a próxima ação.",
695
814
  "submit": "Salvar follow-up"
696
815
  },
697
- "form": {
698
- "person": "Pessoa",
699
- "personPlaceholder": "Selecione uma pessoa",
700
- "personSearchPlaceholder": "Buscar pessoa...",
701
- "personLoading": "Carregando pessoas...",
702
- "personEmpty": "Nenhuma pessoa encontrada.",
703
- "date": "Data do follow-up",
704
- "notes": "Notas",
705
- "notesPlaceholder": "Adicione contexto para a próxima interação...",
816
+ "form": {
817
+ "person": "Pessoa",
818
+ "personPlaceholder": "Selecione uma pessoa",
819
+ "personSearchPlaceholder": "Buscar pessoa...",
820
+ "personLoading": "Carregando pessoas...",
821
+ "personEmpty": "Nenhuma pessoa encontrada.",
822
+ "date": "Data do follow-up",
823
+ "notes": "Notas",
824
+ "notesPlaceholder": "Adicione contexto para a próxima interação...",
706
825
  "personRequired": "Selecione uma pessoa.",
707
826
  "dateRequired": "Defina data e hora."
708
827
  },
@@ -775,43 +894,43 @@
775
894
  "dueLabel": "Prazo",
776
895
  "createdLabel": "Criada"
777
896
  },
778
- "empty": {
779
- "title": "Nenhuma atividade encontrada",
780
- "description": "Ajuste os filtros para encontrar atividades ou limpe os filtros para voltar à fila completa.",
781
- "resetFilters": "Limpar filtros"
782
- },
783
- "detail": {
784
- "title": "Detalhes da atividade",
785
- "description": "Revise todo o contexto operacional antes de agir sobre esta atividade.",
786
- "person": "Pessoa",
787
- "personType": "Tipo de pessoa",
788
- "personTypeValue": {
789
- "individual": "Pessoa física",
790
- "company": "Empresa"
791
- },
792
- "tradeName": "Nome fantasia",
793
- "owner": "Responsável",
794
- "type": "Tipo",
795
- "source": "Origem",
796
- "dueAt": "Prazo",
797
- "createdAt": "Criada em",
798
- "completedAt": "Concluída em",
799
- "createdBy": "Criada por",
800
- "completedBy": "Concluída por",
801
- "close": "Fechar",
802
- "emptyNotes": "Nenhuma nota informada.",
803
- "notCompleted": "Não concluída",
804
- "sourceKind": {
805
- "manual": "Manual",
806
- "followup": "Follow-up",
807
- "interaction": "Interação"
808
- }
809
- },
810
- "toasts": {
811
- "markedAsCompleted": "Atividade marcada como concluída.",
812
- "completeError": "Falha ao concluir atividade."
813
- }
814
- },
897
+ "empty": {
898
+ "title": "Nenhuma atividade encontrada",
899
+ "description": "Ajuste os filtros para encontrar atividades ou limpe os filtros para voltar à fila completa.",
900
+ "resetFilters": "Limpar filtros"
901
+ },
902
+ "detail": {
903
+ "title": "Detalhes da atividade",
904
+ "description": "Revise todo o contexto operacional antes de agir sobre esta atividade.",
905
+ "person": "Pessoa",
906
+ "personType": "Tipo de pessoa",
907
+ "personTypeValue": {
908
+ "individual": "Pessoa física",
909
+ "company": "Empresa"
910
+ },
911
+ "tradeName": "Nome fantasia",
912
+ "owner": "Responsável",
913
+ "type": "Tipo",
914
+ "source": "Origem",
915
+ "dueAt": "Prazo",
916
+ "createdAt": "Criada em",
917
+ "completedAt": "Concluída em",
918
+ "createdBy": "Criada por",
919
+ "completedBy": "Concluída por",
920
+ "close": "Fechar",
921
+ "emptyNotes": "Nenhuma nota informada.",
922
+ "notCompleted": "Não concluída",
923
+ "sourceKind": {
924
+ "manual": "Manual",
925
+ "followup": "Follow-up",
926
+ "interaction": "Interação"
927
+ }
928
+ },
929
+ "toasts": {
930
+ "markedAsCompleted": "Atividade marcada como concluída.",
931
+ "completeError": "Falha ao concluir atividade."
932
+ }
933
+ },
815
934
  "CrmFuturePage": {
816
935
  "breadcrumbs": {
817
936
  "home": "Home",
@@ -876,49 +995,49 @@
876
995
  "email": "Email",
877
996
  "phone": "Telefone",
878
997
  "website": "Site",
879
- "industry": "Setor",
880
- "saveError": "Nao foi possivel salvar a conta",
881
- "deleteError": "Nao foi possivel excluir a conta",
882
- "form": {
883
- "createTitle": "Nova Conta",
884
- "editTitle": "Editar Conta",
885
- "createDescription": "Crie um novo registro de conta no CRM.",
886
- "editDescription": "Atualize as informacoes da conta e do relacionamento.",
887
- "companyName": "Nome da empresa",
888
- "tradeName": "Nome fantasia",
889
- "status": "Status",
890
- "lifecycleStage": "Estagio",
891
- "email": "Email",
892
- "phone": "Telefone",
893
- "website": "Site",
894
- "industry": "Setor",
895
- "annualRevenue": "Receita anual",
896
- "employeeCount": "Colaboradores",
897
- "city": "Cidade",
898
- "state": "Estado",
899
- "owner": "Responsavel",
900
- "createSubmit": "Criar conta",
901
- "updateSubmit": "Salvar alteracoes",
902
- "saving": "Salvando...",
903
- "placeholders": {
904
- "companyName": "Nome da empresa",
905
- "tradeName": "Nome fantasia ou marca",
906
- "email": "contato@empresa.com",
907
- "phone": "(11) 99999-9999",
908
- "website": "www.empresa.com",
909
- "industry": "Tecnologia, Saude...",
910
- "annualRevenue": "0,00",
911
- "employeeCount": "0",
912
- "city": "Sao Paulo",
913
- "state": "SP"
914
- },
915
- "validation": {
916
- "nameMinLength": "O nome deve ter pelo menos 2 caracteres",
917
- "invalidEmail": "Informe um email valido",
918
- "nonNegativeNumber": "Informe zero ou um numero positivo",
919
- "integerRequired": "Informe um numero inteiro",
920
- "stateMaxLength": "O estado deve ter no maximo 2 caracteres"
921
- }
922
- }
923
- }
924
- }
998
+ "industry": "Setor",
999
+ "saveError": "Nao foi possivel salvar a conta",
1000
+ "deleteError": "Nao foi possivel excluir a conta",
1001
+ "form": {
1002
+ "createTitle": "Nova Conta",
1003
+ "editTitle": "Editar Conta",
1004
+ "createDescription": "Crie um novo registro de conta no CRM.",
1005
+ "editDescription": "Atualize as informacoes da conta e do relacionamento.",
1006
+ "companyName": "Nome da empresa",
1007
+ "tradeName": "Nome fantasia",
1008
+ "status": "Status",
1009
+ "lifecycleStage": "Estagio",
1010
+ "email": "Email",
1011
+ "phone": "Telefone",
1012
+ "website": "Site",
1013
+ "industry": "Setor",
1014
+ "annualRevenue": "Receita anual",
1015
+ "employeeCount": "Colaboradores",
1016
+ "city": "Cidade",
1017
+ "state": "Estado",
1018
+ "owner": "Responsavel",
1019
+ "createSubmit": "Criar conta",
1020
+ "updateSubmit": "Salvar alteracoes",
1021
+ "saving": "Salvando...",
1022
+ "placeholders": {
1023
+ "companyName": "Nome da empresa",
1024
+ "tradeName": "Nome fantasia ou marca",
1025
+ "email": "contato@empresa.com",
1026
+ "phone": "(11) 99999-9999",
1027
+ "website": "www.empresa.com",
1028
+ "industry": "Tecnologia, Saude...",
1029
+ "annualRevenue": "0,00",
1030
+ "employeeCount": "0",
1031
+ "city": "Sao Paulo",
1032
+ "state": "SP"
1033
+ },
1034
+ "validation": {
1035
+ "nameMinLength": "O nome deve ter pelo menos 2 caracteres",
1036
+ "invalidEmail": "Informe um email valido",
1037
+ "nonNegativeNumber": "Informe zero ou um numero positivo",
1038
+ "integerRequired": "Informe um numero inteiro",
1039
+ "stateMaxLength": "O estado deve ter no maximo 2 caracteres"
1040
+ }
1041
+ }
1042
+ }
1043
+ }
@@ -1,68 +1,68 @@
1
- table: crm_activity
2
- columns:
3
- - type: pk
4
- - name: person_id
5
- type: fk
6
- references:
7
- table: person
8
- column: id
9
- onDelete: CASCADE
10
- onUpdate: CASCADE
11
- - name: owner_user_id
12
- type: fk
13
- isNullable: true
14
- references:
15
- table: user
16
- column: id
17
- onDelete: SET NULL
18
- onUpdate: CASCADE
19
- - name: created_by_user_id
20
- type: fk
21
- isNullable: true
22
- references:
23
- table: user
24
- column: id
25
- onDelete: SET NULL
26
- onUpdate: CASCADE
27
- - name: completed_by_user_id
28
- type: fk
29
- isNullable: true
30
- references:
31
- table: user
32
- column: id
33
- onDelete: SET NULL
34
- onUpdate: CASCADE
35
- - name: type
36
- type: enum
37
- values: [call, email, meeting, whatsapp, task, note]
38
- - name: subject
39
- type: varchar
40
- length: 255
41
- - name: notes
42
- type: text
43
- isNullable: true
44
- - name: due_at
45
- type: datetime
46
- - name: completed_at
47
- type: datetime
48
- isNullable: true
49
- - name: priority
50
- type: enum
51
- values: [high, medium, low]
52
- default: medium
53
- - name: source_kind
54
- type: enum
55
- values: [manual, followup, interaction]
56
- default: manual
57
- - type: created_at
58
- - type: updated_at
59
-
60
- indices:
61
- - columns: [person_id]
62
- - columns: [owner_user_id]
63
- - columns: [due_at]
64
- - columns: [completed_at]
65
- - columns: [completed_at, due_at]
66
- - columns: [person_id, source_kind]
67
- isUnique: true
68
- where: source_kind = 'followup' AND completed_at IS NULL
1
+ table: crm_activity
2
+ columns:
3
+ - type: pk
4
+ - name: person_id
5
+ type: fk
6
+ references:
7
+ table: person
8
+ column: id
9
+ onDelete: CASCADE
10
+ onUpdate: CASCADE
11
+ - name: owner_user_id
12
+ type: fk
13
+ isNullable: true
14
+ references:
15
+ table: user
16
+ column: id
17
+ onDelete: SET NULL
18
+ onUpdate: CASCADE
19
+ - name: created_by_user_id
20
+ type: fk
21
+ isNullable: true
22
+ references:
23
+ table: user
24
+ column: id
25
+ onDelete: SET NULL
26
+ onUpdate: CASCADE
27
+ - name: completed_by_user_id
28
+ type: fk
29
+ isNullable: true
30
+ references:
31
+ table: user
32
+ column: id
33
+ onDelete: SET NULL
34
+ onUpdate: CASCADE
35
+ - name: type
36
+ type: enum
37
+ values: [call, email, meeting, whatsapp, task, note]
38
+ - name: subject
39
+ type: varchar
40
+ length: 255
41
+ - name: notes
42
+ type: text
43
+ isNullable: true
44
+ - name: due_at
45
+ type: datetime
46
+ - name: completed_at
47
+ type: datetime
48
+ isNullable: true
49
+ - name: priority
50
+ type: enum
51
+ values: [high, medium, low]
52
+ default: medium
53
+ - name: source_kind
54
+ type: enum
55
+ values: [manual, followup, interaction]
56
+ default: manual
57
+ - type: created_at
58
+ - type: updated_at
59
+
60
+ indices:
61
+ - columns: [person_id]
62
+ - columns: [owner_user_id]
63
+ - columns: [due_at]
64
+ - columns: [completed_at]
65
+ - columns: [completed_at, due_at]
66
+ - columns: [person_id, source_kind]
67
+ isUnique: true
68
+ where: source_kind = 'followup' AND completed_at IS NULL
@@ -0,0 +1,34 @@
1
+ table: crm_stage_history
2
+ columns:
3
+ - type: pk
4
+ - name: person_id
5
+ type: fk
6
+ references:
7
+ table: person
8
+ column: id
9
+ onDelete: CASCADE
10
+ onUpdate: CASCADE
11
+ - name: from_stage
12
+ type: enum
13
+ values: [new, contacted, qualified, proposal, negotiation, customer, lost]
14
+ isNullable: true
15
+ - name: to_stage
16
+ type: enum
17
+ values: [new, contacted, qualified, proposal, negotiation, customer, lost]
18
+ - name: changed_by_user_id
19
+ type: fk
20
+ isNullable: true
21
+ references:
22
+ table: user
23
+ column: id
24
+ onDelete: SET NULL
25
+ onUpdate: CASCADE
26
+ - name: changed_at
27
+ type: datetime
28
+ - type: created_at
29
+ - type: updated_at
30
+
31
+ indices:
32
+ - columns: [person_id]
33
+ - columns: [changed_at]
34
+ - columns: [to_stage, changed_at]
@@ -4,33 +4,33 @@ columns:
4
4
  references:
5
5
  table: person
6
6
  column: id
7
- - name: trade_name
8
- isNullable: true
9
- - name: industry
10
- isNullable: true
11
- - name: website
12
- isNullable: true
13
- - name: annual_revenue
14
- type: decimal
15
- precision: 14
16
- scale: 2
17
- isNullable: true
18
- - name: employee_count
19
- type: int
20
- isNullable: true
21
- - name: account_lifecycle_stage
22
- type: enum
23
- values: [prospect, customer, churned, inactive]
24
- isNullable: true
25
- - name: city
26
- isNullable: true
27
- - name: state
28
- type: varchar
29
- length: 2
30
- isNullable: true
31
- - name: foundation_date
32
- type: date
33
- isNullable: true
7
+ - name: trade_name
8
+ isNullable: true
9
+ - name: industry
10
+ isNullable: true
11
+ - name: website
12
+ isNullable: true
13
+ - name: annual_revenue
14
+ type: decimal
15
+ precision: 14
16
+ scale: 2
17
+ isNullable: true
18
+ - name: employee_count
19
+ type: int
20
+ isNullable: true
21
+ - name: account_lifecycle_stage
22
+ type: enum
23
+ values: [prospect, customer, churned, inactive]
24
+ isNullable: true
25
+ - name: city
26
+ isNullable: true
27
+ - name: state
28
+ type: varchar
29
+ length: 2
30
+ isNullable: true
31
+ - name: foundation_date
32
+ type: date
33
+ isNullable: true
34
34
  - name: legal_nature
35
35
  isNullable: true
36
36
  - name: headquarter_id