Temporarily finish the migrations and models.

This commit is contained in:
catsworld
2016-06-07 18:07:50 +08:00
parent 25a87fe4e8
commit b252545ebd
8 changed files with 28 additions and 61 deletions
+3 -1
View File
@@ -30,4 +30,6 @@ Route::group(['middleware' => ['web']], function () {
//
});
Route::get('/good', 'GoodController@getList');
Route::get('/good', [
"uses" => "GoodController@getList"
]);
@@ -14,14 +14,14 @@ class CreateUsersTable extends Migration
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->integer('priviledge');
$table->integer('priviledge');
$table->string('username')->unique();
$table->string('password');
$table->string('stuid');
$table->string('SSO');
$table->string('nickname');
$table->string('stuid');
$table->string('SSO');
$table->string('nickname');
$table->string('email')->unique();
$table->integer('role_id');
$table->integer('role_id');
$table->timestamps();
});
}
@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transactions', function (Blueprint $table) {
$table->increments('id');
$table->integer('trans_id');
$table->integer('buyer_id');
$table->integer('seller_id');
$table->integer('good_id');
$table->integer('status');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('transactions');
}
}
@@ -18,8 +18,8 @@ class CreateUserinfoTable extends Migration
$table->string('realname');
$table->string('tel_num');
$table->string('address');
$table->string('last_login_ip');
$table->string('register_ip');
$table->string('last_login_ip');
$table->string('register_ip');
$table->timestamps();
});
}
@@ -14,11 +14,11 @@ class CreateMessagesTable extends Migration
{
Schema::create('messages', function (Blueprint $table) {
$table->increments('message_id');
$table->integer('cat_id');
$table->integer('user_id');
$table->integer('good_id');
$table->integer('shop_id');
$table->string('content');
$table->integer('cat_id');
$table->integer('user_id');
$table->integer('good_id');
$table->integer('shop_id');
$table->string('content');
$table->timestamps();
});
}
@@ -14,9 +14,9 @@ class CreateAuthLogTable extends Migration
{
Schema::create('auth_log', function (Blueprint $table) {
$table->increments('id');
$table->string('ip');
$table->string('username');
$table->integer('event');
$table->string('ip');
$table->string('username');
$table->integer('event');
$table->timestamps();
});
}
@@ -14,11 +14,11 @@ class CreateTransactionLogTable extends Migration
{
Schema::create('transaction_log', function (Blueprint $table) {
$table->increments('id');
$table->string('ip');
$table->string('username');
$table->integer('trans_id');
$table->integer('good_id');
$table->integer('event');
$table->string('ip');
$table->string('username');
$table->integer('trans_id');
$table->integer('good_id');
$table->integer('event');
$table->timestamps();
});
}
@@ -14,11 +14,11 @@ class CreateTransactionsTable extends Migration
{
Schema::create('transactions', function (Blueprint $table) {
$table->increments('id');
$table->integer('trans_id');
$table->integer('buyer_id');
$table->integer('seller_id');
$table->integer('good_id');
$table->integer('status');
$table->integer('trans_id');
$table->integer('buyer_id');
$table->integer('seller_id');
$table->integer('good_id');
$table->integer('status');
$table->timestamps();
});
}