Web frontend work

This commit is contained in:
Deon George
2021-05-13 22:40:21 +10:00
parent 834ece2645
commit 5e5d0d6c3d
20 changed files with 722 additions and 21 deletions

View File

@@ -13,14 +13,32 @@ class CreateNodes extends Migration
*/
public function up()
{
Schema::create('protocols', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('name');
$table->integer('port')->nullable();
$table->boolean('active');
});
Schema::create('software', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('name');
$table->boolean('active');
});
Schema::create('nodes', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('zone_id')->index();
$table->integer('zone_id')->nullable()->index();
$table->foreign('zone_id')->references('id')->on('zones');
$table->integer('region_id')->nullable();
$table->integer('host_id')->index();
$table->integer('host_id')->nullable()->index();
$table->integer('hub_id')->nullable()->index();
$table->integer('node_id')->index();
$table->integer('node_id')->nullable()->index();
$table->integer('point_id')->default(0);
$table->boolean('active');
@@ -28,15 +46,34 @@ class CreateNodes extends Migration
$table->string('system');
$table->string('sysop');
$table->string('location');
$table->integer('baud')->default('0');
$table->string('email')->nullable();
$table->string('address')->nullable();
$table->integer('port')->nullable();
$table->integer('baud')->nullable();
$table->string('phone')->nullable();
$table->string('notes')->nullable();
$table->binary('zt',10)->nullable();
$table->boolean('is_zc')->default(FALSE);
$table->boolean('is_rc')->default(FALSE);
$table->boolean('is_hub')->default(FALSE);
$table->boolean('is_host')->default(FALSE);
$table->string('sespass')->nullable();
$table->string('pktpass',8)->nullable();
$table->string('ticpass')->nullable();
$table->string('fixpass')->nullable();
$table->string('zt',10)->nullable();
$table->unique(['zone_id','host_id','node_id','point_id']);
$table->unique(['zone_id','zt']);
$table->foreign('zone_id')->references('id')->on('zones');
$table->integer('protocol_id')->nullable();
$table->foreign('protocol_id')->references('id')->on('protocols');
$table->integer('software_id')->nullable();
$table->foreign('software_id')->references('id')->on('software');
// $table->unique(['zone_id','host_id','id']);
// $table->index(['zone_id','host_id']);
@@ -54,5 +91,7 @@ class CreateNodes extends Migration
public function down()
{
Schema::dropIfExists('nodes');
Schema::dropIfExists('protocols');
Schema::dropIfExists('software');
}
}