添加群呼表
This commit is contained in:
parent
d9871bd311
commit
d81db23d6f
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Task extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CallcenterTask extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('task', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name')->comment('任务名称');
|
||||
$table->date('date_start')->nullable()->comment('任务开始日期');
|
||||
$table->date('date_end')->nullable()->comment('任务结束日期');
|
||||
$table->time('time_start')->nullable()->comment('任务开始时间');
|
||||
$table->time('time_end')->nullable()->comment('任务结束时间');
|
||||
$table->unsignedBigInteger('gateway_id')->comment('出局网关ID');
|
||||
$table->unsignedBigInteger('queue_id')->nullable()->comment('转接队列ID');
|
||||
$table->integer('max_channel')->default(0)->comment('最大并发');
|
||||
$table->tinyInteger('status')->default(1)->comment('状态,1-停止,2-启动,3-完成');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('task');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CallcenterQueue extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('queue', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name')->comment('队列名称');
|
||||
$table->string('strategy')->default('top-down')->comment('振铃策略');
|
||||
$table->integer('max_wait_time')->default(0)->comment('客户进入队列后的最大等待时间(超过时间未被接通将挂断,0为无限等待直到客户主动挂断或有坐席接听');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('queue');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CallcenterQueueSip extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('queue_sip', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('queue_id')->comment('队列ID');
|
||||
$table->unsignedBigInteger('sip_id')->comment('分机ID');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('queue_sip');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CallcenterTaskCall extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('task_call', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('task_id')->comment('任务ID');
|
||||
$table->string('phone')->comment('待呼叫号码');
|
||||
$table->tinyInteger('status')->default(1)->comment('1-待呼叫,2-呼叫中,3-队列等待,4-已通话');
|
||||
$table->string('uuid')->nullable()->comment('客户通话UUID');
|
||||
$table->timestamp('datetime_originate_phone')->nullable()->comment('呼叫时间');
|
||||
$table->timestamp('datetime_entry_queue')->nullable()->comment('进入队列时间');
|
||||
$table->timestamp('datetime_sip_answer')->nullable()->comment('分机应答时间');
|
||||
$table->timestamp('datetime_end')->nullable()->comment('结束通话时间');
|
||||
$table->integer('billsec')->default(0)->comment('通话时长');
|
||||
$table->string('record_file')->nullable()->comment('录音地址');
|
||||
$table->unsignedBigInteger('sip_id')->default(0)->comment('接听分机ID');
|
||||
$table->string('sip_username')->nullable()->comment('接听分机号');
|
||||
$table->unsignedBigInteger('user_id')->default(0)->comment('接听分机的用户ID');
|
||||
$table->string('user_nickname')->nullable()->comment('接听分机的用户昵称');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('task_call');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue