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

This commit is contained in:
Dillon Ngo
2026-04-03 06:59:39 +08:00
parent 58de1017d7
commit b34b7c19d6
142 changed files with 3334 additions and 1101 deletions
+15 -15
View File
@@ -13,7 +13,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @package App\Models
* @version February 16, 2021, 9:04 pm
*
* @property string name
* @property string $name
*/
class ServiceType extends AbstractModel
{
@@ -23,46 +23,46 @@ class ServiceType extends AbstractModel
protected $table = 'service_types';
protected $dates = ['deleted_at'];
public $fillable = [
'name'
];
/**
* The attributes that should be casted to native types.
* Get the attributes that should be cast.
*
* @var array
* @return array<string, string>
*/
protected $casts = [
'name' => 'string'
];
protected function casts(): array
{
return [
'name' => 'string',
'deleted_at' => 'datetime',
];
}
/**
* Validation rules
*
* @var array
* @var array<string, string>
*/
public static $rules = [
'name' => 'required'
];
/**
* @return hasMany
* @return HasMany
*/
public function rates(): hasMany
public function rates(): HasMany
{
return $this->hasMany(CurrencyRate::class, 'service_id');
}
/**
* @return hasMany
* @return HasMany
*/
public function constants(): hasMany
public function constants(): HasMany
{
return $this->hasMany(SegmentConstant::class, 'detail->id')
->whereIn('reference', [SegmentConstants::SERVICE_TYPE, SegmentConstants::CUSTOM_SERVICE_TYPE]);