hyperf-chat/app/Model/UsersEmoticon.php

38 lines
710 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
declare (strict_types=1);
namespace App\Model;
/**
* 表情包收藏数据表模型
*
* @property int $id 收藏ID
* @property int $user_id 用户ID
* @property string $emoticon_ids 表情包ID多个用英文逗号拼接
* @package App\Model
*/
class UsersEmoticon extends BaseModel
{
protected $table = 'users_emoticon';
protected $fillable = [
'user_id',
'emoticon_ids'
];
protected $casts = [
'id' => 'integer',
'user_id' => 'integer'
];
/**
* @param string $value
* @return string
*/
public function getEmoticonIdsAttribute($value)
{
return explode(',', $value);
}
}