Temporarily finish the migrations and models so that our works on
controllers can be going on.
This commit is contained in:
@@ -4,7 +4,7 @@ namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class transId extends Model
|
||||
class AuthLog extends Model
|
||||
{
|
||||
//
|
||||
protected $table='auth_log';
|
||||
}
|
||||
@@ -29,3 +29,5 @@ Route::get('/', function () {
|
||||
Route::group(['middleware' => ['web']], function () {
|
||||
//
|
||||
});
|
||||
|
||||
Route::get('/good', 'GoodController@getList');
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Message extends Model
|
||||
{
|
||||
protected $table='messages';
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class tags extends Model
|
||||
class Tag extends Model
|
||||
{
|
||||
//
|
||||
protected $table='tags';
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Transaction extends Model
|
||||
{
|
||||
protected $table='transactions';
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TransactionLog extends Model
|
||||
{
|
||||
protected $table='transaction_log';
|
||||
}
|
||||
+1
-17
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
+6
-7
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user