staff, mno, clients, bug fixes

This commit is contained in:
Kwesi Banson
2023-05-08 10:13:03 +00:00
parent 903c1703b9
commit f2279bd13a
49 changed files with 3260 additions and 6511 deletions

14
app/Models/ClientFile.php Normal file
View 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
View 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
View 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";
}

View File

@@ -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
View 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');
}
}

View 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');
}
}