Files
xin-school/modules/Forum/Models/ForumPostModel.php
T
2026-05-31 03:47:57 +08:00

42 lines
877 B
PHP

<?php
namespace Modules\Forum\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ForumPostModel extends Model
{
use SoftDeletes;
protected $table = 'forum_posts';
protected $fillable = [
'user_id',
'category_id',
'title',
'content',
'images',
'view_count',
'comment_count',
'like_count',
'favorite_count',
'is_hot',
'is_top',
'status',
];
protected $casts = [
'user_id' => 'integer',
'category_id' => 'integer',
'images' => 'array',
'view_count' => 'integer',
'comment_count' => 'integer',
'like_count' => 'integer',
'favorite_count' => 'integer',
'is_hot' => 'integer',
'is_top' => 'integer',
'status' => 'integer',
];
}