update api register
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class HotspotVoucher extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $hidden = ['password'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'password' => 'encrypted', 'profile_snapshot' => 'array', 'valid_until' => 'datetime',
|
||||
'activated_at' => 'datetime', 'used_at' => 'datetime', 'synced_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function sale()
|
||||
{
|
||||
return $this->belongsTo(VoucherSale::class, 'voucher_sale_id');
|
||||
}
|
||||
|
||||
public function packageProfile()
|
||||
{
|
||||
return $this->belongsTo(NasPackageProfile::class, 'nas_package_profile_id');
|
||||
}
|
||||
|
||||
public function mikrotik()
|
||||
{
|
||||
return $this->belongsTo(NasMikrotik::class, 'nas_mikrotik_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user