user side of contracts
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user