Update: laravel 8 to 12, php 7.3 to php 8.3, Jenkinsfile, Unit/Feature testing, vapor

This commit is contained in:
Dillon Ngo
2026-03-25 07:51:49 +08:00
parent 76cc4296a3
commit 8d11ff6b7f
146 changed files with 2771 additions and 1434 deletions
+37 -29
View File
@@ -29,9 +29,11 @@ use App\Classes\General\Interfaces\Remarkable;
* Class CompanyModule
* @package App\Models
*
* @property \App\Models\Company company_id
* @property integer type
* @property integer status
* @property int $company_id
* @property int $type
* @property int $status
*
* @property \App\Models\Company $company
*/
class CompanyModule extends AbstractModel implements Addressable, Documentable, Contactable, ContainerOwner, Packable, Remarkable
{
@@ -40,7 +42,12 @@ class CompanyModule extends AbstractModel implements Addressable, Documentable,
protected $table = 'company_modules';
protected $dates = ['deleted_at'];
protected function casts(): array
{
return [
'deleted_at' => 'datetime',
];
}
/**
* @return BelongsTo
@@ -95,7 +102,7 @@ class CompanyModule extends AbstractModel implements Addressable, Documentable,
*/
public function invites(): belongsToMany
{
return $this->belongsToMany(CompanyModule::class, CompanyConnection::class,'inviter_id', 'invitee_id');
return $this->belongsToMany(CompanyModule::class, CompanyConnection::class, 'inviter_id', 'invitee_id');
}
/**
@@ -103,11 +110,12 @@ class CompanyModule extends AbstractModel implements Addressable, Documentable,
*/
public function inviters(): belongsToMany
{
return $this->belongsToMany(CompanyModule::class, CompanyConnection::class,'invitee_id', 'inviter_id');
return $this->belongsToMany(CompanyModule::class, CompanyConnection::class, 'invitee_id', 'inviter_id');
}
public function connections(): hasMany {
public function connections(): hasMany
{
return $this->hasMany(CompanyConnection::class, 'invitee_id');
}
@@ -125,29 +133,29 @@ class CompanyModule extends AbstractModel implements Addressable, Documentable,
return $this->HasMany(Order::class, 'company_module_id');
}
/**
* @return belongsToMany
*/
public function segments(): belongsToMany
{
return $this->belongsToMany(Segment::class, (new SegmentCompany())->getTable(), 'company_id', 'segment_id');
}
/**
* @return belongsToMany
*/
public function segments(): belongsToMany
{
return $this->belongsToMany(Segment::class, (new SegmentCompany())->getTable(), 'company_id', 'segment_id');
}
/**
* @return MorphMany
*/
public function documents(): morphMany
{
return $this->morphMany(Document::class, 'owner');
}
/**
* @return MorphMany
*/
public function documents(): morphMany
{
return $this->morphMany(Document::class, 'owner');
}
/**
* @return HasMany
*/
public function banks(): HasMany
{
return $this->HasMany(BankAccount::class, 'company_id');
}
/**
* @return HasMany
*/
public function banks(): HasMany
{
return $this->HasMany(BankAccount::class, 'company_id');
}
/**
* @return MorphMany
@@ -197,7 +205,7 @@ class CompanyModule extends AbstractModel implements Addressable, Documentable,
*/
public function transactions(): hasManyDeep
{
return $this->hasManyDeep(Transaction::class, [Order::class], ['company_module_id', 'owner_id'], ['id', 'id']);
return $this->hasManyDeep(Transaction::class, [Order::class], ['company_module_id', 'owner_id'], ['id', 'id']);
}
/**