Temporarily finish the migrations and models so that our works on

controllers can be going on.
This commit is contained in:
catsworld
2016-06-07 00:27:10 +08:00
parent 225f92e1dc
commit 25a87fe4e8
14 changed files with 198 additions and 31 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ namespace App;
use Illuminate\Database\Eloquent\Model;
class transId extends Model
class AuthLog extends Model
{
//
protected $table='auth_log';
}
+2
View File
@@ -29,3 +29,5 @@ Route::get('/', function () {
Route::group(['middleware' => ['web']], function () {
//
});
Route::get('/good', 'GoodController@getList');
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Message extends Model
{
protected $table='messages';
}
+2 -2
View File
@@ -4,7 +4,7 @@ namespace App;
use Illuminate\Database\Eloquent\Model;
class tags extends Model
class Tag extends Model
{
//
protected $table='tags';
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Transaction extends Model
{
protected $table='transactions';
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class TransactionLog extends Model
{
protected $table='transaction_log';
}
+1 -17
View File
@@ -6,21 +6,5 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
protected $table='users';
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class UserInfo extends Model
{
protected $table='user_info';
}
@@ -14,10 +14,14 @@ class CreateUsersTable extends Migration
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->integer('priviledge');
$table->string('username')->unique();
$table->string('password');
$table->rememberToken();
$table->string('stuid');
$table->string('SSO');
$table->string('nickname');
$table->string('email')->unique();
$table->integer('role_id');
$table->timestamps();
});
}
@@ -12,15 +12,14 @@ class CreateUserinfoTable extends Migration
*/
public function up()
{
Schema::create('userinfo', function (Blueprint $table) {
Schema::create('user_info', function (Blueprint $table) {
$table->increments('id');
$table->integer('stuid');
$table->string('realname');
$table->string('gender');
$table->string('realname');
$table->string('tel_num');
$table->string('address');
$table->string('birthday');
$table->string('mail');
$table->string('phonenumber');
$table->string('last_login_ip');
$table->string('register_ip');
$table->timestamps();
});
}
@@ -31,6 +30,6 @@ class CreateUserinfoTable extends Migration
*/
public function down()
{
Schema::drop('userinfo');
Schema::drop('user_info');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMessagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
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->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('messages');
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAuthLogTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('auth_log', function (Blueprint $table) {
$table->increments('id');
$table->string('ip');
$table->string('username');
$table->integer('event');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('auth_log');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionLogTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
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->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('transaction_log');
}
}
@@ -0,0 +1,35 @@
<?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');
}
}