Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,101 @@
|
||||
N.,Regione,Prov.,Società,M/F,Email verificata,Sito / profilo,Streaming rilevato,Evidenza / fit commerciale,Test A/B,Stato invio,Data invio,Esito,Demo / Trial,Conversione,Piano,Fonte contatto / ricerca,Data verifica,Note follow-up
|
||||
1,Piemonte,TO,Vol-Ley Academy Volpiano,F,volley.academy.to@gmail.com,https://www.facebook.com/p/Vol-Ley-Academy-100063526780569/,NON RILEVATO,Academy giovanile di livello regionale/nazionale; finali giovanili,A,DA INVIARE,,,NO,NO,,https://www.facebook.com/p/Vol-Ley-Academy-100063526780569/,2026-08-17,
|
||||
2,Piemonte,NO,AGIL Volley / Igor Trecate,F,agil@agilvolley.com,https://www.agilvolley.com/,LIMITATO,Vivaio strutturato e grande bacino giovanile,B,DA INVIARE,,,NO,NO,,https://www.agilvolley.com/,2026-08-17,
|
||||
3,Piemonte,CN,Cuneo Granda Volley – settore giovanile,F,info@cuneograndavolley.it,https://www.cuneograndavolley.it/,LIMITATO,Club di alto livello con attività giovanile strutturata,A,DA INVIARE,,,NO,NO,,https://www.cuneograndavolley.it/,2026-08-17,
|
||||
4,Piemonte,TO,Sant'Anna Pallavolo,M,info@santannavolley.it,https://www.santannavolley.it/,NON RILEVATO,"U12-U19 maschile, Serie B e forte attività giovanile",B,DA INVIARE,,,NO,NO,,https://www.santannavolley.it/contatti/,2026-08-17,
|
||||
5,Piemonte,TO,Volley Parella Torino,M/F,amministrazione@sportingparella.it,https://www.volleyparellatorino.com/,NON RILEVATO,"Società storica, maschile e femminile, molte categorie",A,DA INVIARE,,,NO,NO,,https://www.volleyparellatorino.com/contatti,2026-08-17,
|
||||
6,Piemonte,TO,Lasalliano Volley Torino,M/F,info@lasalliano.it,https://www.lasalliano.it/,NON RILEVATO,Ampia attività giovanile e buona base tesserati,B,DA INVIARE,,,NO,NO,,https://www.lasalliano.it/,2026-08-17,
|
||||
7,Lombardia,MB,Volley Brianza Est,F,ds@volleybrianzaest.it,https://www.volleybrianzaest.it/,SÌ / PARZIALE,U16/U18 di livello nazionale; canale/media già attivo,A,DA INVIARE,,,NO,NO,,https://www.volleybrianzaest.it/,2026-08-17,
|
||||
8,Lombardia,MI,Pro Patria Volley Milano,F,info@propatria-volley-milano.it,https://www.propatria-volley-milano.it/,NON RILEVATO,Academy femminile storica e numerose categorie giovanili,B,DA INVIARE,,,NO,NO,,https://www.propatria-volley-milano.it/,2026-08-17,
|
||||
9,Lombardia,MI,Visette Volley,F,info@visettevolley.com,https://www.visettevolley.com/,NON RILEVATO,Settore giovanile femminile di alto profilo,A,DA INVIARE,,,NO,NO,,https://www.visettevolley.com/,2026-08-17,
|
||||
10,Lombardia,VA,UYBA Giovani,M/F,uybavolley@volleybusto.com,https://volleybusto.com/uyba-giovani/,LIMITATO,Nuovo progetto giovanile strutturato legato a club di A1,B,DA INVIARE,,,NO,NO,,https://volleybusto.com/uyba-giovani/,2026-08-17,
|
||||
11,Lombardia,MI,Pallavolo Gonzaga Giovani Milano,M/F,segreteria@pallavologonzaga.it,https://www.pallavologonzaga.it/,NON RILEVATO,Circa 300 ragazzi/e e categorie U12-senior,A,DA INVIARE,,,NO,NO,,https://www.pallavologonzaga.it/contatti/,2026-08-17,
|
||||
12,Lombardia,MI,Allianz Milano / Powervolley – giovanile,M,m.zanelli@powervolleymilano.it,https://www.powervolleymilano.it/,LIMITATO,Settore giovanile maschile collegato alla SuperLega,B,DA INVIARE,,,NO,NO,,https://www.powervolleymilano.it/,2026-08-17,
|
||||
13,Lombardia,BG,Pallavolo Cisano,M,pallavolocisano@hotmail.it,https://www.pallavolocisano.it/,NON RILEVATO,Tradizione nel maschile e attività giovanile,A,DA INVIARE,,,NO,NO,,https://www.pallavolocisano.it/,2026-08-17,
|
||||
14,Lombardia,MI,Volley Segrate 1978,M,info@volleysegrate.it,https://www.volleysegrate.it/,NON RILEVATO,Vivaio maschile molto strutturato,B,DA INVIARE,,,NO,NO,,https://www.volleysegrate.it/,2026-08-17,
|
||||
15,Lombardia,VA,Yaka Volley Malnate,M,yakavolley2007@gmail.com,https://www.yakavolley.it/,NON RILEVATO,Academy maschile con risultati giovanili,A,DA INVIARE,,,NO,NO,,https://www.yakavolley.it/,2026-08-17,
|
||||
16,Lombardia,VA,Pallavolo Saronno,M,segreteria@pallavolosaronno.it,https://www.pallavolosaronno.it/,NON RILEVATO,Settore giovanile dedicato e presenza nazionale,B,DA INVIARE,,,NO,NO,,https://www.pallavolosaronno.it/contact/,2026-08-17,
|
||||
17,Veneto,VI,US Torri,F,segreteria@unionesportivatorri.com,https://www.unionesportivatorri.com/,NON RILEVATO,"Vivaio femminile forte, presente nelle fasi nazionali",A,DA INVIARE,,,NO,NO,,https://www.unionesportivatorri.com/,2026-08-17,
|
||||
18,Veneto,VE,Volley Team Club San Donà,M/F,segreteria.volleyteam@gmail.com,https://www.volleyteamclub.it/,NON RILEVATO,Oltre 100 giovani e progetto territoriale,B,DA INVIARE,,,NO,NO,,https://www.volleyteamclub.it/,2026-08-17,
|
||||
19,Veneto,TV,Volley Treviso,M,info@volleytreviso.it,https://www.volleytreviso.it/,NON RILEVATO,Storico vivaio maschile di alto livello,A,DA INVIARE,,,NO,NO,,https://www.volleytreviso.it/,2026-08-17,
|
||||
20,Veneto,PD,Pallavolo Padova – settore giovanile,M,settoregiovanile@pallavolopadova.com,https://www.pallavolopadova.com/,LIMITATO,Settore giovanile strutturato collegato alla SuperLega,B,DA INVIARE,,,NO,NO,,https://www.pallavolopadova.com/,2026-08-17,
|
||||
21,Veneto,VR,Arena Volley Team Verona,F,info@arenavolleyteam.it,https://www.arenavolleyteam.it/,SÌ,Canale YouTube con streaming e settore giovanile femminile,A,DA INVIARE,,,NO,NO,,https://www.arenavolleyteam.it/Contatti/,2026-08-17,
|
||||
22,Veneto,VR,Verona Volley – settore giovanile,M,giovanili@veronavolley.it,https://www.veronavolley.it/,LIMITATO,Settore giovanile maschile collegato alla SuperLega,B,DA INVIARE,,,NO,NO,,https://www.veronavolley.it/it-it/contatta-verona-volley.aspx,2026-08-17,
|
||||
23,Friuli-Venezia Giulia,PN,Prata Volley – settore giovanile,M,direttoretecnico@volleyprata.it,https://www.volleyprata.it/,NON RILEVATO,Oltre 180 giovani e filiera maschile strutturata,A,DA INVIARE,,,NO,NO,,https://www.volleyprata.it/,2026-08-17,
|
||||
24,Friuli-Venezia Giulia,UD,Volley Ball Gemona,F,volleyballgemona@gmail.com,https://www.facebook.com/volleyballgemona/,NON RILEVATO,Società territoriale con attività giovanile,B,DA INVIARE,,,NO,NO,,https://www.facebook.com/volleyballgemona/,2026-08-17,
|
||||
25,Friuli-Venezia Giulia,PN,Insieme per Pordenone Volley,F,areavolleyinsiemeperpn@gmail.com,https://www.insiemeperpordenone.it/,NON RILEVATO,Circa 140 atleti volley e ampia base associativa,A,DA INVIARE,,,NO,NO,,https://www.insiemeperpordenone.it/,2026-08-17,
|
||||
26,Friuli-Venezia Giulia,TS,Volley Club Trieste,M/F,info@volleyclub.it,https://www.volleyclub.it/,NON RILEVATO,Copertura di un'area metropolitana e attività giovanile,B,DA INVIARE,,,NO,NO,,https://www.volleyclub.it/,2026-08-17,
|
||||
27,Trentino-Alto Adige,TN,ATA Trento,F,volley@atatrento.it,https://www.atatrento.it/,NON RILEVATO,Grande realtà femminile trentina con molte categorie,A,DA INVIARE,,,NO,NO,,https://www.atatrento.it/,2026-08-17,
|
||||
28,Trentino-Alto Adige,TN,Argentario Progetto VolLei,F,gestionesportiva@argentariopallavolo.it,https://www.argentariopallavolo.it/,NON RILEVATO,Progetto giovanile femminile strutturato,B,DA INVIARE,,,NO,NO,,https://www.argentariopallavolo.it/,2026-08-17,
|
||||
29,Trentino-Alto Adige,BZ,Neumarkt Volley,F,amministrazione@neumarktvolley.it,https://www.neumarktvolley.it/,NON RILEVATO,Società altoatesina con vivaio femminile,A,DA INVIARE,,,NO,NO,,https://www.neumarktvolley.it/,2026-08-17,
|
||||
30,Trentino-Alto Adige,BZ,SSV Bozen Volley,M/F,volley@ssvbozen.it,https://www.ssvbozen.it/,NON RILEVATO,"Club cittadino multi-categoria, bacino bilingue",B,DA INVIARE,,,NO,NO,,https://www.ssvbozen.it/,2026-08-17,
|
||||
31,Liguria,GE,Normac AVB Genova,F,info@normacavb.com,https://www.normacavb.com/,SÌ,Grande gruppo giovanile; canale video con dirette,A,DA INVIARE,,,NO,NO,,https://www.normacavb.com/,2026-08-17,
|
||||
32,Liguria,GE,CogoValle,F,info@cogovalle.it,https://www.cogovalle.it/,SÌ / PARZIALE,Oltre 350 giovani dichiarati; canale YouTube presente,B,DA INVIARE,,,NO,NO,,https://www.cogovalle.it/,2026-08-17,
|
||||
33,Liguria,SV,Albisola Pallavolo,M/F,segreteria@albisolapallavolo.it,https://www.albisolapallavolo.it/,SÌ / PARZIALE,Settore giovanile e canale video Volleygroup,A,DA INVIARE,,,NO,NO,,https://www.albisolapallavolo.it/,2026-08-17,
|
||||
34,Liguria,SP,Scuola di Pallavolo La Spezia,F,segreteria@pallavolospezia.it,https://www.facebook.com/pallavolospezia/,NON RILEVATO,U12-U18 e scuola federale,B,DA INVIARE,,,NO,NO,,https://www.facebook.com/pallavolospezia/,2026-08-17,
|
||||
35,Liguria,SV,Celle Varazze Volley,F,segreteria@asdcellevarazzevolley.it,https://www.asdcellevarazzevolley.it/,SÌ / PARZIALE,Canale YouTube ufficiale e settore giovanile,A,DA INVIARE,,,NO,NO,,https://www.asdcellevarazzevolley.it/,2026-08-17,
|
||||
36,Emilia-Romagna,BO,Pallavolo Bologna,M,info@pallavolobologna.it,https://www.pallavolobologna.it/,NON RILEVATO,Vivaio maschile e attività nazionale,B,DA INVIARE,,,NO,NO,,https://www.pallavolobologna.it/,2026-08-17,
|
||||
37,Emilia-Romagna,PC,Volley Academy Piacenza (VAP),F,info@volleyacademypiacenza.it,https://www.volleyacademypiacenza.it/,NON RILEVATO,Academy femminile separata dal target Piacenza maschile,A,DA INVIARE,,,NO,NO,,https://www.volleyacademypiacenza.it/,2026-08-17,
|
||||
38,Emilia-Romagna,RA,Olimpia Teodora Ravenna,F,info@olimpiateodora.it,https://www.olimpiateodora.it/,NON RILEVATO,Storico vivaio femminile ravennate,B,DA INVIARE,,,NO,NO,,https://www.olimpiateodora.it/,2026-08-17,
|
||||
39,Emilia-Romagna,MO,Volley Academy Modena,F,info@volleymodena.it,https://www.volleymodena.it/,NON RILEVATO,Academy con numerose squadre giovanili,A,DA INVIARE,,,NO,NO,,https://www.volleymodena.it/,2026-08-17,
|
||||
40,Emilia-Romagna,RE,Volley Tricolore Reggio Emilia – giovanile,M,segreteria@volleytricolore.it,https://www.volleytricolore.it/,LIMITATO,Filiera giovanile maschile legata al club nazionale,B,DA INVIARE,,,NO,NO,,https://www.volleytricolore.it/,2026-08-17,
|
||||
41,Emilia-Romagna,PR,Energy Volley Parma,M,segreteria@energyvolleyparma.it,https://www.energyvolleyparma.it/,NON RILEVATO,Settore giovanile maschile in crescita,A,DA INVIARE,,,NO,NO,,https://www.energyvolleyparma.it/,2026-08-17,
|
||||
42,Emilia-Romagna,RA,Volley Academy Manù Benelli,F,info@volleyacademy.it,https://www.volleyacademy.it/,NON RILEVATO,Academy specializzata nella formazione femminile,B,DA INVIARE,,,NO,NO,,https://www.volleyacademy.it/volley-academy-contatti/,2026-08-17,
|
||||
43,Toscana,PT,Volley Aglianese,F,volley.aglianese@tin.it,https://www.facebook.com/volleyaglianese/,NON RILEVATO,Attività giovanile femminile territoriale,A,DA INVIARE,,,NO,NO,,https://www.facebook.com/volleyaglianese/,2026-08-17,
|
||||
44,Toscana,PO,Volley Prato,M,info@volleyprato.it,https://www.volleyprato.it/,NON RILEVATO,Vivaio maschile storico e competitivo,B,DA INVIARE,,,NO,NO,,https://www.volleyprato.it/,2026-08-17,
|
||||
45,Toscana,GR,Invicta Volleyball Grosseto,M,info@invictavolleyball.it,https://www.invictavolleyball.it/,NON RILEVATO,Settore giovanile maschile e attività nazionale,A,DA INVIARE,,,NO,NO,,https://www.invictavolleyball.it/,2026-08-17,
|
||||
46,Toscana,PI,Lupi Santa Croce – settore giovanile,M/F,amministrazione@lupipallavolo.it,https://www.lupipallavolo.net/,LIMITATO,Vivaio maschile e femminile collegato a club storico,B,DA INVIARE,,,NO,NO,,https://www.lupipallavolo.net/,2026-08-17,
|
||||
47,Toscana,GR,Pallavolo Follonica,M/F,pall.follonica.asd@fipav.li.it,https://www.facebook.com/asdpallavolofollonica/,NON RILEVATO,Attività giovanile e progetto Maremma Volley Academy,A,DA INVIARE,,,NO,NO,,https://www.comune.follonica.gr.it/Amministrazione/Enti-e-fondazioni/A.S.D.-Pallavolo-Follonica,2026-08-17,
|
||||
48,Toscana,LI,Torretta Volley Livorno,M/F,info@torrettavolley.it,https://www.torrettavolley.it/,NON RILEVATO,Settore giovanile con presenza anche a finali nazionali,B,DA INVIARE,,,NO,NO,,https://www.torrettavolley.it/contatti.htm,2026-08-17,
|
||||
49,Toscana,LI,Volley Livorno,F,volleylivorno@gmail.com,https://www.volleylivorno.com/,NON RILEVATO,Progetto giovanile femminile e Volley Life Project,A,DA INVIARE,,,NO,NO,,https://www.volleylivorno.com/il-volley-life-project.htm,2026-08-17,
|
||||
50,Marche,AN,Pallavolo Filottrano,F,info@pallavolofilottrano.it,https://www.pallavolofilottrano.it/,NON RILEVATO,Tradizione femminile e settore giovanile,B,DA INVIARE,,,NO,NO,,https://www.pallavolofilottrano.it/,2026-08-17,
|
||||
51,Marche,AN,Ancona Team Volley,F,ancona.team.volley@hotmail.it,https://www.anconateamvolley.it/,NON RILEVATO,Progetto giovanile femminile dell'area anconetana,A,DA INVIARE,,,NO,NO,,https://www.anconateamvolley.it/,2026-08-17,
|
||||
52,Marche,AN,Nuova Pallavolo Collemarino,F,sandro.lelli@alice.it,https://www.facebook.com/nuovapallavolocollemarino/,NON RILEVATO,Società giovanile territoriale storica,B,DA INVIARE,,,NO,NO,,https://www.facebook.com/nuovapallavolocollemarino/,2026-08-17,
|
||||
53,Marche,AN,Volley Game Falconara,M/F,info@volleygame.it,https://www.volleygame.it/,NON RILEVATO,Settore giovanile ampio e multi-categoria,A,DA INVIARE,,,NO,NO,,https://www.volleygame.it/,2026-08-17,
|
||||
54,Marche,PU,Virtus Volley Fano,M,segreteria@virtusfano.it,https://www.virtusfano.it/,NON RILEVATO,Vivaio maschile di alto livello,B,DA INVIARE,,,NO,NO,,https://www.virtusfano.it/,2026-08-17,
|
||||
55,Marche,FM,Volley Angels Project,F,info@volleyangels.it,https://www.volleyangels.it/,SÌ / PARZIALE,"Network di società del Fermano; settore giovanile ed eventi, dirette social presenti",A,DA INVIARE,,,NO,NO,,https://www.volleyangels.it/contatti/,2026-08-17,
|
||||
56,Umbria,PG,School Volley Perugia,F,info@schoolvolley.it,https://www.schoolvolley.it/,NON RILEVATO,Academy femminile strutturata,B,DA INVIARE,,,NO,NO,,https://www.schoolvolley.it/,2026-08-17,
|
||||
57,Umbria,PG,Black Angels Volley – giovanile,F,segreteria@blackangelsperugia.it,https://www.blackangelsperugia.it/,LIMITATO,Settore giovanile legato a club di alto livello,A,DA INVIARE,,,NO,NO,,https://www.blackangelsperugia.it/,2026-08-17,
|
||||
58,Umbria,PG,Inter Volley Foligno,M/F,info@intervolleyfoligno.com,https://www.intervolleyfoligno.com/,NON RILEVATO,Società con ampia attività giovanile M/F,B,DA INVIARE,,,NO,NO,,https://www.intervolleyfoligno.com/,2026-08-17,
|
||||
59,Lazio,RM,Volleyrò Casal de' Pazzi,F,casaldepazzivolley@libero.it,https://www.volleyrocdp.it/,SÌ / PARZIALE,Una delle academy femminili più forti d'Italia,A,DA INVIARE,,,NO,NO,,https://www.volleyrocdp.it/,2026-08-17,
|
||||
60,Lazio,RM,Fenice Pallavolo Roma,M,segreteria@cdpfenice.it,https://www.cdpfenice.it/,NON RILEVATO,Vivaio maschile con presenza nazionale,B,DA INVIARE,,,NO,NO,,https://www.cdpfenice.it/,2026-08-17,
|
||||
61,Lazio,RM,Santa Monica Volley,M/F,info@santamonicavolley.it,https://www.santamonicavolley.it/,NON RILEVATO,Ampia attività giovanile sul territorio romano,A,DA INVIARE,,,NO,NO,,https://www.santamonicavolley.it/,2026-08-17,
|
||||
62,Lazio,RM,Roma 7 Volley,M/F,roma7volley@libero.it,https://www.roma7volley.it/,NON RILEVATO,Società storica con settore giovanile,B,DA INVIARE,,,NO,NO,,https://www.roma7volley.it/,2026-08-17,
|
||||
63,Lazio,RM,Green Volley Roma,M/F,greenvolleyasd@gmail.com,https://www.facebook.com/greenvolleyroma/,NON RILEVATO,Club giovanile M/F e bacino urbano,A,DA INVIARE,,,NO,NO,,https://www.facebook.com/greenvolleyroma/,2026-08-17,
|
||||
64,Lazio,VT,Volley Viterbo,F,volleyviterbo@gmail.com,https://www.facebook.com/VolleyViterbo/,NON RILEVATO,Settore giovanile femminile e bacino provinciale,B,DA INVIARE,,,NO,NO,,https://www.facebook.com/VolleyViterbo/,2026-08-17,
|
||||
65,Abruzzo,CH,Impavida Pallavolo Ortona – giovanile,M/F,segreteria@impavidapallavolo.it,https://www.impavidapallavolo.it/,LIMITATO,Club nazionale con settore giovanile M/F,A,DA INVIARE,,,NO,NO,,https://www.impavidapallavolo.it/,2026-08-17,
|
||||
66,Abruzzo,PE,Volley Pescara 3,F,info@volleypescara3.it,https://www.volleypescara3.it/,NON RILEVATO,Oltre 150 giovani/minivolley dichiarati,B,DA INVIARE,,,NO,NO,,https://www.volleypescara3.it/,2026-08-17,
|
||||
67,Abruzzo,CH,Altino Volley,F,asdaltinovolley@gmail.com,https://www.altinovolley.it/,LIMITATO,Club nazionale; streaming già usato per prima squadra,A,DA INVIARE,,,NO,NO,,https://www.altinovolley.it/,2026-08-17,
|
||||
68,Abruzzo,AQ,GSD Volley Pratola '78,F,volleypratola78@gmail.com,https://www.gsdvolleypratola78.com/,NON RILEVATO,U13-U18 e storica scuola giovanile,B,DA INVIARE,,,NO,NO,,https://www.gsdvolleypratola78.com/,2026-08-17,
|
||||
69,Molise,CB,Termoli Pallavolo,M,termolipallavolo@gmail.com,https://www.facebook.com/termolipallavolo/,NON RILEVATO,"Promossa in Serie B, realtà regionale in crescita",A,DA INVIARE,,,NO,NO,,https://www.facebook.com/termolipallavolo/,2026-08-17,
|
||||
70,Molise,CB,Delfina Volley School Termoli,F,delfinavolleyschool@gmail.com,https://golee.it/clubs/delfina-volley-school,NON RILEVATO,Scuola FIPAV e attività giovanile 2026/27,B,DA INVIARE,,,NO,NO,,https://golee.it/clubs/delfina-volley-school,2026-08-17,
|
||||
71,Campania,NA,Volley Volla,M/F,segreteriavolleyvolla@gmail.com,https://golee.it/clubs/asd-volley-volla-2/,NON RILEVATO,Circa 114 tesserati; settore maschile e femminile,A,DA INVIARE,,,NO,NO,,https://golee.it/clubs/asd-volley-volla-2/,2026-08-17,
|
||||
72,Campania,NA,Phoenix Caivano,M/F,phoenix.caivano@gmail.com,https://www.volleyphoenix.it/,NON RILEVATO,Grande base giovanile; circa 400 iscritti e numerose squadre,B,DA INVIARE,,,NO,NO,,https://www.volleyphoenix.it/,2026-08-17,
|
||||
73,Campania,NA,Elisa Volley Pomigliano,M/F,elisavolleycomunicazione@gmail.com,https://www.elisavolley.it/,NON RILEVATO,Vivaio con marchi qualità e torneo/memorial,A,DA INVIARE,,,NO,NO,,https://www.elisavolley.it/,2026-08-17,
|
||||
74,Campania,NA,Volley World Napoli,M/F,volleyworld.na@gmail.com,https://www.volleyworldnapoli.it/,NON RILEVATO,Grande scuola volley cittadina e molte categorie,B,DA INVIARE,,,NO,NO,,https://www.volleyworldnapoli.it/,2026-08-17,
|
||||
75,Campania,NA,Afragola Volley,M,afragolavolley@gmail.com,https://www.facebook.com/A.S.D.AfragolaVolley/,NON RILEVATO,"Club in crescita, promozione nazionale e progetto giovanile",A,DA INVIARE,,,NO,NO,,https://www.facebook.com/A.S.D.AfragolaVolley/,2026-08-17,
|
||||
76,Campania,NA,Centro Ester Napoli,F,direzione@centroester.com,https://www.centroester.com/contatti,NON RILEVATO,Storica scuola femminile napoletana con vivaio strutturato,B,DA INVIARE,,,NO,NO,,https://www.centroester.com/contatti,2026-08-17,
|
||||
77,Campania,BN,Accademia Volley Benevento,F,volley@accademiavolley.it,https://www.accademiavolley.com/,SÌ / PARZIALE,Academy femminile con filiera giovanile e presenza video online,A,DA INVIARE,,,NO,NO,,https://www.accademiavolley.com/contatti/,2026-08-17,
|
||||
78,Puglia,BR,Green Volley Francavilla,M/F,greenvolley_f@libero.it,https://golee.it/clubs/asd-green-volley-francavilla,NON RILEVATO,Società territoriale con attività giovanile,B,DA INVIARE,,,NO,NO,,https://golee.it/clubs/asd-green-volley-francavilla,2026-08-17,
|
||||
79,Puglia,BA,Amatori Volley Bari,F,info@amatorivolleybari.it,https://www.amatorivolleybari.it/,NON RILEVATO,Storica realtà femminile barese e vivaio,A,DA INVIARE,,,NO,NO,,https://www.amatorivolleybari.it/,2026-08-17,
|
||||
80,Puglia,BA,Academy Volley Gioia,M/F,academyvolleygioia@gmail.com,https://golee.it/clubs/academy-volley-gioia,NON RILEVATO,Academy giovanile con iscrizioni 2026/27,B,DA INVIARE,,,NO,NO,,https://golee.it/clubs/academy-volley-gioia,2026-08-17,
|
||||
81,Puglia,BA,Joy Volley Gioia del Colle – giovanile,M,asdnewvolleygioia@gmail.com,https://www.joyvolleypallavolo.com/,LIMITATO,Club nazionale con responsabile settore giovanile,A,DA INVIARE,,,NO,NO,,https://www.legavolley.it/team/6733,2026-08-17,
|
||||
82,Puglia,LE,Pallavolo Azzurra Alessano / Progetto Azzurra,M,pallavoloazzurra@gmail.com,https://www.facebook.com/progettoazzurraalessano/,NON RILEVATO,Progetto giovanile maschile storico,B,DA INVIARE,,,NO,NO,,https://www.legavolley.it/team/5640,2026-08-17,
|
||||
83,Puglia,TA,Volley Club Grottaglie – giovanile,M/F,stampa.volleyclubgrottaglie@gmail.com,https://www.volleyclubgrottaglie.com/,SÌ / PARZIALE,Bacino territoriale e attività giovanile; video/dirette già presenti,A,DA INVIARE,,,NO,NO,,https://www.volleyclubgrottaglie.com/,2026-08-17,
|
||||
84,Basilicata,MT,Gi Elle Volley Policoro,F,gielle45@virgilio.it,https://www.facebook.com/p/Gi-Elle-Volley-100057500978580/,NON RILEVATO,Finali nazionali giovanili e presidio Basilicata ionica,B,DA INVIARE,,,NO,NO,,https://www.facebook.com/p/Gi-Elle-Volley-100057500978580/,2026-08-17,
|
||||
85,Basilicata,PZ,PM Volley Potenza,F,pmvolleypz@gmail.com,https://www.pmvolley.it/,NON RILEVATO,Settore femminile e attività giovanile regionale,A,DA INVIARE,,,NO,NO,,https://www.pmvolley.it/contatti/,2026-08-17,
|
||||
86,Calabria,KR,Pallavolo Crotone,F,pallavolocrotone@gmail.com,https://golee.it/clubs/pallavolokr,SÌ / PARZIALE,Storica realtà femminile; canale YouTube presente,B,DA INVIARE,,,NO,NO,,https://golee.it/clubs/pallavolokr,2026-08-17,
|
||||
87,Calabria,RC,Luck Volley Reggio Calabria,M,luckvolley@gmail.com,https://www.facebook.com/LuckVolley/,NON RILEVATO,Vivaio maschile e presenza a finali giovanili,A,DA INVIARE,,,NO,NO,,https://www.fipavrc.it/societa/elenco-societa/,2026-08-17,
|
||||
88,Calabria,RC,Kaulon Volley,F,kaulon18@gmail.com,https://www.facebook.com/p/ASD-Kaulon-Volley-100057107994667/,NON RILEVATO,Titoli regionali U13/U14 e attività giovanile,B,DA INVIARE,,,NO,NO,,https://www.associazionecommercianticaulonia.it/visitare-caulonia/attivita-sportive-e-culturali/asd-kaulon-volley/,2026-08-17,
|
||||
89,Calabria,RC,Pallavolo Nausicaa,F,asdpallavolonausicaa@gmail.com,https://www.fipavrc.it/societa/elenco-societa/,NON RILEVATO,Società territoriale con tradizione pallavolistica,A,DA INVIARE,,,NO,NO,,https://www.fipavrc.it/societa/elenco-societa/,2026-08-17,
|
||||
90,Sicilia,CT,Gupe Volley Catania,M/F,info@gupe.it,https://www.gupe.it/,NON RILEVATO,Scuola federale e categorie giovanili M/F,B,DA INVIARE,,,NO,NO,,https://sicilia.portalefipav.net/elenco-societa.aspx?ComitatoId=40&SId=2659,2026-08-17,
|
||||
91,Sicilia,CT,Pallavolo Roomy Catania,M/F,info.roomygiunic@gmail.com,https://roomygiunicsport.wansport.com/,NON RILEVATO,"Minivolley, preagonistica e agonistica",A,DA INVIARE,,,NO,NO,,https://roomygiunicsport.wansport.com/,2026-08-17,
|
||||
92,Sicilia,CT,Area Volley Catania,M/F,info@area-volley.it,https://www.area-volley.it/,NON RILEVATO,Centro avviamento e società agonistica,B,DA INVIARE,,,NO,NO,,https://www.area-volley.it/contatti.html,2026-08-17,
|
||||
93,Sicilia,CT,Catania Volley / Wekondor Academy,F,kondorvolleycatania@gmail.com,https://kondorvolleycatania.it/,NON RILEVATO,Academy femminile con numerose finali nazionali,A,DA INVIARE,,,NO,NO,,https://golee.it/clubs/asd-volley-academy-wekondor-catania,2026-08-17,
|
||||
94,Sicilia,ME,SSD UniMe Volley,F,gianluca.mazzeo74@gmail.com,https://www.ssdunime.it/pallavolo/,NON RILEVATO,Settore universitario e giovanile con bacino messinese,B,DA INVIARE,,,NO,NO,,https://www.ssdunime.it/pallavolo/,2026-08-17,
|
||||
95,Sicilia,CT,U.S. Universal Catania,M/F,info@volleyuniversal.it,https://www.facebook.com/universalvolley1963/,NON RILEVATO,Storica realtà catanese con attività giovanile,A,DA INVIARE,,,NO,NO,,https://www.facebook.com/universalvolley1963/,2026-08-17,
|
||||
96,Sardegna,SS,US Garibaldi La Maddalena,F,usgaribaldi@gmail.com,https://golee.it/clubs/us-garibaldi-2,NON RILEVATO,Progetto giovanile femminile di alto livello,B,DA INVIARE,,,NO,NO,,https://golee.it/clubs/us-garibaldi-2,2026-08-17,
|
||||
97,Sardegna,OR,Ariete Pallavolo Oristano,M/F,u.s.ariete.or@gmail.com,https://www.arietepallavolo.it/,SÌ,Canale YouTube molto attivo con centinaia di video,A,DA INVIARE,,,NO,NO,,https://www.arietepallavolo.it/,2026-08-17,
|
||||
98,Sardegna,SS,Pallavolo Olbia,M,pallavolo.olbia@tiscali.it,https://www.pallavoloolbia.it/,NON RILEVATO,Scuola federale e settore giovanile maschile,B,DA INVIARE,,,NO,NO,,https://www.pallavoloolbia.it/contatti/,2026-08-17,
|
||||
99,Sardegna,CA,Volley Sarroch – settore giovanile,M/F,settoregiovanile@volleysarroch.it,https://volleysarroch.it/,LIMITATO,"Settore giovanile strutturato, boys league e Serie C femminile",A,DA INVIARE,,,NO,NO,,https://volleysarroch.it/contatti/,2026-08-17,
|
||||
100,Valle d'Aosta,AO,Cogne Aosta Volley,F,cogneaostavolley@gmail.com,https://www.youtube.com/@CogneAostaVolley,SÌ – SPORTCAM,Vivaio prolifico; dirette YouTube già realizzate anche con SportCam,B,DA INVIARE,,,NO,NO,,https://www.fipav-vda.com/societa,2026-08-17,
|
||||
|
@@ -0,0 +1,164 @@
|
||||
class CreateSimplecrmSchema < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :email, null: false
|
||||
t.string :password_digest, null: false
|
||||
t.string :first_name, null: false
|
||||
t.string :last_name, null: false
|
||||
t.string :role, null: false, default: "user"
|
||||
t.boolean :active, null: false, default: true
|
||||
t.string :password_reset_token
|
||||
t.datetime :password_reset_sent_at
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :users, :email, unique: true
|
||||
add_index :users, :password_reset_token, unique: true
|
||||
add_index :users, :role
|
||||
|
||||
create_table :products do |t|
|
||||
t.string :name, null: false
|
||||
t.string :code, null: false
|
||||
t.boolean :active, null: false, default: true
|
||||
t.integer :position, null: false, default: 0
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :products, :code, unique: true
|
||||
add_index :products, :position
|
||||
|
||||
create_table :organizations do |t|
|
||||
t.string :name, null: false
|
||||
t.string :legal_name
|
||||
t.string :organization_type, null: false, default: "altro"
|
||||
t.string :sport
|
||||
t.string :country, null: false, default: "Italia"
|
||||
t.string :region
|
||||
t.string :province
|
||||
t.string :city
|
||||
t.string :address
|
||||
t.string :website
|
||||
t.string :phone
|
||||
t.string :email
|
||||
t.string :vat_number
|
||||
t.text :notes
|
||||
t.string :status, null: false, default: "prospect"
|
||||
t.string :lead_source
|
||||
t.references :assigned_user, foreign_key: { to_table: :users }
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :organizations, :status
|
||||
add_index :organizations, :lead_source
|
||||
add_index :organizations, :organization_type
|
||||
add_index :organizations, :email
|
||||
add_index :organizations, :name
|
||||
add_index :organizations, :city
|
||||
add_index :organizations, :website
|
||||
add_index :organizations, :sport
|
||||
add_index :organizations, :country
|
||||
add_index :organizations, :region
|
||||
|
||||
create_table :contacts do |t|
|
||||
t.references :organization, null: false, foreign_key: true
|
||||
t.string :first_name, null: false
|
||||
t.string :last_name, null: false
|
||||
t.string :role
|
||||
t.string :email
|
||||
t.string :phone
|
||||
t.string :mobile
|
||||
t.string :preferred_contact_method, default: "email"
|
||||
t.text :notes
|
||||
t.boolean :primary_contact, null: false, default: false
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :contacts, :email
|
||||
add_index :contacts, :phone
|
||||
add_index :contacts, :primary_contact
|
||||
add_index :contacts, [:last_name, :first_name]
|
||||
|
||||
create_table :opportunities do |t|
|
||||
t.references :organization, null: false, foreign_key: true
|
||||
t.string :name, null: false
|
||||
t.string :pipeline_stage, null: false, default: "to_contact"
|
||||
t.decimal :estimated_value, precision: 12, scale: 2
|
||||
t.integer :probability, default: 0
|
||||
t.date :expected_close_date
|
||||
t.string :product
|
||||
t.references :assigned_user, foreign_key: { to_table: :users }
|
||||
t.string :lost_reason
|
||||
t.text :notes
|
||||
t.datetime :won_at
|
||||
t.datetime :lost_at
|
||||
t.datetime :stage_changed_at
|
||||
t.datetime :first_contacted_at
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :opportunities, :pipeline_stage
|
||||
add_index :opportunities, :lost_reason
|
||||
add_index :opportunities, :product
|
||||
add_index :opportunities, :expected_close_date
|
||||
add_index :opportunities, :stage_changed_at
|
||||
|
||||
create_table :activities do |t|
|
||||
t.string :activity_type, null: false
|
||||
t.string :subject, null: false
|
||||
t.text :description
|
||||
t.datetime :happened_at, null: false
|
||||
t.references :user, null: false, foreign_key: true
|
||||
t.references :organization, null: false, foreign_key: true
|
||||
t.references :contact, foreign_key: true
|
||||
t.references :opportunity, foreign_key: true
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :activities, :activity_type
|
||||
add_index :activities, :happened_at
|
||||
add_index :activities, [:organization_id, :happened_at]
|
||||
|
||||
create_table :tasks do |t|
|
||||
t.string :title, null: false
|
||||
t.text :description
|
||||
t.references :organization, null: false, foreign_key: true
|
||||
t.references :contact, foreign_key: true
|
||||
t.references :opportunity, foreign_key: true
|
||||
t.references :assigned_user, foreign_key: { to_table: :users }
|
||||
t.datetime :due_at, null: false
|
||||
t.datetime :completed_at
|
||||
t.string :priority, null: false, default: "normal"
|
||||
t.string :task_type, null: false, default: "generic"
|
||||
t.string :status, null: false, default: "pending"
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :tasks, :due_at
|
||||
add_index :tasks, :status
|
||||
add_index :tasks, :priority
|
||||
add_index :tasks, :task_type
|
||||
add_index :tasks, [:status, :due_at]
|
||||
|
||||
create_table :sales_goals do |t|
|
||||
t.string :name, null: false
|
||||
t.string :metric, null: false
|
||||
t.decimal :target_value, precision: 12, scale: 2, null: false
|
||||
t.date :start_date, null: false
|
||||
t.date :end_date, null: false
|
||||
t.boolean :active, null: false, default: true
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :sales_goals, :metric
|
||||
add_index :sales_goals, [:start_date, :end_date]
|
||||
add_index :sales_goals, :active
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,75 @@
|
||||
class AddProjects < ActiveRecord::Migration[8.1]
|
||||
def up
|
||||
create_table :projects do |t|
|
||||
t.string :name, null: false
|
||||
t.string :code, null: false
|
||||
t.text :description
|
||||
t.boolean :active, null: false, default: true
|
||||
t.integer :position, null: false, default: 0
|
||||
t.string :color, default: "#0f172a"
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :projects, :code, unique: true
|
||||
add_index :projects, :active
|
||||
add_index :projects, :position
|
||||
|
||||
create_table :user_projects do |t|
|
||||
t.references :user, null: false, foreign_key: true
|
||||
t.references :project, null: false, foreign_key: true
|
||||
t.boolean :enabled, null: false, default: true
|
||||
t.timestamps
|
||||
end
|
||||
add_index :user_projects, [:user_id, :project_id], unique: true
|
||||
add_index :user_projects, :enabled
|
||||
|
||||
create_table :organization_projects do |t|
|
||||
t.references :organization, null: false, foreign_key: true
|
||||
t.references :project, null: false, foreign_key: true
|
||||
t.timestamps
|
||||
end
|
||||
add_index :organization_projects, [:organization_id, :project_id], unique: true, name: "idx_org_projects_unique"
|
||||
|
||||
add_reference :opportunities, :project, foreign_key: true
|
||||
add_reference :sales_goals, :project, foreign_key: true
|
||||
|
||||
say_with_time "Backfill default projects" do
|
||||
now = quote(Time.current)
|
||||
execute <<~SQL.squish
|
||||
INSERT INTO projects (name, code, description, active, position, color, created_at, updated_at) VALUES
|
||||
('MatchLiveTV', 'matchlivetv', 'Streaming e diritti sportivi', TRUE, 0, '#0f172a', #{now}, #{now}),
|
||||
('RiskMeter', 'riskmeter', 'Risk management', TRUE, 1, '#0369a1', #{now}, #{now}),
|
||||
('Cardoo', 'cardoo', 'Cardoo', TRUE, 2, '#047857', #{now}, #{now})
|
||||
SQL
|
||||
|
||||
project_id = select_value("SELECT id FROM projects WHERE code = 'matchlivetv'")
|
||||
|
||||
execute <<~SQL.squish
|
||||
INSERT INTO organization_projects (organization_id, project_id, created_at, updated_at)
|
||||
SELECT id, #{project_id}, #{now}, #{now} FROM organizations
|
||||
ON CONFLICT (organization_id, project_id) DO NOTHING
|
||||
SQL
|
||||
|
||||
execute "UPDATE opportunities SET project_id = #{project_id} WHERE project_id IS NULL"
|
||||
execute "UPDATE sales_goals SET project_id = #{project_id} WHERE project_id IS NULL"
|
||||
|
||||
execute <<~SQL.squish
|
||||
INSERT INTO user_projects (user_id, project_id, enabled, created_at, updated_at)
|
||||
SELECT u.id, p.id, TRUE, #{now}, #{now}
|
||||
FROM users u
|
||||
CROSS JOIN projects p
|
||||
WHERE u.role = 'user'
|
||||
ON CONFLICT (user_id, project_id) DO NOTHING
|
||||
SQL
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
remove_reference :sales_goals, :project, foreign_key: true
|
||||
remove_reference :opportunities, :project, foreign_key: true
|
||||
drop_table :organization_projects
|
||||
drop_table :user_projects
|
||||
drop_table :projects
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AllowNullActivityUserId < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
change_column_null :activities, :user_id, true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,26 @@
|
||||
class AddCampaignFieldsToOrganizationsAndOpportunities < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
change_table :organizations, bulk: true do |t|
|
||||
t.integer :list_position
|
||||
t.string :team_gender
|
||||
t.string :streaming_status
|
||||
t.text :commercial_fit
|
||||
t.string :source_url
|
||||
t.date :verified_at
|
||||
end
|
||||
add_index :organizations, :list_position
|
||||
add_index :organizations, :team_gender
|
||||
add_index :organizations, :streaming_status
|
||||
|
||||
change_table :opportunities, bulk: true do |t|
|
||||
t.string :ab_variant
|
||||
t.string :send_status
|
||||
t.date :sent_on
|
||||
t.string :outcome
|
||||
t.boolean :demo_trial, default: false, null: false
|
||||
t.boolean :converted, default: false, null: false
|
||||
end
|
||||
add_index :opportunities, :ab_variant
|
||||
add_index :opportunities, :send_status
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,57 @@
|
||||
# This migration comes from active_storage (originally 20170806125915)
|
||||
class CreateActiveStorageTables < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
# Use Active Record's configured type for primary and foreign keys
|
||||
primary_key_type, foreign_key_type = primary_and_foreign_key_types
|
||||
|
||||
create_table :active_storage_blobs, id: primary_key_type do |t|
|
||||
t.string :key, null: false
|
||||
t.string :filename, null: false
|
||||
t.string :content_type
|
||||
t.text :metadata
|
||||
t.string :service_name, null: false
|
||||
t.bigint :byte_size, null: false
|
||||
t.string :checksum
|
||||
|
||||
if connection.supports_datetime_with_precision?
|
||||
t.datetime :created_at, precision: 6, null: false
|
||||
else
|
||||
t.datetime :created_at, null: false
|
||||
end
|
||||
|
||||
t.index [ :key ], unique: true
|
||||
end
|
||||
|
||||
create_table :active_storage_attachments, id: primary_key_type do |t|
|
||||
t.string :name, null: false
|
||||
t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type
|
||||
t.references :blob, null: false, type: foreign_key_type
|
||||
|
||||
if connection.supports_datetime_with_precision?
|
||||
t.datetime :created_at, precision: 6, null: false
|
||||
else
|
||||
t.datetime :created_at, null: false
|
||||
end
|
||||
|
||||
t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true
|
||||
t.foreign_key :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
|
||||
create_table :active_storage_variant_records, id: primary_key_type do |t|
|
||||
t.belongs_to :blob, null: false, index: false, type: foreign_key_type
|
||||
t.string :variation_digest, null: false
|
||||
|
||||
t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true
|
||||
t.foreign_key :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def primary_and_foreign_key_types
|
||||
config = Rails.configuration.generators
|
||||
setting = config.options[config.orm][:primary_key_type]
|
||||
primary_key_type = setting || :primary_key
|
||||
foreign_key_type = setting || :bigint
|
||||
[ primary_key_type, foreign_key_type ]
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,79 @@
|
||||
class CreateMailMarketing < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :mail_identities do |t|
|
||||
t.string :name, null: false
|
||||
t.string :from_name, null: false
|
||||
t.string :from_email, null: false
|
||||
t.string :reply_to
|
||||
t.string :smtp_host, null: false
|
||||
t.integer :smtp_port, null: false, default: 587
|
||||
t.string :smtp_username
|
||||
t.text :smtp_password
|
||||
t.string :smtp_authentication, default: "plain", null: false
|
||||
t.string :encryption, default: "starttls", null: false
|
||||
t.boolean :verify_ssl, default: true, null: false
|
||||
t.boolean :active, default: true, null: false
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :mail_identities, :from_email
|
||||
add_index :mail_identities, :active
|
||||
|
||||
create_table :mail_templates do |t|
|
||||
t.bigint :project_id
|
||||
t.string :name, null: false
|
||||
t.string :subject, null: false
|
||||
t.text :body_html, null: false
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :mail_templates, :project_id
|
||||
add_index :mail_templates, :name
|
||||
|
||||
create_table :mailings do |t|
|
||||
t.bigint :project_id, null: false
|
||||
t.bigint :mail_identity_id, null: false
|
||||
t.bigint :mail_template_id
|
||||
t.string :name, null: false
|
||||
t.string :subject, null: false
|
||||
t.text :body_html, null: false
|
||||
t.string :audience, default: "to_send", null: false
|
||||
t.string :status, default: "draft", null: false
|
||||
t.integer :interval_seconds, default: 0, null: false
|
||||
t.datetime :queued_at
|
||||
t.datetime :completed_at
|
||||
t.bigint :created_by_id
|
||||
t.bigint :updated_by_id
|
||||
t.timestamps
|
||||
end
|
||||
add_index :mailings, :project_id
|
||||
add_index :mailings, :mail_identity_id
|
||||
add_index :mailings, :status
|
||||
|
||||
create_table :mailing_recipients do |t|
|
||||
t.bigint :mailing_id, null: false
|
||||
t.bigint :organization_id, null: false
|
||||
t.bigint :contact_id
|
||||
t.string :email
|
||||
t.string :status, default: "pending", null: false
|
||||
t.string :skip_reason
|
||||
t.text :error_message
|
||||
t.string :rendered_subject
|
||||
t.datetime :sent_at
|
||||
t.timestamps
|
||||
end
|
||||
add_index :mailing_recipients, %i[mailing_id organization_id], unique: true, name: "idx_mailing_recipients_unique"
|
||||
add_index :mailing_recipients, :status
|
||||
add_index :mailing_recipients, :email
|
||||
|
||||
add_foreign_key :mail_templates, :projects
|
||||
add_foreign_key :mailings, :projects
|
||||
add_foreign_key :mailings, :mail_identities
|
||||
add_foreign_key :mailings, :mail_templates
|
||||
add_foreign_key :mailing_recipients, :mailings
|
||||
add_foreign_key :mailing_recipients, :organizations
|
||||
add_foreign_key :mailing_recipients, :contacts
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,16 @@
|
||||
class AddAbTestToMailings < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
change_table :mailings do |t|
|
||||
t.boolean :ab_test, default: false, null: false
|
||||
t.string :ab_assignment, default: "from_record", null: false
|
||||
t.string :subject_b
|
||||
t.text :body_html_b
|
||||
t.bigint :mail_template_b_id
|
||||
end
|
||||
add_index :mailings, :ab_test
|
||||
add_foreign_key :mailings, :mail_templates, column: :mail_template_b_id
|
||||
|
||||
add_column :mailing_recipients, :ab_variant, :string
|
||||
add_index :mailing_recipients, :ab_variant
|
||||
end
|
||||
end
|
||||
Generated
+393
@@ -0,0 +1,393 @@
|
||||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
#
|
||||
# This file is the source Rails uses to define your schema when running `bin/rails
|
||||
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
||||
# be faster and is potentially less error prone than running all of your
|
||||
# migrations from scratch. Old migrations may fail to apply correctly if those
|
||||
# migrations use external dependencies or application code.
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_08_17_173000) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
||||
create_table "active_storage_attachments", force: :cascade do |t|
|
||||
t.bigint "blob_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.string "name", null: false
|
||||
t.bigint "record_id", null: false
|
||||
t.string "record_type", null: false
|
||||
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
||||
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_blobs", force: :cascade do |t|
|
||||
t.bigint "byte_size", null: false
|
||||
t.string "checksum"
|
||||
t.string "content_type"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "filename", null: false
|
||||
t.string "key", null: false
|
||||
t.text "metadata"
|
||||
t.string "service_name", null: false
|
||||
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_variant_records", force: :cascade do |t|
|
||||
t.bigint "blob_id", null: false
|
||||
t.string "variation_digest", null: false
|
||||
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "activities", force: :cascade do |t|
|
||||
t.string "activity_type", null: false
|
||||
t.bigint "contact_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.text "description"
|
||||
t.datetime "happened_at", null: false
|
||||
t.bigint "opportunity_id"
|
||||
t.bigint "organization_id", null: false
|
||||
t.string "subject", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.bigint "user_id"
|
||||
t.index ["activity_type"], name: "index_activities_on_activity_type"
|
||||
t.index ["contact_id"], name: "index_activities_on_contact_id"
|
||||
t.index ["happened_at"], name: "index_activities_on_happened_at"
|
||||
t.index ["opportunity_id"], name: "index_activities_on_opportunity_id"
|
||||
t.index ["organization_id", "happened_at"], name: "index_activities_on_organization_id_and_happened_at"
|
||||
t.index ["organization_id"], name: "index_activities_on_organization_id"
|
||||
t.index ["user_id"], name: "index_activities_on_user_id"
|
||||
end
|
||||
|
||||
create_table "contacts", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.string "email"
|
||||
t.string "first_name", null: false
|
||||
t.string "last_name", null: false
|
||||
t.string "mobile"
|
||||
t.text "notes"
|
||||
t.bigint "organization_id", null: false
|
||||
t.string "phone"
|
||||
t.string "preferred_contact_method", default: "email"
|
||||
t.boolean "primary_contact", default: false, null: false
|
||||
t.string "role"
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.index ["email"], name: "index_contacts_on_email"
|
||||
t.index ["last_name", "first_name"], name: "index_contacts_on_last_name_and_first_name"
|
||||
t.index ["organization_id"], name: "index_contacts_on_organization_id"
|
||||
t.index ["phone"], name: "index_contacts_on_phone"
|
||||
t.index ["primary_contact"], name: "index_contacts_on_primary_contact"
|
||||
end
|
||||
|
||||
create_table "mail_identities", force: :cascade do |t|
|
||||
t.boolean "active", default: true, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.string "encryption", default: "starttls", null: false
|
||||
t.string "from_email", null: false
|
||||
t.string "from_name", null: false
|
||||
t.string "name", null: false
|
||||
t.string "reply_to"
|
||||
t.string "smtp_authentication", default: "plain", null: false
|
||||
t.string "smtp_host", null: false
|
||||
t.text "smtp_password"
|
||||
t.integer "smtp_port", default: 587, null: false
|
||||
t.string "smtp_username"
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.boolean "verify_ssl", default: true, null: false
|
||||
t.index ["active"], name: "index_mail_identities_on_active"
|
||||
t.index ["from_email"], name: "index_mail_identities_on_from_email"
|
||||
end
|
||||
|
||||
create_table "mail_templates", force: :cascade do |t|
|
||||
t.text "body_html", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.string "name", null: false
|
||||
t.bigint "project_id"
|
||||
t.string "subject", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.index ["name"], name: "index_mail_templates_on_name"
|
||||
t.index ["project_id"], name: "index_mail_templates_on_project_id"
|
||||
end
|
||||
|
||||
create_table "mailing_recipients", force: :cascade do |t|
|
||||
t.string "ab_variant"
|
||||
t.bigint "contact_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "email"
|
||||
t.text "error_message"
|
||||
t.bigint "mailing_id", null: false
|
||||
t.bigint "organization_id", null: false
|
||||
t.string "rendered_subject"
|
||||
t.datetime "sent_at"
|
||||
t.string "skip_reason"
|
||||
t.string "status", default: "pending", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["ab_variant"], name: "index_mailing_recipients_on_ab_variant"
|
||||
t.index ["email"], name: "index_mailing_recipients_on_email"
|
||||
t.index ["mailing_id", "organization_id"], name: "idx_mailing_recipients_unique", unique: true
|
||||
t.index ["status"], name: "index_mailing_recipients_on_status"
|
||||
end
|
||||
|
||||
create_table "mailings", force: :cascade do |t|
|
||||
t.string "ab_assignment", default: "from_record", null: false
|
||||
t.boolean "ab_test", default: false, null: false
|
||||
t.string "audience", default: "to_send", null: false
|
||||
t.text "body_html", null: false
|
||||
t.text "body_html_b"
|
||||
t.datetime "completed_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.integer "interval_seconds", default: 0, null: false
|
||||
t.bigint "mail_identity_id", null: false
|
||||
t.bigint "mail_template_b_id"
|
||||
t.bigint "mail_template_id"
|
||||
t.string "name", null: false
|
||||
t.bigint "project_id", null: false
|
||||
t.datetime "queued_at"
|
||||
t.string "status", default: "draft", null: false
|
||||
t.string "subject", null: false
|
||||
t.string "subject_b"
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.index ["ab_test"], name: "index_mailings_on_ab_test"
|
||||
t.index ["mail_identity_id"], name: "index_mailings_on_mail_identity_id"
|
||||
t.index ["project_id"], name: "index_mailings_on_project_id"
|
||||
t.index ["status"], name: "index_mailings_on_status"
|
||||
end
|
||||
|
||||
create_table "opportunities", force: :cascade do |t|
|
||||
t.string "ab_variant"
|
||||
t.bigint "assigned_user_id"
|
||||
t.boolean "converted", default: false, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.boolean "demo_trial", default: false, null: false
|
||||
t.decimal "estimated_value", precision: 12, scale: 2
|
||||
t.date "expected_close_date"
|
||||
t.datetime "first_contacted_at"
|
||||
t.datetime "lost_at"
|
||||
t.string "lost_reason"
|
||||
t.string "name", null: false
|
||||
t.text "notes"
|
||||
t.bigint "organization_id", null: false
|
||||
t.string "outcome"
|
||||
t.string "pipeline_stage", default: "to_contact", null: false
|
||||
t.integer "probability", default: 0
|
||||
t.string "product"
|
||||
t.bigint "project_id"
|
||||
t.string "send_status"
|
||||
t.date "sent_on"
|
||||
t.datetime "stage_changed_at"
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.datetime "won_at"
|
||||
t.index ["ab_variant"], name: "index_opportunities_on_ab_variant"
|
||||
t.index ["assigned_user_id"], name: "index_opportunities_on_assigned_user_id"
|
||||
t.index ["expected_close_date"], name: "index_opportunities_on_expected_close_date"
|
||||
t.index ["lost_reason"], name: "index_opportunities_on_lost_reason"
|
||||
t.index ["organization_id"], name: "index_opportunities_on_organization_id"
|
||||
t.index ["pipeline_stage"], name: "index_opportunities_on_pipeline_stage"
|
||||
t.index ["product"], name: "index_opportunities_on_product"
|
||||
t.index ["project_id"], name: "index_opportunities_on_project_id"
|
||||
t.index ["send_status"], name: "index_opportunities_on_send_status"
|
||||
t.index ["stage_changed_at"], name: "index_opportunities_on_stage_changed_at"
|
||||
end
|
||||
|
||||
create_table "organization_projects", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "organization_id", null: false
|
||||
t.bigint "project_id", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["organization_id", "project_id"], name: "idx_org_projects_unique", unique: true
|
||||
t.index ["organization_id"], name: "index_organization_projects_on_organization_id"
|
||||
t.index ["project_id"], name: "index_organization_projects_on_project_id"
|
||||
end
|
||||
|
||||
create_table "organizations", force: :cascade do |t|
|
||||
t.string "address"
|
||||
t.bigint "assigned_user_id"
|
||||
t.string "city"
|
||||
t.text "commercial_fit"
|
||||
t.string "country", default: "Italia", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.string "email"
|
||||
t.string "lead_source"
|
||||
t.string "legal_name"
|
||||
t.integer "list_position"
|
||||
t.string "name", null: false
|
||||
t.text "notes"
|
||||
t.string "organization_type", default: "altro", null: false
|
||||
t.string "phone"
|
||||
t.string "province"
|
||||
t.string "region"
|
||||
t.string "source_url"
|
||||
t.string "sport"
|
||||
t.string "status", default: "prospect", null: false
|
||||
t.string "streaming_status"
|
||||
t.string "team_gender"
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.string "vat_number"
|
||||
t.date "verified_at"
|
||||
t.string "website"
|
||||
t.index ["assigned_user_id"], name: "index_organizations_on_assigned_user_id"
|
||||
t.index ["city"], name: "index_organizations_on_city"
|
||||
t.index ["country"], name: "index_organizations_on_country"
|
||||
t.index ["email"], name: "index_organizations_on_email"
|
||||
t.index ["lead_source"], name: "index_organizations_on_lead_source"
|
||||
t.index ["list_position"], name: "index_organizations_on_list_position"
|
||||
t.index ["name"], name: "index_organizations_on_name"
|
||||
t.index ["organization_type"], name: "index_organizations_on_organization_type"
|
||||
t.index ["region"], name: "index_organizations_on_region"
|
||||
t.index ["sport"], name: "index_organizations_on_sport"
|
||||
t.index ["status"], name: "index_organizations_on_status"
|
||||
t.index ["streaming_status"], name: "index_organizations_on_streaming_status"
|
||||
t.index ["team_gender"], name: "index_organizations_on_team_gender"
|
||||
t.index ["website"], name: "index_organizations_on_website"
|
||||
end
|
||||
|
||||
create_table "products", force: :cascade do |t|
|
||||
t.boolean "active", default: true, null: false
|
||||
t.string "code", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.string "name", null: false
|
||||
t.integer "position", default: 0, null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.index ["code"], name: "index_products_on_code", unique: true
|
||||
t.index ["position"], name: "index_products_on_position"
|
||||
end
|
||||
|
||||
create_table "projects", force: :cascade do |t|
|
||||
t.boolean "active", default: true, null: false
|
||||
t.string "code", null: false
|
||||
t.string "color", default: "#0f172a"
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.text "description"
|
||||
t.string "name", null: false
|
||||
t.integer "position", default: 0, null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.index ["active"], name: "index_projects_on_active"
|
||||
t.index ["code"], name: "index_projects_on_code", unique: true
|
||||
t.index ["position"], name: "index_projects_on_position"
|
||||
end
|
||||
|
||||
create_table "sales_goals", force: :cascade do |t|
|
||||
t.boolean "active", default: true, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.date "end_date", null: false
|
||||
t.string "metric", null: false
|
||||
t.string "name", null: false
|
||||
t.bigint "project_id"
|
||||
t.date "start_date", null: false
|
||||
t.decimal "target_value", precision: 12, scale: 2, null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.index ["active"], name: "index_sales_goals_on_active"
|
||||
t.index ["metric"], name: "index_sales_goals_on_metric"
|
||||
t.index ["project_id"], name: "index_sales_goals_on_project_id"
|
||||
t.index ["start_date", "end_date"], name: "index_sales_goals_on_start_date_and_end_date"
|
||||
end
|
||||
|
||||
create_table "tasks", force: :cascade do |t|
|
||||
t.bigint "assigned_user_id"
|
||||
t.datetime "completed_at"
|
||||
t.bigint "contact_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.text "description"
|
||||
t.datetime "due_at", null: false
|
||||
t.bigint "opportunity_id"
|
||||
t.bigint "organization_id", null: false
|
||||
t.string "priority", default: "normal", null: false
|
||||
t.string "status", default: "pending", null: false
|
||||
t.string "task_type", default: "generic", null: false
|
||||
t.string "title", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.index ["assigned_user_id"], name: "index_tasks_on_assigned_user_id"
|
||||
t.index ["contact_id"], name: "index_tasks_on_contact_id"
|
||||
t.index ["due_at"], name: "index_tasks_on_due_at"
|
||||
t.index ["opportunity_id"], name: "index_tasks_on_opportunity_id"
|
||||
t.index ["organization_id"], name: "index_tasks_on_organization_id"
|
||||
t.index ["priority"], name: "index_tasks_on_priority"
|
||||
t.index ["status", "due_at"], name: "index_tasks_on_status_and_due_at"
|
||||
t.index ["status"], name: "index_tasks_on_status"
|
||||
t.index ["task_type"], name: "index_tasks_on_task_type"
|
||||
end
|
||||
|
||||
create_table "user_projects", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.boolean "enabled", default: true, null: false
|
||||
t.bigint "project_id", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "user_id", null: false
|
||||
t.index ["enabled"], name: "index_user_projects_on_enabled"
|
||||
t.index ["project_id"], name: "index_user_projects_on_project_id"
|
||||
t.index ["user_id", "project_id"], name: "index_user_projects_on_user_id_and_project_id", unique: true
|
||||
t.index ["user_id"], name: "index_user_projects_on_user_id"
|
||||
end
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.boolean "active", default: true, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_id"
|
||||
t.string "email", null: false
|
||||
t.string "first_name", null: false
|
||||
t.string "last_name", null: false
|
||||
t.string "password_digest", null: false
|
||||
t.datetime "password_reset_sent_at"
|
||||
t.string "password_reset_token"
|
||||
t.string "role", default: "user", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "updated_by_id"
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
t.index ["password_reset_token"], name: "index_users_on_password_reset_token", unique: true
|
||||
t.index ["role"], name: "index_users_on_role"
|
||||
end
|
||||
|
||||
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "activities", "contacts"
|
||||
add_foreign_key "activities", "opportunities"
|
||||
add_foreign_key "activities", "organizations"
|
||||
add_foreign_key "activities", "users"
|
||||
add_foreign_key "contacts", "organizations"
|
||||
add_foreign_key "mail_templates", "projects"
|
||||
add_foreign_key "mailing_recipients", "contacts"
|
||||
add_foreign_key "mailing_recipients", "mailings"
|
||||
add_foreign_key "mailing_recipients", "organizations"
|
||||
add_foreign_key "mailings", "mail_identities"
|
||||
add_foreign_key "mailings", "mail_templates"
|
||||
add_foreign_key "mailings", "mail_templates", column: "mail_template_b_id"
|
||||
add_foreign_key "mailings", "projects"
|
||||
add_foreign_key "opportunities", "organizations"
|
||||
add_foreign_key "opportunities", "projects"
|
||||
add_foreign_key "opportunities", "users", column: "assigned_user_id"
|
||||
add_foreign_key "organization_projects", "organizations"
|
||||
add_foreign_key "organization_projects", "projects"
|
||||
add_foreign_key "organizations", "users", column: "assigned_user_id"
|
||||
add_foreign_key "sales_goals", "projects"
|
||||
add_foreign_key "tasks", "contacts"
|
||||
add_foreign_key "tasks", "opportunities"
|
||||
add_foreign_key "tasks", "organizations"
|
||||
add_foreign_key "tasks", "users", column: "assigned_user_id"
|
||||
add_foreign_key "user_projects", "projects"
|
||||
add_foreign_key "user_projects", "users"
|
||||
end
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
puts "Seeding eminuxCRM..."
|
||||
|
||||
Current.user = nil
|
||||
|
||||
admin = User.find_or_initialize_by(email: "admin@simplecrm.local")
|
||||
admin.assign_attributes(
|
||||
first_name: "Admin",
|
||||
last_name: "eminuxCRM",
|
||||
role: "admin",
|
||||
password: "password123",
|
||||
password_confirmation: "password123",
|
||||
active: true
|
||||
)
|
||||
admin.save!
|
||||
|
||||
user1 = User.find_or_initialize_by(email: "marco@simplecrm.local")
|
||||
user1.assign_attributes(
|
||||
first_name: "Marco",
|
||||
last_name: "Bianchi",
|
||||
role: "user",
|
||||
password: "password123",
|
||||
password_confirmation: "password123",
|
||||
active: true
|
||||
)
|
||||
user1.save!
|
||||
|
||||
user2 = User.find_or_initialize_by(email: "lucia@simplecrm.local")
|
||||
user2.assign_attributes(
|
||||
first_name: "Lucia",
|
||||
last_name: "Verdi",
|
||||
role: "user",
|
||||
password: "password123",
|
||||
password_confirmation: "password123",
|
||||
active: true
|
||||
)
|
||||
user2.save!
|
||||
|
||||
Current.user = admin
|
||||
|
||||
projects = [
|
||||
["MatchLiveTV", "matchlivetv", "Streaming e diritti sportivi", 0],
|
||||
["RiskMeter", "riskmeter", "Risk management", 1],
|
||||
["Cardoo", "cardoo", "Cardoo", 2]
|
||||
].map do |name, code, description, position|
|
||||
project = Project.find_or_initialize_by(code: code)
|
||||
project.assign_attributes(name: name, description: description, position: position, active: true)
|
||||
project.save!
|
||||
project
|
||||
end
|
||||
|
||||
matchlivetv, riskmeter, cardoo = projects
|
||||
|
||||
# Utenti normali: Marco → MatchLiveTV + RiskMeter; Lucia → MatchLiveTV + Cardoo
|
||||
[user1, user2].each { |u| Project.find_each { |p| u.user_projects.find_or_create_by!(project: p) { |up| up.enabled = false } } }
|
||||
user1.enable_project!(matchlivetv)
|
||||
user1.enable_project!(riskmeter)
|
||||
user1.disable_project!(cardoo)
|
||||
user2.enable_project!(matchlivetv)
|
||||
user2.enable_project!(cardoo)
|
||||
user2.disable_project!(riskmeter)
|
||||
|
||||
Current.project = matchlivetv
|
||||
|
||||
%w[Light Full Partnership Evento Altro].each_with_index do |name, idx|
|
||||
Product.find_or_create_by!(code: name.parameterize) do |p|
|
||||
p.name = name
|
||||
p.position = idx
|
||||
p.active = true
|
||||
end
|
||||
end
|
||||
|
||||
goal = SalesGoal.find_or_initialize_by(name: "Prime 10 società paganti", project: matchlivetv)
|
||||
goal.assign_attributes(
|
||||
metric: "customers_acquired",
|
||||
target_value: 10,
|
||||
start_date: Date.new(2026, 8, 16),
|
||||
end_date: Date.new(2026, 9, 30),
|
||||
active: true
|
||||
)
|
||||
goal.save!
|
||||
SalesGoal.where(project_id: matchlivetv.id).where.not(id: goal.id).update_all(active: false)
|
||||
|
||||
template = MailTemplate.find_or_initialize_by(project: matchlivetv, name: "Presentazione MatchLiveTV")
|
||||
template.assign_attributes(
|
||||
subject: "MatchLiveTV per {{societa}}",
|
||||
body_html: <<~HTML
|
||||
<p>Ciao {{contatto_nome}},</p>
|
||||
<p>scriviamo a <strong>{{societa}}</strong> ({{regione}}) per presentarti MatchLiveTV.</p>
|
||||
<p>Possiamo aiutarvi a trasmettere le giovanili in modo semplice, con un piano {{piano}}.</p>
|
||||
<p>A presto,<br>Il team MatchLiveTV</p>
|
||||
HTML
|
||||
)
|
||||
template.save!
|
||||
|
||||
puts "Seed completato (utenti, progetti, prodotti, obiettivo, template email)."
|
||||
puts "Censimento MatchLiveTV: bin/rails matchlivetv:reset_campaign"
|
||||
puts "Progetti: #{Project.ordered.map(&:name).join(', ')}"
|
||||
puts "Utenti:"
|
||||
puts " admin@simplecrm.local / password123 (admin — tutti i progetti)"
|
||||
puts " marco@simplecrm.local / password123 (MatchLiveTV, RiskMeter)"
|
||||
puts " lucia@simplecrm.local / password123 (MatchLiveTV, Cardoo)"
|
||||
Reference in New Issue
Block a user