staff, mno, clients, bug fixes
This commit is contained in:
14
app/Models/ClientFile.php
Normal file
14
app/Models/ClientFile.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ClientFile extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
|
||||
public function client_info(){
|
||||
return $this->hasOne('App\Models\Client', 'id', 'client_id');
|
||||
}
|
||||
}
|
||||
10
app/Models/Department.php
Normal file
10
app/Models/Department.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Department extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
}
|
||||
11
app/Models/Mnoips.php
Normal file
11
app/Models/Mnoips.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Mnoips extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
public $table = "mno_ip_addresses";
|
||||
}
|
||||
@@ -9,11 +9,7 @@ class NetworkOps extends Model
|
||||
protected $guarded = array('id');
|
||||
public $table = "network_operators";
|
||||
|
||||
public function country_info(){
|
||||
return $this->hasOne('App\Models\Country', 'alpha_2_code', 'country');
|
||||
}
|
||||
|
||||
public function account_manager_info(){
|
||||
return $this->hasOne('App\Models\SystemUser', 'id', 'account_manager_id');
|
||||
return $this->hasOne('App\Models\StaffMember', 'id', 'account_manager_id');
|
||||
}
|
||||
}
|
||||
|
||||
21
app/Models/SenderId.php
Normal file
21
app/Models/SenderId.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SenderId extends Model{
|
||||
|
||||
protected $guarded = array('id');
|
||||
public $table = "sender_ids";
|
||||
|
||||
public function modified_by_info(){
|
||||
return $this->hasOne('App\Models\StaffMember', 'id', 'last_modified_by');
|
||||
}
|
||||
public function network_info(){
|
||||
return $this->hasOne('App\Models\NetworkOps', 'id', 'netowkr_id');
|
||||
}
|
||||
public function created_by_info(){
|
||||
return $this->hasOne('App\Models\StaffMember', 'id', 'created_by');
|
||||
}
|
||||
}
|
||||
21
app/Models/StaffMember.php
Normal file
21
app/Models/StaffMember.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class StaffMember extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
public $table = "staff_members";
|
||||
|
||||
public function department_info(){
|
||||
return $this->hasOne('App\Models\Department', 'id', 'department_id');
|
||||
}
|
||||
public function created_by_info(){
|
||||
return $this->hasOne('App\Models\Account', 'id', 'created_by');
|
||||
}
|
||||
public function modified_by_info(){
|
||||
return $this->hasOne('App\Models\Account', 'id', 'modified_by');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user