hujiao-gui/database/migrations/2021_03_12_174057_sip.php

37 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class Sip extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sip', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('username')->unique()->comment('分机号');
$table->string('password')->comment('分机密码');
$table->string('state')->default('down')->comment('呼叫状态,\'down\' => \'空闲\',\'ringing\' => \'响铃\',\'active\' => \'通话中\'');
$table->tinyInteger('status')->default(0)->comment('注册状态0未注册1已注册');
$table->unsignedBigInteger('gateway_id')->default(0)->nullable()->comment('网关ID');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sip');
}
}