hyperf-chat/app/Model/Group/Group.php

57 lines
1.4 KiB
PHP
Raw Normal View History

<?php
declare (strict_types=1);
namespace App\Model\Group;
use App\Model\BaseModel;
/**
* 聊天群组数据表模型
*
2021-04-20 16:30:57 +08:00
* @property integer $id 群ID
* @property integer $creator_id 群主ID
* @property string $group_name 群名称
* @property string $profile 群简介
* @property integer $avatar 群头像
* @property integer $max_num 最大群成员数量
* @property integer $is_overt 是否公开可见[0:;1:;]
* @property integer $is_mute 是否全员禁言 [0:;1:;],提示:不包含群主或管理员
* @property integer $is_dismiss 是否已解散[0:;1:;]
* @property string $created_at 创建时间
* @property string $dismissed_at 解散时间
* @package App\Model\Group
*/
class Group extends BaseModel
{
/**
2021-04-22 16:14:34 +08:00
* 最大成员数量
*/
2021-04-22 16:14:34 +08:00
const MAX_MEMBER_NUM = 200;
protected $table = 'group';
protected $fillable = [
'creator_id',
'group_name',
'profile',
'avatar',
'max_num',
'is_overt',
'is_mute',
'is_dismiss',
'created_at',
2022-01-16 14:22:53 +08:00
'updated_at',
'dismissed_at',
];
protected $casts = [
'creator_id' => 'integer',
2021-03-26 22:03:11 +08:00
'max_num' => 'integer',
'is_overt' => 'integer',
'is_mute' => 'integer',
'is_dismiss' => 'integer',
2022-01-16 14:22:53 +08:00
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
}