wesley 6 years ago
parent
commit
36263ebf88

+ 47 - 0
app/Models/CallRecordsProcessModel.php

xqd
@@ -0,0 +1,47 @@
+<?php
+
+namespace App\Models;
+
+use App\Models\BaseModel;
+
+/**
+ * @description 通话纪录
+ * @author  system;
+ * @version    1.0
+ * @date 2018-11-27 03:15:47
+ *
+ */
+class CallRecordsProcessModel extends BaseModel
+{
+    /**
+     * 数据表名
+     *
+     * @var string
+     *
+     */
+    protected $table = 'call_records_process';
+    /**
+     * 主键
+     */
+    protected $primaryKey = 'id';
+
+    //分页
+    protected $perPage = PAGE_NUMS;
+
+    /**
+     * 可以被集体附值的表的字段
+     *
+     * @var string
+     */
+    protected $fillable = [
+        'ai_speak',
+        'people_speak',
+        'end_time',
+        'node_time',
+        'voice_path',
+        'ip',
+        'flow_time',
+        'call_id'
+    ];
+
+}

+ 39 - 0
database/migrations/2018_12_04_032113_create_call_records_process_table.php

xqd
@@ -0,0 +1,39 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateCallRecordsProcessTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('call_records_process', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('call_id',64)->comment('被叫标示');
+            $table->string('ai_speak',255)->nullable()->comment('机器人');
+            $table->string('people_speak',255)->nullable()->comment('被叫人');
+            $table->string('node_name',255)->nullable()->comment('节点名字');
+            $table->string('voice_path',255)->nullable()->comment('录音地址');
+            $table->string('ip',64)->nullable()->comment('服务器地址');
+            $table->dateTime('flow_time')->comment('纪录时间');
+
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('call_records_process');
+    }
+}