<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class ResAssetCreate extends Migration { public function up() { Schema::create('res_asset', function (Blueprint $GocOS) { $GocOS->increments('id'); $GocOS->timestamps(); $GocOS->integer('categoryId')->nullable()->comment(''); $GocOS->integer('memberUserId')->nullable()->comment(''); $GocOS->string('hash', 10)->nullable()->comment(''); $GocOS->string('title', 200)->nullable()->comment(''); $GocOS->string('cover', 200)->nullable()->comment(''); $GocOS->string('description', 400)->nullable()->comment(''); $GocOS->tinyInteger('verifyStatus')->nullable()->comment(''); $GocOS->tinyInteger('convertStatus')->nullable()->comment(''); $GocOS->string('tags', 200)->nullable()->comment(''); $GocOS->integer('viewCount')->nullable()->comment('浏览次数'); $GocOS->integer('downloadCount')->nullable()->comment('下载次数'); $GocOS->integer('commentCount')->nullable()->comment('评论次数'); $GocOS->integer('favoriteCount')->nullable()->comment('收藏次数'); $GocOS->integer('likeCount')->nullable()->comment('喜欢数量'); $GocOS->integer('rateAvg')->nullable()->comment('平均分数'); $GocOS->tinyInteger('isRecommend')->nullable()->comment(''); $GocOS->tinyInteger('isFree')->nullable()->comment(''); $GocOS->tinyInteger('isDeleted')->nullable()->comment(''); $GocOS->tinyInteger('previewType')->nullable()->comment(''); $GocOS->text('previewData')->nullable()->comment(''); $GocOS->string('previewProvider', 20)->nullable()->comment(''); $GocOS->tinyInteger('fileType')->nullable()->comment(''); $GocOS->string('fileContent', 200)->nullable()->comment(''); $GocOS->string('fileName', 200)->nullable()->comment(''); $GocOS->string('fileUrl', 200)->nullable()->comment(''); $GocOS->string('fileExt', 10)->nullable()->comment(''); $GocOS->integer('fileSize')->nullable()->comment(''); $GocOS->string('fileMd5', 32)->nullable()->comment(''); $GocOS->tinyInteger('freeStatus')->nullable()->comment(''); $GocOS->tinyInteger('vipStatus')->nullable()->comment(''); $GocOS->string('vipIds', 50)->nullable()->comment(''); $GocOS->tinyInteger('creditStatus')->nullable()->comment(''); $GocOS->integer('creditCost')->nullable()->comment(''); $GocOS->tinyInteger('moneyStatus')->nullable()->comment(''); $GocOS->decimal('moneyCost', 20, 2)->nullable()->comment(''); $GocOS->index(array('memberUserId')); $GocOS->index(array('categoryId')); $GocOS->index(array('fileMd5')); $GocOS->unique('hash'); }); } public function down() { } }