Add good_cat and good_info tables

This commit is contained in:
koooyf
2016-04-16 10:53:31 +08:00
committed by onionwyl
parent dd53f5cc82
commit 6b31cd5345
4 changed files with 90 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Good_cat extends Model
{
//
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Good_info extends Model
{
//
}
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateGoodCatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('good_cat',function(Blueprint $table){
$table->increments('cat_id');
$table->string('cat_name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('good_cat');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateGoodInfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('good_info',function(Blueprint $table){
$table->increments('good_id');
$table->string('good_name');
$table->integer('cat_id');
$table->text('description');
$table->integer('pricemin');
$table->integer('pricemax');
$table->integer('type');
$table->integer('user_id');
$table->integer('couts');
$table->text('good_tag');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('good_info');
}
}