feat: Implement DNS management with dedicated models, repositories, requests, controllers, and services, while refactoring authentication by removing Passport and Sanctum.
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (!Schema::hasTable('dns_manager_servers')) {
|
||||
Schema::create('dns_manager_servers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('ip_address')->index();
|
||||
$table->string('username')->default('root');
|
||||
$table->string('password', 255);
|
||||
$table->string('api_key')->nullable();
|
||||
$table->string('status')->default('activated');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
if (!Schema::hasTable('dns_manager_domain')) {
|
||||
Schema::create('dns_manager_domain', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('domain_name')->nullable();
|
||||
$table->tinyInteger('user_id')->index()->default(0);
|
||||
$table->integer('dns_manager_server_id')->default(0)->index();
|
||||
$table->integer('is_created')->default(0);
|
||||
$table->integer('plesk_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
if (!Schema::hasTable('dns_domain_user')) {
|
||||
Schema::create('dns_domain_user', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('domain_id')->index();
|
||||
$table->unsignedBigInteger('user_id')->index();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['domain_id', 'user_id']);
|
||||
});
|
||||
}
|
||||
|
||||
if (!Schema::hasTable('dns_manager_ns')) {
|
||||
Schema::create('dns_manager_ns', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('dns_manager_domain_id')->index();
|
||||
$table->string('name')->default('');
|
||||
$table->string('type')->default('A');
|
||||
$table->string('type_valid')->nullable();
|
||||
$table->string('priority')->nullable()->default(0);
|
||||
$table->string('weight')->nullable()->default(0);
|
||||
$table->string('port')->nullable()->default(0);
|
||||
$table->string('service_name')->nullable();
|
||||
$table->string('protocol')->nullable();
|
||||
$table->longText('value')->nullable();
|
||||
$table->integer('plesk_id')->nullable();
|
||||
$table->integer('ttl')->default(300);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('dns_manager_ns');
|
||||
Schema::dropIfExists('dns_domain_user');
|
||||
Schema::dropIfExists('dns_manager_domain');
|
||||
Schema::dropIfExists('dns_manager_servers');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user