芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Models/TaskComment.php
$commentEmoji * @property-read int|null $comment_emoji_count * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read int|null $dislike_count * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read int|null $dislike_users_count * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read int|null $like_count * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @property-read int|null $like_users_count * @property-read \Illuminate\Database\Eloquent\Collection
$commentEmoji * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$commentEmoji * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$commentEmoji * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$commentEmoji * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$commentEmoji * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @property string|null $mention_user_id * @property-read \Illuminate\Database\Eloquent\Collection
$commentEmoji * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @method static \Illuminate\Database\Eloquent\Builder|TaskComment whereMentionUserId($value) * @property-read \Illuminate\Database\Eloquent\Collection
$commentEmoji * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$mentionComment * @property-read int|null $mention_comment_count * @property-read \Illuminate\Database\Eloquent\Collection
$mentionUser * @property-read int|null $mention_user_count * @property-read \Illuminate\Database\Eloquent\Collection
$commentEmoji * @property-read \Illuminate\Database\Eloquent\Collection
$dislike * @property-read \Illuminate\Database\Eloquent\Collection
$dislikeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$like * @property-read \Illuminate\Database\Eloquent\Collection
$likeUsers * @property-read \Illuminate\Database\Eloquent\Collection
$mentionComment * @property-read \Illuminate\Database\Eloquent\Collection
$mentionUser * @mixin \Eloquent */ class TaskComment extends BaseModel { public function user(): BelongsTo { return $this->belongsTo(User::class, 'user_id')->withoutGlobalScope(ActiveScope::class); } public function task(): BelongsTo { return $this->belongsTo(Task::class, 'task_id'); } public function commentEmoji(): HasMany { return $this->hasMany(TaskCommentEmoji::class, 'comment_id'); } public function mentionUser(): BelongsToMany { return $this->belongsToMany(User::class, 'mention_users')->withoutGlobalScope(ActiveScope::class)->using(MentionUser::class); } public function mentionComment(): HasMany { return $this->hasMany(MentionUser::class, 'task_comment_id'); } public function like(): HasMany { return $this->hasMany(TaskCommentEmoji::class, 'comment_id')->where('emoji_name', 'thumbs-up'); } public function dislike(): HasMany { return $this->hasMany(TaskCommentEmoji::class, 'comment_id')->where('emoji_name', 'thumbs-down'); } public function likeUsers(): HasManyThrough { return $this->hasManyThrough( User::class, TaskCommentEmoji::class, 'comment_id', // Foreign key on the task comment emoji table... 'id', // Foreign key on the user table... 'id', // Local key on the task comment table... 'user_id' // Local key on the task comment emoji table... )->where('task_comment_emoji.emoji_name', 'thumbs-up'); } public function dislikeUsers(): HasManyThrough { return $this->hasManyThrough( User::class, TaskCommentEmoji::class, 'comment_id', // Foreign key on the task comment emoji table... 'id', // Foreign key on the user table... 'id', // Local key on the task comment table... 'user_id' // Local key on the task comment emoji table... )->where('task_comment_emoji.emoji_name', 'thumbs-down'); } }