feat: Add DNS management resources and importer
- Implemented DomainCollection, DomainDetailResource, DomainNSCollection, DomainNSResource, and DomainResource for handling DNS domain and record data. - Created VpsServiceCollection and VpsServiceResource for VPS service management. - Added DnsManagerNS and DnsManagerUser models to represent DNS records and user associations. - Developed AdminZoneDnsSqlImporter for importing DNS data from SQL dumps, including customer and DNS domain records. - Added migration scripts to update the customers table with new fields and sync foreign key references for DNS tables. - Created a migration preview document outlining the mapping and schema changes for the admin zone DNS import.
This commit is contained in:
@@ -26,6 +26,7 @@ class Customer extends Authenticatable implements JWTSubject
|
||||
|
||||
protected $fillable = [
|
||||
'fullname',
|
||||
'username',
|
||||
'avatar',
|
||||
'address',
|
||||
'state',
|
||||
@@ -35,6 +36,7 @@ class Customer extends Authenticatable implements JWTSubject
|
||||
'company',
|
||||
'phone',
|
||||
'email',
|
||||
'email_verified_at',
|
||||
'email_verify',
|
||||
'email_hash',
|
||||
'email_marketing',
|
||||
@@ -43,6 +45,7 @@ class Customer extends Authenticatable implements JWTSubject
|
||||
'front_identity_number',
|
||||
'back_identity_number',
|
||||
'password',
|
||||
'type',
|
||||
'credit',
|
||||
'total',
|
||||
'total_pending',
|
||||
@@ -55,6 +58,7 @@ class Customer extends Authenticatable implements JWTSubject
|
||||
|
||||
protected $updatable = [
|
||||
'fullname',
|
||||
'username',
|
||||
'phone',
|
||||
'company',
|
||||
'address',
|
||||
@@ -82,6 +86,7 @@ class Customer extends Authenticatable implements JWTSubject
|
||||
|
||||
protected $casts = [
|
||||
'gender' => \App\Enums\Client\ClientGender::class,
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -215,6 +220,11 @@ class Customer extends Authenticatable implements JWTSubject
|
||||
return (string) floor($this->total / 100);
|
||||
}
|
||||
|
||||
public function getNameAttribute()
|
||||
{
|
||||
return $this->fullname;
|
||||
}
|
||||
|
||||
public function getCmndBeforeAttribute()
|
||||
{
|
||||
return $this->front_identity_number ?? '';
|
||||
|
||||
Reference in New Issue
Block a user