Files
MBTI_wang/api/app/model/AiConversation.php
卡若 ce55c48c64 feat: 同步今日小程序与后台迭代版本
集中提交今日 API、管理端、小程序与部署文档调整,确保 Gitea 主分支与本地最新开发版本一致。

Made-with: Cursor
2026-04-20 11:07:55 +08:00

35 lines
914 B
PHP
Raw Permalink 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
namespace app\model;
use think\Model;
use think\model\concern\SoftDelete;
/**
* 神仙 AI 对话
*/
class AiConversation extends Model
{
use SoftDelete;
/**
* 须为 true库表字段为驼峰 userId / lastMessageAt 等。
* strict=false 时 ORM 会把属性转成 snake_case 写入,与真实列名不一致 → userId、时间戳落库为 0
* 异步 executeAssistantTurn 按 userId 查会话失败 →「会话不存在」与小程序兜底文案。
*/
protected $strict = true;
protected $name = 'ai_conversations';
protected $deleteTime = 'deletedAt';
protected $autoWriteTimestamp = 'int';
protected $createTime = 'createdAt';
protected $updateTime = 'updatedAt';
protected $type = [
'createdAt' => 'integer',
'updatedAt' => 'integer',
'deletedAt' => 'integer',
'lastMessageAt' => 'integer',
];
}