belongsTo(Forum::class, 'forum_uuid', 'uuid'); } /** * @return BelongsToMany */ public function groups(): BelongsToMany { return $this->belongsToMany(Group::class, 'threads_has_groups', 'thread_uuid', 'group_uuid'); } /** * @return BelongsToMany */ public function users(): BelongsToMany { return $this->belongsTomany(User::class, 'threads_has_users', 'thread_uuid', 'user_uuid'); } /** * @return HasMany */ public function postings(): HasMany { return $this->hasMany(Post::class, 'thread_uuid', 'uuid'); } /** * @return BelongsTo */ public function lastpost(): BelongsTo { return $this->belongsTo(Post::class, 'lastpost_uuid', 'uuid'); } /** * @return HasOne */ public function prefix(): HasOne { return $this->hasOne(Prefix::class, 'uuid', 'prefix_uuid'); } }