Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 390
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
ChannelProviderSeeder
0.00% covered (danger)
0.00%
0 / 390
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 run
0.00% covered (danger)
0.00%
0 / 390
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Database\Seeds;
4
5use CodeIgniter\Database\Seeder;
6
7class ChannelProviderSeeder extends Seeder
8{
9    public function run()
10    {
11        $data = [
12
13            /*
14            |--------------------------------------------------------------------------
15            | SMS PROVIDERS - GLOBAL AGGREGATORS
16            |--------------------------------------------------------------------------
17            */
18
19            [
20                'channel'      => 'sms',
21                'name'         => 'Infobip SMS API',
22                'code'         => 'infobip_sms',
23                'status'       => 1,
24                'priority'     => 1,
25                'scope'        => 'global',
26                'country_code' => null,
27            ],
28            [
29                'channel'      => 'sms',
30                'name'         => 'Africa\'s Talking SMS API',
31                'code'         => 'africastalking_sms',
32                'status'       => 1,
33                'priority'     => 2,
34                'scope'        => 'global',
35                'country_code' => null,
36            ],
37            [
38                'channel'      => 'sms',
39                'name'         => 'MessageBird SMS API',
40                'code'         => 'messagebird_sms',
41                'status'       => 1,
42                'priority'     => 3,
43                'scope'        => 'global',
44                'country_code' => null,
45            ],
46            [
47                'channel'      => 'sms',
48                'name'         => 'Plivo SMS API',
49                'code'         => 'plivo_sms',
50                'status'       => 1,
51                'priority'     => 4,
52                'scope'        => 'global',
53                'country_code' => null,
54            ],
55
56            /*
57            |--------------------------------------------------------------------------
58            | WEST AFRICA (XOF) - OPERATORS
59            |--------------------------------------------------------------------------
60            */
61
62            // ðŸ‡§ðŸ‡¯ Bénin
63            [
64                'channel'      => 'sms',
65                'name'         => 'MTN Bénin SMS',
66                'code'         => 'mtn_bj_sms',
67                'status'       => 1,
68                'priority'     => 10,
69                'scope'        => 'country',
70                'country_code' => 'BJ',
71            ],
72            [
73                'channel'      => 'sms',
74                'name'         => 'Moov Africa Bénin SMS',
75                'code'         => 'moov_bj_sms',
76                'status'       => 1,
77                'priority'     => 11,
78                'scope'        => 'country',
79                'country_code' => 'BJ',
80            ],
81
82            // ðŸ‡§ðŸ‡« Burkina Faso
83            [
84                'channel'      => 'sms',
85                'name'         => 'Orange Burkina Faso SMS',
86                'code'         => 'orange_bf_sms',
87                'status'       => 1,
88                'priority'     => 10,
89                'scope'        => 'country',
90                'country_code' => 'BF',
91            ],
92            [
93                'channel'      => 'sms',
94                'name'         => 'Moov Africa Burkina Faso SMS',
95                'code'         => 'moov_bf_sms',
96                'status'       => 1,
97                'priority'     => 11,
98                'scope'        => 'country',
99                'country_code' => 'BF',
100            ],
101
102            // ðŸ‡¨ðŸ‡® Côte d’Ivoire
103            [
104                'channel'      => 'sms',
105                'name'         => 'Orange Côte d’Ivoire SMS',
106                'code'         => 'orange_ci_sms',
107                'status'       => 1,
108                'priority'     => 10,
109                'scope'        => 'country',
110                'country_code' => 'CI',
111            ],
112            [
113                'channel'      => 'sms',
114                'name'         => 'MTN Côte d’Ivoire SMS',
115                'code'         => 'mtn_ci_sms',
116                'status'       => 1,
117                'priority'     => 11,
118                'scope'        => 'country',
119                'country_code' => 'CI',
120            ],
121            [
122                'channel'      => 'sms',
123                'name'         => 'Moov Africa Côte d’Ivoire SMS',
124                'code'         => 'moov_ci_sms',
125                'status'       => 1,
126                'priority'     => 12,
127                'scope'        => 'country',
128                'country_code' => 'CI',
129            ],
130
131            // ðŸ‡¬ðŸ‡¼ Guinée-Bissau
132            [
133                'channel'      => 'sms',
134                'name'         => 'Orange Guinée-Bissau SMS',
135                'code'         => 'orange_gw_sms',
136                'status'       => 1,
137                'priority'     => 10,
138                'scope'        => 'country',
139                'country_code' => 'GW',
140            ],
141
142            // ðŸ‡²ðŸ‡± Mali
143            [
144                'channel'      => 'sms',
145                'name'         => 'Orange Mali SMS',
146                'code'         => 'orange_ml_sms',
147                'status'       => 1,
148                'priority'     => 10,
149                'scope'        => 'country',
150                'country_code' => 'ML',
151            ],
152            [
153                'channel'      => 'sms',
154                'name'         => 'Moov Africa Mali SMS',
155                'code'         => 'moov_ml_sms',
156                'status'       => 1,
157                'priority'     => 11,
158                'scope'        => 'country',
159                'country_code' => 'ML',
160            ],
161
162            // ðŸ‡³ðŸ‡ª Niger
163            [
164                'channel'      => 'sms',
165                'name'         => 'Orange Niger SMS',
166                'code'         => 'orange_ne_sms',
167                'status'       => 1,
168                'priority'     => 10,
169                'scope'        => 'country',
170                'country_code' => 'NE',
171            ],
172            [
173                'channel'      => 'sms',
174                'name'         => 'Moov Africa Niger SMS',
175                'code'         => 'moov_ne_sms',
176                'status'       => 1,
177                'priority'     => 11,
178                'scope'        => 'country',
179                'country_code' => 'NE',
180            ],
181
182            // ðŸ‡¸ðŸ‡³ Sénégal
183            [
184                'channel'      => 'sms',
185                'name'         => 'Orange Sénégal SMS',
186                'code'         => 'orange_sn_sms',
187                'status'       => 1,
188                'priority'     => 10,
189                'scope'        => 'country',
190                'country_code' => 'SN',
191            ],
192            [
193                'channel'      => 'sms',
194                'name'         => 'Free Sénégal SMS',
195                'code'         => 'free_sn_sms',
196                'status'       => 1,
197                'priority'     => 11,
198                'scope'        => 'country',
199                'country_code' => 'SN',
200            ],
201            [
202                'channel'      => 'sms',
203                'name'         => 'Expresso Sénégal SMS',
204                'code'         => 'expresso_sn_sms',
205                'status'       => 1,
206                'priority'     => 12,
207                'scope'        => 'country',
208                'country_code' => 'SN',
209            ],
210
211            // ðŸ‡¹ðŸ‡¬ Togo
212            [
213                'channel'      => 'sms',
214                'name'         => 'Togocom SMS',
215                'code'         => 'togocom_sms',
216                'status'       => 1,
217                'priority'     => 10,
218                'scope'        => 'country',
219                'country_code' => 'TG',
220            ],
221            [
222                'channel'      => 'sms',
223                'name'         => 'Moov Africa Togo SMS',
224                'code'         => 'moov_tg_sms',
225                'status'       => 1,
226                'priority'     => 11,
227                'scope'        => 'country',
228                'country_code' => 'TG',
229            ],
230
231            /*
232            |--------------------------------------------------------------------------
233            | CENTRAL AFRICA (XAF) - OPERATORS
234            |--------------------------------------------------------------------------
235            */
236
237            // ðŸ‡¨ðŸ‡² Cameroun
238            [
239                'channel'      => 'sms',
240                'name'         => 'MTN Cameroon SMS',
241                'code'         => 'mtn_cm_sms',
242                'status'       => 1,
243                'priority'     => 10,
244                'scope'        => 'country',
245                'country_code' => 'CM',
246            ],
247            [
248                'channel'      => 'sms',
249                'name'         => 'Orange Cameroon SMS',
250                'code'         => 'orange_cm_sms',
251                'status'       => 1,
252                'priority'     => 11,
253                'scope'        => 'country',
254                'country_code' => 'CM',
255            ],
256            [
257                'channel'      => 'sms',
258                'name'         => 'Camtel SMS',
259                'code'         => 'camtel_cm_sms',
260                'status'       => 1,
261                'priority'     => 12,
262                'scope'        => 'country',
263                'country_code' => 'CM',
264            ],
265
266            // ðŸ‡¨ðŸ‡« Centrafrique
267            [
268                'channel'      => 'sms',
269                'name'         => 'Orange Centrafrique SMS',
270                'code'         => 'orange_cf_sms',
271                'status'       => 1,
272                'priority'     => 10,
273                'scope'        => 'country',
274                'country_code' => 'CF',
275            ],
276            [
277                'channel'      => 'sms',
278                'name'         => 'Telecel Centrafrique SMS',
279                'code'         => 'telecel_cf_sms',
280                'status'       => 1,
281                'priority'     => 11,
282                'scope'        => 'country',
283                'country_code' => 'CF',
284            ],
285
286            // ðŸ‡¨ðŸ‡¬ Congo
287            [
288                'channel'      => 'sms',
289                'name'         => 'MTN Congo SMS',
290                'code'         => 'mtn_cg_sms',
291                'status'       => 1,
292                'priority'     => 10,
293                'scope'        => 'country',
294                'country_code' => 'CG',
295            ],
296            [
297                'channel'      => 'sms',
298                'name'         => 'Airtel Congo SMS',
299                'code'         => 'airtel_cg_sms',
300                'status'       => 1,
301                'priority'     => 11,
302                'scope'        => 'country',
303                'country_code' => 'CG',
304            ],
305
306            // ðŸ‡¬ðŸ‡¦ Gabon
307            [
308                'channel'      => 'sms',
309                'name'         => 'Airtel Gabon SMS',
310                'code'         => 'airtel_ga_sms',
311                'status'       => 1,
312                'priority'     => 10,
313                'scope'        => 'country',
314                'country_code' => 'GA',
315            ],
316            [
317                'channel'      => 'sms',
318                'name'         => 'Moov Africa Gabon SMS',
319                'code'         => 'moov_ga_sms',
320                'status'       => 1,
321                'priority'     => 11,
322                'scope'        => 'country',
323                'country_code' => 'GA',
324            ],
325
326            // ðŸ‡¬ðŸ‡¶ Guinée Ã©quatoriale
327            [
328                'channel'      => 'sms',
329                'name'         => 'Orange Guinée Ã©quatoriale SMS',
330                'code'         => 'orange_gq_sms',
331                'status'       => 1,
332                'priority'     => 10,
333                'scope'        => 'country',
334                'country_code' => 'GQ',
335            ],
336            [
337                'channel'      => 'sms',
338                'name'         => 'Getesa SMS',
339                'code'         => 'getesa_gq_sms',
340                'status'       => 1,
341                'priority'     => 11,
342                'scope'        => 'country',
343                'country_code' => 'GQ',
344            ],
345
346            // ðŸ‡¹ðŸ‡© Tchad
347            [
348                'channel'      => 'sms',
349                'name'         => 'Airtel Tchad SMS',
350                'code'         => 'airtel_td_sms',
351                'status'       => 1,
352                'priority'     => 10,
353                'scope'        => 'country',
354                'country_code' => 'TD',
355            ],
356            [
357                'channel'      => 'sms',
358                'name'         => 'Moov Africa Tchad SMS',
359                'code'         => 'moov_td_sms',
360                'status'       => 1,
361                'priority'     => 11,
362                'scope'        => 'country',
363                'country_code' => 'TD',
364            ],
365
366            /*
367            |--------------------------------------------------------------------------
368            | WHATSAPP PROVIDERS
369            |--------------------------------------------------------------------------
370            */
371
372            [
373                'channel'      => 'whatsapp',
374                'name'         => 'Meta WhatsApp Cloud API',
375                'code'         => 'meta_whatsapp',
376                'status'       => 1,
377                'priority'     => 1,
378                'scope'        => 'global',
379                'country_code' => null,
380            ],
381            [
382                'channel'      => 'whatsapp',
383                'name'         => 'Twilio WhatsApp API',
384                'code'         => 'twilio_whatsapp',
385                'status'       => 1,
386                'priority'     => 2,
387                'scope'        => 'global',
388                'country_code' => null,
389            ],
390            [
391                'channel'      => 'whatsapp',
392                'name'         => 'Infobip WhatsApp API',
393                'code'         => 'infobip_whatsapp',
394                'status'       => 1,
395                'priority'     => 3,
396                'scope'        => 'global',
397                'country_code' => null,
398            ],
399
400            /*
401            |--------------------------------------------------------------------------
402            | EMAIL PROVIDERS
403            |--------------------------------------------------------------------------
404            */
405
406            [
407                'channel'      => 'email',
408                'name'         => 'SendGrid Email API',
409                'code'         => 'sendgrid',
410                'status'       => 1,
411                'priority'     => 1,
412                'scope'        => 'global',
413                'country_code' => null,
414            ],
415            [
416                'channel'      => 'email',
417                'name'         => 'MailerLite Email API',
418                'code'         => 'mailerlite',
419                'status'       => 1,
420                'priority'     => 2,
421                'scope'        => 'global',
422                'country_code' => null,
423            ],
424            [
425                'channel'      => 'email',
426                'name'         => 'Infobip Email API',
427                'code'         => 'infobip',
428                'status'       => 1,
429                'priority'     => 1,
430                'scope'        => 'global',
431                'country_code' => null,
432            ],
433            [
434                'channel'      => 'email',
435                'name'         => 'Mailgun Email API',
436                'code'         => 'mailgun',
437                'status'       => 1,
438                'priority'     => 2,
439                'scope'        => 'global',
440                'country_code' => null,
441            ],
442            [
443                'channel'      => 'email',
444                'name'         => 'Amazon SES Email Service',
445                'code'         => 'ses',
446                'status'       => 1,
447                'priority'     => 3,
448                'scope'        => 'global',
449                'country_code' => null,
450            ],
451            [
452                'channel'      => 'email',
453                'name'         => 'SMTP Standard (Fallback)',
454                'code'         => 'smtp',
455                'status'       => 1,
456                'priority'     => 99,
457                'scope'        => 'global',
458                'country_code' => null,
459            ],
460        ];
461
462        $this->db->table('channel_provider')->insertBatch($data);
463    }
464}