Some general cleaning up in the menu's and the various controllers. Added a new class (yet to be tested) and removed most of the "piggy bank"-implementation in anticipation of the ideas from issue #6. Fixed a bug in the default user seeder.

This commit is contained in:
James Cole
2014-08-13 07:02:13 +02:00
parent dbcf6613c6
commit e2940015ca
36 changed files with 365 additions and 324 deletions

View File

@@ -23,10 +23,14 @@ class CreatePiggybanksTable extends Migration
$table->increments('id');
$table->timestamps();
$table->integer('account_id')->unsigned();
$table->date('targetdate')->nullable();
$table->string('name', 100);
$table->decimal('amount', 10, 2);
$table->decimal('target', 10, 2)->nullable();
$table->decimal('targetamount', 10, 2);
$table->date('targetdate')->nullable();
$table->date('startdate')->nullable();
$table->boolean('repeats');
$table->enum('rep_length', ['day', 'week', 'month', 'year'])->nullable();
$table->smallInteger('rep_times')->unsigned();
$table->enum('reminder', ['day', 'week', 'month', 'year'])->nullable();
$table->integer('order')->unsigned();
// connect account to piggybank.

View File

@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePiggyInstance extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('piggybank_repetitions', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->integer('piggybank_id')->unsigned();
$table->date('targetdate')->nullable();
$table->date('startdate')->nullable();
$table->decimal('currentamount',10,2);
// connect instance to piggybank.
$table->foreign('piggybank_id')
->references('id')->on('piggybanks')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('piggybank_repetitions');
}
}