Files
YwxAppThink/ywxapp/model/Chat.php
T

48 lines
1.4 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
// +----------------------------------------------------------------------
// | YwxApp [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2026-2036 http://ywxapp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: ywxapp<admin@ywxapp.cn>
// +----------------------------------------------------------------------
namespace ywxapp\model;
/**
* 聊天
*/
class Chat extends BaseModel
{
// 设置表名(think-orm 4.0name 不带前缀,自动拼 wxapp_
protected $name = 'chat';
protected $schema = [
'id' => 'int',
'from_uid' => 'int',
'to_uid' => 'int',
'type' => 'int',
'content' => 'string',
'create_at' => 'int',
'update_at' => 'int',
];
}
// CREATE TABLE `chat_users` (
// `id` int(11) NOT NULL AUTO_INCREMENT,
// `username` varchar(50) NOT NULL,
// `password` varchar(255) NOT NULL,
// `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
// PRIMARY KEY (`id`)
// );
// CREATE TABLE `chat_messages` (
// `id` int(11) NOT NULL AUTO_INCREMENT,
// `from_user_id` int(11) NOT NULL,
// `to_user_id` int(11) NOT NULL,
// `message` text NOT NULL,
// `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
// PRIMARY KEY (`id`)
// );