Skip to content

Commit

Permalink
“addadd 4
Browse files Browse the repository at this point in the history
  • Loading branch information
lambq committed Feb 24, 2017
1 parent 2a9c8d7 commit be4471b
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 14 deletions.
8 changes: 5 additions & 3 deletions database/migrations/2014_10_12_000000_create_users_table.php
Expand Up @@ -15,9 +15,11 @@ public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->string('name')->comment('用户呢称');
$table->string('email')->unique()->comment('用户邮箱');
$table->string('avatar')->comment('用户头像');
$table->string('password',60)->comment('用户密码');
$table->string('github_id')->comment('关联github账号');
$table->rememberToken();
$table->timestamps();
});
Expand Down
6 changes: 3 additions & 3 deletions database/migrations/2016_11_14_104114_create_admins_table.php
Expand Up @@ -15,9 +15,9 @@ public function up()
{
Schema::create('admins', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->string('name')->comment('用户呢称');
$table->string('email')->unique()->comment('用户邮箱');
$table->string('password',60)->comment('用户密码');
$table->rememberToken();
$table->timestamps();
});
Expand Down
17 changes: 16 additions & 1 deletion database/migrations/2016_11_14_121720_create_articles_table.php
Expand Up @@ -14,8 +14,23 @@ class CreateArticlesTable extends Migration
public function up()
{
Schema::create('articles', function (Blueprint $table) {
$table->increments('id');
$table->increments('art_id');
$table->integer('user_id')->unsigned()->comment('用户关联ID');
$table->smallInteger('cate_id')->unsigned()->comment('分类关联ID');
$table->string('art_title','100')->comment('文章标题');
$table->string('art_tags','50')->comment('文章标签');
$table->string('copy_from','50')->comment('来源名称');
$table->string('copy_url','200')->comment('来源地址');
$table->string('org_url','255')->comment('采集地址');
$table->string('art_intro','200')->comment('文章简介');
$table->longText('art_content')->comment('文章内容');
$table->integer('art_views')->unsigned()->comment('文章浏览数');
$table->tinyInteger('art_ispay')->unsigned()->comment('文章是否支付');
$table->tinyInteger('art_istop')->unsigned()->comment('文章是否置顶');
$table->tinyInteger('art_isbest')->unsigned()->comment('文章是否');
$table->tinyInteger('art_status')->unsigned()->comment('文章审核状态');
$table->timestamps();
$table->softDeletes();
});
}

Expand Down
17 changes: 15 additions & 2 deletions database/migrations/2016_11_14_122144_create_categories_table.php
Expand Up @@ -14,8 +14,21 @@ class CreateCategoriesTable extends Migration
public function up()
{
Schema::create('categories', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->increments('cate_id');
$table->smallInteger('root_id')->unsigned()->comment('父级分类ID');
$table->enum('cate_mod', array('webdir', 'article','qrcode'))->comment('分类类型 webdir=网站 article=文章');
$table->string('cate_name','50')->comment('分类名称');
$table->string('cate_dir','50')->comment('目录名称');
$table->string('cate_url','255')->comment('跳转地址');
$table->string('cate_img','255')->comment('分类图片');
$table->tinyInteger('cate_isbest') ->unsigned()->comment('设置推荐 0 否 1是');
$table->smallInteger('cate_order')->unsigned()->comment('设置排序');
$table->string('cate_keywords','100')->comment('分类SEO关键词');
$table->string('cate_description','255')->comment('分类SEO描述');
$table->string('cate_arrparentid','255')->comment('分类属性设置');
$table->text('cate_arrchildid')->comment('分类子集');
$table->tinyInteger('cate_childcount')->unsigned()->comment('标签名称');
$table->smallInteger('cate_postcount')->unsigned()->comment('内容统计多少条');
});
}

Expand Down
23 changes: 22 additions & 1 deletion database/migrations/2016_11_14_122252_create_websites_table.php
Expand Up @@ -14,8 +14,29 @@ class CreateWebsitesTable extends Migration
public function up()
{
Schema::create('websites', function (Blueprint $table) {
$table->increments('id');
$table->increments('web_id');
$table->integer('user_id')->unsigned()->comment('用户关联ID');
$table->smallInteger('cate_id')->unsigned()->comment('分类关联ID');
$table->string('web_name','100')->comment('网站名称');
$table->string('web_url','255')->comment('网站域名');
$table->string('web_tags','255')->comment('TAG标签');
$table->string('web_pic','100')->comment('网站截图');
$table->text('web_intro')->comment('网站简介');
$table->tinyInteger('web_ispay')->unsigned()->comment('是否付费');
$table->tinyInteger('web_istop')->unsigned()->comment('是否置顶');
$table->tinyInteger('web_isbest')->unsigned()->comment('是否推荐');
$table->tinyInteger('web_islink')->unsigned()->comment('是否链接');
$table->integer('web_ip')->unsigned()->comment('服务器IP');
$table->tinyInteger('web_grank')->unsigned()->comment('PageRank');
$table->tinyInteger('web_brank')->unsigned()->comment('BaiduRank');
$table->tinyInteger('web_srank')->unsigned()->comment('SogouRank');
$table->integer('web_arank')->unsigned()->comment('AlexaRank');
$table->integer('web_instat')->unsigned()->comment('点入次数');
$table->integer('web_outstat')->unsigned()->comment('点出次数');
$table->integer('web_views')->unsigned()->comment('浏览次数');
$table->tinyInteger('web_status')->unsigned()->comment('审核状态 1=黑名单 2=待审核 3=已审核');
$table->timestamps();
$table->softDeletes();
});
}

Expand Down
7 changes: 6 additions & 1 deletion database/migrations/2016_11_14_122321_create_links_table.php
Expand Up @@ -14,7 +14,12 @@ class CreateLinksTable extends Migration
public function up()
{
Schema::create('links', function (Blueprint $table) {
$table->increments('id');
$table->increments('link_id');
$table->string('link_name','50')->comment('链接名称');
$table->string('link_url','255')->comment('链接地址');
$table->string('link_logo','255')->comment('链接LOGO');
$table->tinyInteger('link_hide')->unsigned()->comment('链接是否开启');
$table->tinyInteger('link_order')->unsigned()->comment('链接排序');
$table->timestamps();
});
}
Expand Down
8 changes: 6 additions & 2 deletions database/migrations/2016_11_14_122350_create_lables_table.php
Expand Up @@ -14,8 +14,12 @@ class CreateLablesTable extends Migration
public function up()
{
Schema::create('lables', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->increments('lab_id');
$table->string('lab_name','100')->comment('标签名称');
$table->string('lab_tags','100')->comment('TAG标签');
$table->text('lab_intro')->comment('标签简介');
$table->enum('cate_mod', array('webdir', 'article'))->comment('标签类型 webdir=网站 article=文章');
$table->integer('lab_views')->unsigned()->comment('浏览次数');
});
}

Expand Down
5 changes: 4 additions & 1 deletion database/migrations/2016_11_14_122422_create_pages_table.php
Expand Up @@ -14,7 +14,10 @@ class CreatePagesTable extends Migration
public function up()
{
Schema::create('pages', function (Blueprint $table) {
$table->increments('id');
$table->increments('page_id');
$table->string('page_name','50')->comment('文档标题');
$table->string('page_intro','255')->comment('文档简介');
$table->text('page_content')->comment('文档内容');
$table->timestamps();
});
}
Expand Down

0 comments on commit be4471b

Please sign in to comment.