no message

This commit is contained in:
hajimi
2026-06-11 12:15:29 +08:00
parent 10ebe39c30
commit 96efa1d905
5859 changed files with 815501 additions and 5 deletions
@@ -0,0 +1,29 @@
<?php
namespace app\common\model\community;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
class CommunityPost extends BaseModel
{
use SoftDelete;
protected $name = 'community_post';
protected $deleteTime = 'delete_time';
public function getImagesAttr($value)
{
return $value ? json_decode($value, true) : [];
}
public function setImagesAttr($value)
{
return $value ? json_encode($value, JSON_UNESCAPED_UNICODE) : '[]';
}
public function tags()
{
return $this->belongsToMany(CommunityTag::class, 'la_community_post_tag', 'tag_id', 'post_id');
}
}