feat:添加位置消息记录表
parent
8f240806ef
commit
d89c696514
|
@ -10,16 +10,17 @@ namespace App\Constants;
|
|||
*/
|
||||
class TalkMessageType
|
||||
{
|
||||
const SYSTEM_TEXT_MESSAGE = 0; //系统文本消息
|
||||
const TEXT_MESSAGE = 1; //文本消息
|
||||
const FILE_MESSAGE = 2; //文件消息
|
||||
const FORWARD_MESSAGE = 3; //会话消息
|
||||
const CODE_MESSAGE = 4; //代码消息
|
||||
const VOTE_MESSAGE = 5; //投票消息
|
||||
const GROUP_NOTICE_MESSAGE = 6; //群组公告
|
||||
const FRIEND_APPLY_MESSAGE = 7; //好友申请
|
||||
const USER_LOGIN_MESSAGE = 8; //登录通知
|
||||
const GROUP_INVITE_MESSAGE = 9; //入群退群消息
|
||||
const SYSTEM_TEXT_MESSAGE = 0; //系统文本消息
|
||||
const TEXT_MESSAGE = 1; //文本消息
|
||||
const FILE_MESSAGE = 2; //文件消息
|
||||
const FORWARD_MESSAGE = 3; //会话消息
|
||||
const CODE_MESSAGE = 4; //代码消息
|
||||
const VOTE_MESSAGE = 5; //投票消息
|
||||
const GROUP_NOTICE_MESSAGE = 6; //群组公告
|
||||
const FRIEND_APPLY_MESSAGE = 7; //好友申请
|
||||
const USER_LOGIN_MESSAGE = 8; //登录通知
|
||||
const GROUP_INVITE_MESSAGE = 9; //入群退群消息
|
||||
const LOCATION_MESSAGE = 10; //位置消息(预留)
|
||||
|
||||
/**
|
||||
* 获取可转发的消息类型列表
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
use Hyperf\Database\Schema\Schema;
|
||||
use Hyperf\Database\Schema\Blueprint;
|
||||
use Hyperf\Database\Migrations\Migration;
|
||||
|
||||
class CreateTalkRecordsLocation extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('talk_records_location', function (Blueprint $table) {
|
||||
$table->unsignedInteger('id', true)->comment('自增ID');
|
||||
$table->unsignedInteger('record_id')->default(0)->comment('消息记录ID');
|
||||
$table->unsignedInteger('user_id')->default(0)->comment('用户ID');
|
||||
$table->decimal('longitude', 11, 6)->default('0.000000')->comment('经度');
|
||||
$table->decimal('latitude', 11, 6)->default('0.000000')->comment('纬度');
|
||||
$table->dateTime('created_at')->nullable(true)->comment('创建时间');
|
||||
|
||||
$table->charset = 'utf8';
|
||||
$table->collation = 'utf8_general_ci';
|
||||
$table->engine = 'InnoDB';
|
||||
|
||||
$table->unique(['record_id'], 'uk_record_id');
|
||||
$table->index(['user_id'], 'idx_user_id');
|
||||
|
||||
$table->comment('聊天对话记录(位置消息)');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('talk_records_location');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue