New file |
| | |
| | | <?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'); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?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'); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?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'); |
| | | } |
| | | |
| | | } |