Filippo Bertilotti
5 days ago 06f7b6188fe152cd561e60ff1abf2bac56773347
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
 
namespace Database\Seeders;
 
use App\Models\Msisdn;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
 
class VodafoneUserSeeder extends Seeder
{
 
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $currentDate = date("Y-m-d H:i:s");
 
        $userID = DB::table('fakesso_vodafoneusers')->insertGetId([
            'EmailAddress' => 'davide.cucurnia@vola.it',
            'Sex' => '',
            'Surname' => 'Sandrelli',
            'BirthProvinceName' => 'LUCCA',
            'BirthPlace' => 'VIAREGGIO',
            'Type_ID' => '2',
            'Birthdate' => 'Fri Apr 16 00:00:00 MET 1971',
            'HomeProvinceName' => 'LUCCA',
            'Custcode' => '5.49275',
            'ProfileIdentifier' => 'BUSINESS_EMPLOYEE',
            'MicroBusiness' => 'false',
            'HomePhone' => '',
            'Address' => 'VIA BERNARDINO',
            'FiscalCode' => 'MNCCST71D16L833U',
            'Name' => 'Paola',
            'Username' => 'FAKE_SSO_1',
            'created_at' => $currentDate,
            'updated_at' => $currentDate
        ]);
 
        $msisdnID = DB::table('fakesso_msisdn')->insertGetId([
            'CardType' => 'Ric',
            'SimSeniorityDate' => '03/08/2016',
            'MSISDN' => '3464232371',
            'TopClub' => 'false',
            'IdPiano' => '2491',
            'SeniorityCluster' => '',
            'LinkedUser' => $userID,
            'created_at' => $currentDate,
            'updated_at' => $currentDate
        ]);
 
        $productID_1 = DB::table('fakesso_products')->insertGetId([
            'productId' => '2583',
            'activationDate' => '1702249200000',
            'changeStateDate' => '1702249200000',
            'inheritanceRule' => '',
            'buyCost' => '0.0',
            'frequency' => '',
            'infoRecurringFees' => 'N',
            'invertStatus' => 'N',
            'maxNumOfTry' => 0,
            'monopoliFlag' => 'N',
            'longDescription' => 'Abilita la SIM alla distinzione del traffico personale da quello aziendale',
            'longName' => 'Autorizzazione Dual',
            'productPosition' => 1,
            'numberOfUsedTry' => 0,
            'numberOfTryAvailable' => 0,
            'OMProductId' => '2156',
            'OMSource' => 'CCBS',
            'productType' => 'Service',
            'shortDescription' => 'Abilita la SIM alla distinzione del traffico personale da quello aziendale',
            'shortName' => 'Autorizzazione Dual',
            'productStateOnSim' => 'ACTIVE',
            'spyderId' => '',
            'flagCommitment' => '',
            'mm4MPromoId' => '',
            'idJoin' => '',
            'lastPaidFlag' => '',
            'offerType' => '',
            'lastChargeZeroReason' => '',
            'created_at' => $currentDate,
            'updated_at' => $currentDate
        ]);
 
        $msisdn = Msisdn::find($msisdnID);
        $msisdn->products()->attach($productID_1);
 
 
 
 
 
 
        // scrivo l'utente
        // scrivo le sim associate all'utente
        // PRESUMENDO CHE I PRODOTTI MENZIONATI ESISTANO GIA cerco i prodotti che dovrei associare alla sim
        // scrivo relazioni prodotti - sim
 
 
        // scrivo l'utente
        // scrivo le sim associate all'utente
        // PRESUMENDO CHE I PRODOTTI MENZIONATI ESISTANO GIA cerco i prodotti che dovrei associare alla sim
        // scrivo relazioni prodotti - sim
    }
}