davide.cucurnia@vola.it
2024-02-05 89a71b79f4d026d6d997f98e3bd0e025fc3a57fd
Model per gli utenti sso
3 files added
101 ■■■■■ changed files
app/Models/Msisdn.php 31 ●●●●● patch | view | raw | blame | history
app/Models/Products.php 29 ●●●●● patch | view | raw | blame | history
app/Models/VodafoneUser.php 41 ●●●●● patch | view | raw | blame | history
app/Models/Msisdn.php
New file
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Msisdn extends Model
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'VodafoneUser',
        'MSISDN',
        'CardType',
        'IdPiano',
        'VodafoneOne',
        'TopClub',
        'SeniorityCluster',
    ];
    public function user()
    {
        return $this->belongsTo('App\Models\VodafoneUser', 'VodafoneUser', 'id');
    }
}
app/Models/Products.php
New file
@@ -0,0 +1,29 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Products extends Model
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'LinkedMSISDN',
        'tmCode',
        'OMProductId',
        'description',
        'activationDate'
    ];
    public function user()
    {
        return $this->belongsTo('App\Models\Msisdn', 'LinkedMSISDN', 'id');
    }
}
app/Models/VodafoneUser.php
New file
@@ -0,0 +1,41 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class VodafoneUser extends Model
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'Name',
        'Surname',
        'EmailAddress',
        'ProfileIdentifier',
        'FiscalCode',
        'Type_ID',
        'Custcode',
        'EmailCSA',
        'PIN_CSA',
        'ID_CSA',
        'Sex',
        'BirthProvinceName',
        'BirthPlace',
        'HomeProvinceName',
        'MicroBusiness',
        'HomePhone',
        'Address',
    ];
    public function sims()
    {
        return $this->hasMany('App\Models\Msisdn','VodafoneUser', 'id');
    }
}