Update source into github

This commit is contained in:
pbao9
2025-07-24 16:18:27 +07:00
parent 41419358dd
commit 69851ac7bc
2642 changed files with 284095 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ModuleVmware extends Model
{
use HasFactory;
protected $table = 'module_vmware';
protected $fillable = [
'name',
'module_ip_address_id',
'port',
'order_id',
'first_payment',
'next_payment',
'next_due_date',
'next_invoice',
'user',
'password',
'hostname',
'vmware_id',
'os_id',
'customer_id',
'status'
];
public function customer()
{
return $this->belongsTo(\App\Models\Customer::class);
}
public function ipAddress()
{
return $this->belongsTo(\App\Models\ModuleIpAddress::class,'module_ip_address_id','id');
}
public function os()
{
return $this->belongsTo(\App\Models\Os::class);
}
public function osGroup()
{
return $this->belongsTo(\App\Models\OsGroup::class);
}
public function order()
{
return $this->belongsTo(\App\Models\Order::class);
}
public function getStatus()
{
return match ($this->status) {
1 => '<span class="badge bg-success">Active</span>',
2 => '<span class="badge bg-secondary">Cancel</span>',
default => '<span class="badge bg-danger">Pending</span>',
};
}
}