Skip to content

Commit

Permalink
Versión aún funcional :c
Browse files Browse the repository at this point in the history
  • Loading branch information
luistrejohi committed Sep 29, 2018
1 parent 76f8a34 commit 228f3ca
Show file tree
Hide file tree
Showing 12 changed files with 235 additions and 1 deletion.
10 changes: 10 additions & 0 deletions app/Pay_module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Pay_module extends Model
{
//
}
10 changes: 10 additions & 0 deletions app/Pulsera.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Pulsera extends Model
{
//
}
10 changes: 10 additions & 0 deletions app/Pulseras_user.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Pulseras_user extends Model
{
//
}
10 changes: 10 additions & 0 deletions app/User_payment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class User_payment extends Model
{
//
}
10 changes: 10 additions & 0 deletions app/User_transport_ubication.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class User_transport_ubication extends Model
{
//
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function up()
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->float('saldo', 8, 2);
$table->rememberToken();
$table->timestamps();
});
Expand Down
37 changes: 37 additions & 0 deletions database/migrations/2018_09_28_224801_create_pay_modules_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePayModulesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::defaultStringLength(191);
Schema::create('pay_modules', function (Blueprint $table) {
$table->increments('id');
$table->string('ruta');
$table->string('modelo');
$table->decimal('latitud',10,8);
$table->decimal('longitud',11,8);
$table->text('observaciones');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pay_module');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserTransportUbicationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::defaultStringLength(191);
Schema::enableForeignKeyConstraints();
Schema::create('user_transport_ubications', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('module_id');
$table->unsignedInteger('user_id');
$table->timestamps();

$table->foreign('module_id')->references('id')->on('pay_modules');
$table->foreign('user_id')->references('id')->on('users');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_transport_ubication');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserPaymentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::defaultStringLength(191);
Schema::enableForeignKeyConstraints();
Schema::create('user_payments', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('module_id');
$table->unsignedInteger('user_id');
$table->timestamps();

$table->foreign('module_id')->references('id')->on('pay_modules');
$table->foreign('user_id')->references('id')->on('users');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_payment');
}
}
33 changes: 33 additions & 0 deletions database/migrations/2018_09_29_013243_create_pulseras_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePulserasTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pulseras', function (Blueprint $table) {
$table->increments('id');
$table->string('serial_number');
$table->dateTime('creado');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pulseras');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePulserasUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pulseras_users', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('pulsera_id');
$table->unsignedInteger('owner_id');
$table->unsignedInteger('permited_user');
$table->timestamps();

$table->foreign('pulsera_id')->references('id')->on('pulseras');
$table->foreign('owner_id')->references('id')->on('users');
$table->foreign('permited_user')->references('id')->on('users');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pulseras_users');
}
}
1 change: 0 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

0 comments on commit 228f3ca

Please sign in to comment.