staff members,senderid, documents,bug fixes, etc

This commit is contained in:
Kwesi Banson
2023-07-27 01:33:36 +00:00
parent f2279bd13a
commit ea6d83e5d9
154 changed files with 21442 additions and 246 deletions

View File

@@ -18,7 +18,7 @@ class ClickServer extends Model
return $this->hasMany('App\Models\ServerCredential', 'server_id', 'id');
}
public function modified_by_info(){
return $this->hasOne('App\Models\Account', 'id', 'last_modified_by_id');
return $this->hasOne('App\Models\SystemUser', 'id', 'last_modified_by_id');
}

View File

@@ -13,6 +13,9 @@ class Client extends Model
public function country_info(){
return $this->hasOne('App\Models\Country', 'alpha_2_code', 'country');
}
public function country_flag_info(){
return $this->hasOne('App\Models\CountryFlag', 'country', 'country');
}
public function payment_type_info(){
return $this->hasOne('App\Models\PaymentType', 'id', 'pay_mode');
}
@@ -25,13 +28,13 @@ class Client extends Model
return $this->hasMany('App\Models\MeetingReport', 'client', 'id');
}
public function auth_user_info(){
return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
return $this->hasOne('App\Models\SystemUser', 'id', 'auth_user_id');
}
public function created_by_info(){
return $this->hasOne('App\Models\Account', 'id', 'created_by');
return $this->hasOne('App\Models\SystemUser', 'id', 'created_by');
}
public function modified_by_info(){
return $this->hasOne('App\Models\Account', 'id', 'last_modified_by');
return $this->hasOne('App\Models\SystemUser', 'id', 'last_modified_by');
}
public function short_code_info(){
return $this->hasMany('App\Models\ShortCode', 'client_id', 'id');

View File

@@ -12,7 +12,7 @@ class ClientNote extends Model
return $this->hasOne('App\Models\Client', 'id', 'client_id');
}
public function created_by_info(){
return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
return $this->hasOne('App\Models\SystemUser', 'id', 'auth_user_id');
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CountryFlag extends Model
{
public $timestamps = false;
public $table = "flags";
}

View File

@@ -4,10 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Account extends Model
class GeneralDocument extends Model
{
protected $guarded = array('id');
public $table = "auth_users";
}

15
app/Models/MnoFile.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class MnoFile extends Model
{
protected $guarded = array('id');
public $table = "mno_files";
public function mno_info(){
return $this->hasOne('App\Models\NetworkOps', 'id', 'mno_id');
}
}

View File

@@ -8,4 +8,7 @@ class Mnoips extends Model
{
protected $guarded = array('id');
public $table = "mno_ip_addresses";
public function created_by_info(){
return $this->hasOne('App\Models\SystemUser', 'id', 'last_modified_by');
}
}

19
app/Models/Mnonote.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Mnonote extends Model
{
protected $guarded = array('id');
public $table = "mno_notes";
public function mno_info(){
return $this->hasOne('App\Models\NetworkOps', 'id', 'mno_id');
}
public function created_by_info(){
return $this->hasOne('App\Models\SystemUser', 'id', 'user_id');
}
}

View File

@@ -0,0 +1,17 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class OfficeLocation extends Model
{
protected $guarded = array('id');
public function created_by_info(){
return $this->hasOne('App\Models\StaffMember', 'id', 'user_id');
}
public function country_manager_info(){
return $this->hasOne('App\Models\StaffMember', 'id', 'country_manager_id');
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class UserActivity extends Model
{
protected $guarded = array('id');
public $table = "user_activities";
}