love_php/database/migrations/2019_07_01_120636_create_communities.php
2026-04-02 09:20:51 +08:00

41 lines
1.2 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCommunities extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('communities', function (Blueprint $table) {
$table->increments('id');
$table->string('logo')->nullable();
$table->string('titile')->nullable()->comment('群名');
$table->text('intro')->nullable()->comment('群介绍');
$table->string('qrcode')->nullable()->comment('群二维码');
$table->string('owner_name')->nullable()->comment('群主');
$table->string('owner_photo')->nullable()->comment('群主头像');
$table->string('owner_wechat')->nullable()->comment('群主微信');
$table->integer('member_num')->default(0)->comment('会员数');
$table->integer('click_num')->default(0)->comment('访问量');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('communities');
}
}