user side of contracts

This commit is contained in:
2019-04-26 02:51:23 -05:00
parent b367e2a166
commit 791681034c
9 changed files with 165 additions and 26 deletions

View File

@@ -15,9 +15,9 @@ class CreateContractsTable extends Migration
{
if(!Schema::hasTable('contracts')) {
Schema::create('contracts', function(Blueprint $table) {
$table->increments('id')->unique();
$table->increments('contract_id')->unique();
$table->string('title');
$table->date('date');
$table->date('end_date');
$table->text('body');
$table->timestamps();
});
@@ -27,8 +27,22 @@ class CreateContractsTable extends Migration
Schema::create('contract_bids', function(Blueprint $table) {
$table->increments('id')->unique();
$table->integer('contract_id');
$table->decimal('bid');
$table->boolean('accepted');
$table->decimal('bid_amount');
$table->string('character_name');
$table->string('character_id');
$table->string('corporation_name');
$table->string('corporation_id');
$table->timestamps();
});
}
if(!Schema::hasTable('accepted_bid')) {
Schema::create('accepted_bid', function(Blueprint $table) {
$table->increments('id');
$table->integer('contract_id');
$table->integer('bid_id');
$table->decimal('amount');
$table->timestamps();
});
}
}
@@ -42,5 +56,6 @@ class CreateContractsTable extends Migration
{
Schema::dropIfExists('contracts');
Schema::dropIfExists('contract_bids');
Schema::dropIfExists('contract_bid_accepted');
}
}